aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin_request/show.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin_request/show.rhtml')
-rw-r--r--app/views/admin_request/show.rhtml235
1 files changed, 117 insertions, 118 deletions
diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml
index def158d67..72552a588 100644
--- a/app/views/admin_request/show.rhtml
+++ b/app/views/admin_request/show.rhtml
@@ -4,116 +4,115 @@
<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
<%= hidden_field_tag 'info_request_id', @info_request.id %>
-<div class="accordion" id="info_request">
- <div class="accordion-group">
- <div class="accordion-heading">
- <span class="item-title">
- <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request"><i class="icon-chevron-down"></i></a>Request metadata
- </span>
- </div>
- <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse in">
- <table class="table table-striped table-condensed">
- <thead>
- <tr>
- <td colspan="2">
- <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>
- </td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>Public page:</th>
- <td><%= link_to request_url(@info_request), request_path(@info_request) %></td>
- </tr>
- <% @info_request.for_admin_column do |name, value, type, column_name|%>
+ <div class="accordion" id="info_request">
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <span class="item-title">
+ <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request"><i class="icon-chevron-down"></i></a>Request metadata
+ </span>
+ </div>
+ <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse in">
+ <table class="table table-striped table-condensed">
+ <thead>
+ <tr>
+ <td colspan="2">
+ <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>Public page:</th>
+ <td><%= link_to request_url(@info_request), request_path(@info_request) %></td>
+ </tr>
+ <% @info_request.for_admin_column do |name, value, type, column_name|%>
+ <tr>
+ <td>
+ <b><%= name %>:</b>
+ </td>
+ <td>
+ <% if type == 'datetime' %>
+ <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
+ (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
+ <% else %>
+ <%= h value %>
+ <% end %>
+ <% if column_name == 'described_state' %>
+ <ul>
+ <li><strong>Initial request last sent at:</strong> <%= @info_request.calculate_status %></li>
+ <li><strong>Initial request last sent at:</strong> <%=@info_request.date_initial_request_last_sent_at.to_date %></li>
+ <li><strong>Date response required by:</strong> <%= @info_request.date_response_required_by %></li>
+ <li><strong>Very overdue after:</strong> <%= @info_request.date_very_overdue_after %></li>
+ </ul>
+ <% end %>
+ </td>
+ </tr>
+ <% end %>
<tr>
<td>
- <b><%= name %>:</b>
+ <b>Created by</b>
</td>
<td>
- <% if type == 'datetime' %>
- <%= I18n.l(value, :format => "%e %B %Y %H:%M:%S") %>
- (<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(value)) %>)
+ <% if @info_request.is_external? %>
+ <%= link_to("<i class='icon-eye-open'></i>".html_safe, @info_request.external_url, :title => "view URL of original request on external website") %>
+ <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API)
<% else %>
- <%= h value %>
- <% end %>
- <% if column_name == 'described_state' %>
- <ul>
- <li><strong>Initial request last sent at:</strong> <%= @info_request.calculate_status %>
- <li><strong>Initial request last sent at:</strong> <%=@info_request.date_initial_request_last_sent_at.to_date %>
- <li><strong>Date response required by:</strong> <%= @info_request.date_response_required_by %>
- <li><strong>Very overdue after:</strong> <%= @info_request.date_very_overdue_after %>
- </ul>
+ <%= link_to("<i class='icon-eye-open'></i>".html_safe, user_path(@info_request.user), :title => "view user's page on public website") %>
+ <%= user_admin_link_for_request(@info_request) %>
+ <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>
+ <div style="display:none;">
+ <strong>url_name of new user:</strong>
+ <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
+ <%= submit_tag "Move request to user", :class => "btn btn-info" %>
+ </div>
<% end %>
</td>
</tr>
- <% end %>
- <tr>
- <td>
- <b>Created by</b>
- </td>
- <td>
- <% if @info_request.is_external? %>
- <%= link_to("<i class='icon-eye-open'></i>".html_safe, @info_request.external_url, :title => "view URL of original request on external website") %>
- <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API)
- <% else %>
- <%= link_to("<i class='icon-eye-open'></i>".html_safe, user_path(@info_request.user), :title => "view user's page on public website") %>
- <%= user_admin_link_for_request(@info_request) %>
- <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %>
+ <tr>
+ <td>
+ <b>Public authority:</b>
+ </td>
+ <td>
+ <%= link_to("<i class='icon-eye-open'></i>".html_safe, public_body_path(@info_request.public_body), :title => "view authority on public website") %>
+ <%= link_to(@info_request.public_body.name, admin_body_show_path(@info_request.public_body)) %>
+ <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>
<div style="display:none;">
- <strong>url_name of new user:</strong>
- <%= text_field_tag 'user_url_name', "", { :size => 20 } %>
- <%= submit_tag "Move request to user", :class => "btn btn-info" %>
+ <strong>url_name of new authority:</strong>
+ <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
+ <%= submit_tag "Move request to authority", :class => "btn btn-info" %>
</div>
- <% end %>
-
- </td>
- </tr>
- <tr>
- <td>
- <b>Public authority:</b>
- </td>
- <td>
- <%= link_to("<i class='icon-eye-open'></i>".html_safe, public_body_path(@info_request.public_body), :title => "view authority on public website") %>
- <%= link_to(@info_request.public_body.name, admin_body_show_path(@info_request.public_body)) %>
- <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %>
- <div style="display:none;">
- <strong>url_name of new authority:</strong>
- <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %>
- <%= submit_tag "Move request to authority", :class => "btn btn-info" %>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <b><%=_("Incoming email address")%></b>
- </td>
- <td>
- <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>
- </td>
- </tr>
- <tr>
- <td>
- <b><%=_("Tags")%></b>
- </td>
- <td>
- <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <td colspan="2">
- <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>
- </td>
- </tr>
- </tfoot>
- </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><%=_("Incoming email address")%></b>
+ </td>
+ <td>
+ <%= link_to h(@info_request.incoming_email), "mailto:#{@info_request.incoming_email}" %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><%=_("Tags")%></b>
+ </td>
+ <td>
+ <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td colspan="2">
+ <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+ </div>
</div>
</div>
-</div>
<% end %>
-<formset class="form-horizontal">
+<fieldset class="form-horizontal">
<legend>Actions</legend>
<div class="control-group">
<label class="control-label">
@@ -124,15 +123,15 @@
<p class="help-block">(see also option to general URLs for individual incoming messages below)</p>
</div>
</div>
- <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>
+ <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :id => "hide_request_form" do %>
<div class="control-group">
- <% if @info_request.is_external? %>
- <label class="control-label">Hide the request:</label>
- <% else %>
- <label class="control-label">Hide the request and notify the user:</label>
- <% end %>
+ <% if @info_request.is_external? %>
+ <label class="control-label">Hide the request:</label>
+ <% else %>
+ <label class="control-label">Hide the request and notify the user:</label>
+ <% end %>
- <div class="controls" id="request_hidden_user_explanation_reasons">
+ <div class="controls" id="request_hidden_user_explanation_reasons">
<% if ['hidden', 'requester_only'].include? @info_request.prominence %>
<p class="help-block">This request has already been hidden</p>
<% else %>
@@ -147,29 +146,29 @@
</div>
<% if !['hidden', 'requester_only'].include? @info_request.prominence %>
- <% if ! @info_request.is_external? %>
+ <% if ! @info_request.is_external? %>
- <div class="control-group" id="request_hidden_user_subject">
- <label for="request_hidden_user_subject_field" class="control-label">Subject of email:</label>
- <div class="controls">
- <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %>
- </div>
+ <div class="control-group" id="request_hidden_user_subject">
+ <label for="request_hidden_user_subject_field" class="control-label">Subject of email:</label>
+ <div class="controls">
+ <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %>
</div>
+ </div>
- <div class="control-group" id="request_hidden_user_explanation">
- <label for="request_hidden_user_explanation_field" class="control-label">Reason for hiding the request (will be emailed to user):</label>
- <div class="controls">
- <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>
- </div>
+ <div class="control-group" id="request_hidden_user_explanation">
+ <label for="request_hidden_user_explanation_field" class="control-label">Reason for hiding the request (will be emailed to user):</label>
+ <div class="controls">
+ <%= text_area_tag "explanation", h(@request_hidden_user_explanation), {:id => "request_hidden_user_explanation_field"} %>
</div>
+ </div>
- <% end %>
+ <% end %>
<div class="form-actions" id="request_hide_button">
<%= submit_tag _("Hide request"), :class => "btn" %>
</div>
<% end %>
<% end %>
-</formset>
+</fieldset>
<hr>
<h2>Events</h2>
@@ -195,7 +194,7 @@
<td>
<% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %>
<% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %>
- <%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
+ <%= hidden_field_tag 'info_request_event_id', info_request_event.id, :id => nil %>
<%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
<% end %>
<% end %>