diff options
Diffstat (limited to 'app/views/admin_request')
-rw-r--r-- | app/views/admin_request/edit.rhtml | 10 | ||||
-rw-r--r-- | app/views/admin_request/show.rhtml | 28 |
2 files changed, 22 insertions, 16 deletions
diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.rhtml index 4026ee712..808028b47 100644 --- a/app/views/admin_request/edit.rhtml +++ b/app/views/admin_request/edit.rhtml @@ -7,21 +7,21 @@ <p><label for="info_request_title"><strong>Title</strong></label> (warning: editing this will break URLs right now)<br/> <%= text_field 'info_request', 'title', :size => 50 %></p> - <p><label for="info_request_prominence"><strong>Prominence</strong></label> + <p><label for="info_request_prominence"><strong>Prominence</strong></label> <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %> (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything) </p> <p> - <label for="info_request_allow_new_responses_from"><strong>Allow new responses</strong> from</label> + <label for="info_request_allow_new_responses_from"><strong>Allow new responses</strong> from</label> <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>; - <label for="info_request_handle_rejected_responses"><strong>Handle rejected responses</strong> with</label> + <label for="info_request_handle_rejected_responses"><strong>Handle rejected responses</strong> with</label> <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %> <br> ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail) </p> - <p><label for="info_request_described_state"><strong>Described state</strong></label> + <p><label for="info_request_described_state"><strong>Described state</strong></label> <%= select( 'info_request', "described_state", InfoRequest.enumerate_states ) %>; <label for="info_request_awaiting_description"><strong>Awaiting description</strong></label> <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %> @@ -49,7 +49,7 @@ <% form_tag '../destroy/' + @info_request.id.to_s do %> <p> - <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destory request entirely' %> + <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destroy request entirely' %> <br>Use it mainly if someone posts private information, e.g. made a Data Protection request. It destroys all responses and tracks as well. </p> diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml index aac68ad2e..9d939eb35 100644 --- a/app/views/admin_request/show.rhtml +++ b/app/views/admin_request/show.rhtml @@ -11,14 +11,20 @@ <% if column.name == 'described_state' %> <strong>Calculated status:</strong> <%= @info_request.calculate_status %> <br/><strong>Initial request last sent at:</strong> <%=@info_request.date_initial_request_last_sent_at.to_date %> - <strong>Date response required by:</strong> <%= @info_request.date_response_required_by %> + <strong>Date response required by:</strong> <%= @info_request.date_response_required_by %> <strong>Very overdue after:</strong> <%= @info_request.date_very_overdue_after %> <% end %> <% if ![ 'allow_new_responses_from' ].include?(column.name) %> <br/> <% end %> <% end %> - <strong>Created by:</strong> <%= user_both_links(@info_request.user) %> + <strong>Created by:</strong> + <% if @info_request.is_external? %> + <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API) + <% else %> + <%= user_both_links(@info_request.user) %> + <% end %> + <span> <span> (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>) @@ -30,7 +36,7 @@ </span> </span> <br> -<strong>Public authority:</strong> <%= public_body_both_links(@info_request.public_body) %> +<strong>Public authority:</strong> <%= public_body_both_links(@info_request.public_body) %> <span> <span> (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>) @@ -63,7 +69,7 @@ <% end %> <th>Actions</th> </tr> - + <% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %> <tr class="<%= cycle('odd', 'even') %>"> <td><%=h info_request_event.id %></td> @@ -102,7 +108,7 @@ <% end %> <th>Actions</th> </tr> - + <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %> <tr class="<%= cycle('odd', 'even') %>"> <td><%=h outgoing_message.id %></td> @@ -110,8 +116,8 @@ <% if column == 'body' %> <td> - <div><%= simple_format( truncate(outgoing_message.body, :length => 400, - :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") + <div><%= simple_format( truncate(outgoing_message.body, :length => 400, + :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") )) %></div> <div style="display:none;"><%= simple_format( outgoing_message.body ) %></div> </td> @@ -143,15 +149,15 @@ <% end %> <th>Actions</th> </tr> - + <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %> <tr class="<%= cycle('odd', 'even') %>" id="incoming-<%=incoming_message.id.to_s%>"> <td><%=h incoming_message.id %></td> <% for column in IncomingMessage.content_columns.map { |c| c.name } %> <% if column =~ /^cached_.*?$/ %> <td> - <div><%= simple_format( truncate(incoming_message.send(column), :length => 400, - :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") + <div><%= simple_format( truncate(incoming_message.send(column), :length => 400, + :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") )) %></div> <div style="display:none;"><%= simple_format( incoming_message.send(column) ) %></div> </td> @@ -183,7 +189,7 @@ <% end %> <th>Actions</th> </tr> - + <% for comment in @info_request.comments %> <tr class="<%= cycle('odd', 'even') %>"> <td><%=h comment.id %></td> |