aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin_request
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin_request')
-rw-r--r--app/views/admin_request/_incoming_message_actions.rhtml8
-rw-r--r--app/views/admin_request/edit.rhtml8
-rw-r--r--app/views/admin_request/edit_comment.rhtml6
-rw-r--r--app/views/admin_request/edit_outgoing.rhtml8
-rw-r--r--app/views/admin_request/show.rhtml20
-rw-r--r--app/views/admin_request/show_raw_email.rhtml2
6 files changed, 26 insertions, 26 deletions
diff --git a/app/views/admin_request/_incoming_message_actions.rhtml b/app/views/admin_request/_incoming_message_actions.rhtml
index 9fedcb525..0fcf69111 100644
--- a/app/views/admin_request/_incoming_message_actions.rhtml
+++ b/app/views/admin_request/_incoming_message_actions.rhtml
@@ -1,6 +1,6 @@
<formset class="form-horizontal">
<legend>Actions</legend>
- <% form_tag '../redeliver_incoming', :class => "form form-inline" do %>
+ <% form_tag admin_request_redeliver_incoming_path, :class => "form form-inline" do %>
<div class="control-group">
<label class="control-label" for="url_title">Redeliver message to one or more other requests</label>
<div class="controls">
@@ -18,11 +18,11 @@
<div class="control-group">
<label class="control-label" for="generate_upload_url">Generate FOI officer upload URL</label>
<div class="controls">
- <%= link_to 'Generate and take me there', "../generate_upload_url/#{incoming_message.info_request.id}?incoming_message_id=#{incoming_message.id}", :class => "btn", :id => "generate_upload_url" %>
+ <%= link_to 'Generate and take me there', admin_request_generate_upload_url_path(incoming_message.info_request, :incoming_message_id => incoming_message.id), :class => "btn", :id => "generate_upload_url" %>
</div>
</div>
- <% form_tag '../destroy_incoming', :class => "form form-inline" do %>
+ <% form_tag admin_request_destroy_incoming_path, :class => "form form-inline" do %>
<div class="control-group">
<label class="control-label" for="generate_upload_url">Destroy message</label>
<div class="controls">
@@ -37,7 +37,7 @@
<div class="control-group">
<label class="control-label" for="show_rail_email">Inspect email</label>
<div class="controls">
- <%= link_to "View raw email", "../show_raw_email/#{incoming_message.raw_email_id}", :class => "btn", :id => "show_raw_email" %>
+ <%= link_to "View raw email", admin_request_show_raw_email_path(incoming_message.raw_email_id), :class => "btn", :id => "show_raw_email" %>
</div>
</div>
<% end %>
diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.rhtml
index 11c017aab..1cf5d4f12 100644
--- a/app/views/admin_request/edit.rhtml
+++ b/app/views/admin_request/edit.rhtml
@@ -2,7 +2,7 @@
<%= error_messages_for 'info_request' %>
-<% form_tag '../update/' + @info_request.id.to_s do %>
+<% form_tag admin_request_update_path(@info_request) do %>
<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>
@@ -43,13 +43,13 @@
<% end %>
<p>
-<%= link_to 'Show', '../show/' + @info_request.id.to_s %> |
-<%= link_to 'List all', '../list' %>
+<%= link_to 'Show', admin_request_show_path(@info_request) %> |
+<%= link_to 'List all', admin_request_list_path %>
</p>
<hr>
-<% form_tag '../destroy/' + @info_request.id.to_s do %>
+<% form_tag admin_request_destroy_path(@info_request) do %>
<p>
<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
diff --git a/app/views/admin_request/edit_comment.rhtml b/app/views/admin_request/edit_comment.rhtml
index a79c096e3..07031f5f2 100644
--- a/app/views/admin_request/edit_comment.rhtml
+++ b/app/views/admin_request/edit_comment.rhtml
@@ -2,7 +2,7 @@
<%= error_messages_for 'comment' %>
-<% form_tag '../update_comment/' + @comment.id.to_s do %>
+<% form_tag admin_request_update_comment_path(@comment) do %>
<p><label for="comment_body">Body of annotation</label><br/>
<%= text_area 'comment', 'body', :rows => 10, :cols => 60 %></p>
@@ -16,7 +16,7 @@
<% end %>
<p>
-<%= link_to 'Show', '../show/' + @comment.info_request.id.to_s %> |
-<%= link_to 'List all', '../list' %>
+<%= link_to 'Show', admin_request_show_path(@comment.info_request) %> |
+<%= link_to 'List all', admin_request_list_path %>
</p>
diff --git a/app/views/admin_request/edit_outgoing.rhtml b/app/views/admin_request/edit_outgoing.rhtml
index 4932cb52f..ab209be0d 100644
--- a/app/views/admin_request/edit_outgoing.rhtml
+++ b/app/views/admin_request/edit_outgoing.rhtml
@@ -2,7 +2,7 @@
<%= error_messages_for 'outgoing_message' %>
-<% form_tag '../update_outgoing/' + @outgoing_message.id.to_s do %>
+<% form_tag admin_request_update_outgoing_path(@outgoing_message) do %>
<p><label for="outgoing_message_body">Body of message</label><br/>
<%= text_area 'outgoing_message', 'body', :rows => 10, :cols => 60 %></p>
@@ -18,11 +18,11 @@
<% end %>
<p>
-<%= link_to 'Show', '../show/' + @outgoing_message.info_request.id.to_s %> |
-<%= link_to 'List all', '../list' %>
+<%= link_to 'Show', admin_request_show_path(@outgoing_message.info_request) %> |
+<%= link_to 'List all', admin_request_list_path %>
</p>
-<% form_tag '../destroy_outgoing' do %>
+<% form_tag admin_request_destroy_outgoing_path do %>
<div>
<%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %>
Warning, this is permanent! ---&gt;
diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml
index fac1e3e4c..27f7fca1b 100644
--- a/app/views/admin_request/show.rhtml
+++ b/app/views/admin_request/show.rhtml
@@ -2,7 +2,7 @@
<h1><%=@title%></h1>
-<% form_tag '../move_request', { :class => "form form-horizontal" } do %>
+<% form_tag admin_request_move_request_path, { :class => "form form-horizontal" } do %>
<%= hidden_field_tag 'info_request_id', @info_request.id %>
<div class="accordion" id="info_request">
<div class="accordion-group">
@@ -16,7 +16,7 @@
<thead>
<tr>
<td colspan="2">
- <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>
+ <%= link_to 'Edit metadata', admin_request_edit_path(@info_request), :class => "btn" %>
</td>
</tr>
</thead>
@@ -104,7 +104,7 @@
<tfoot>
<tr>
<td colspan="2">
- <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %>
+ <%= link_to 'Edit metadata', admin_request_edit_path(@info_request), :class => "btn" %>
</td>
</tr>
</tfoot>
@@ -120,11 +120,11 @@
FOI officer upload URL
</label>
<div class="controls">
- <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %>
+ <%= link_to 'Generate URL', admin_request_generate_upload_url_path(@info_request), :class => "btn" %>
<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 admin_request_hide_path(@info_request), :class => "form form-inline", :info_request_id => @info_request.id.to_s, :id => "hide_request_form" do %>
<div class="control-group">
<% if @info_request.is_external? %>
<label class="control-label">Hide the request:</label>
@@ -194,7 +194,7 @@
<tr>
<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 %>
+ <% form_tag admin_request_clarification_path, :class => "form form-inline admin-table-form admin-inline-form" do %>
<%= hidden_field_tag 'info_request_event_id', info_request_event.id %>
<%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %>
<% end %>
@@ -236,9 +236,9 @@
<div class="accordion-group">
<div class="accordion-heading">
<a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages"><i class="icon-chevron-right"></i></a>
- <a href="../edit_outgoing/<%= outgoing_message.id %>">
+ <% link_to admin_request_edit_outgoing_path(outgoing_message) do %>
#<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %>
- </a>
+ <% end %>
<blockquote>
<%= truncate(outgoing_message.body, :length => 400) %>
</blockquote>
@@ -248,7 +248,7 @@
<tbody>
<tr>
<td colspan="2">
- <% form_tag '../resend', :class => "admin-table-form" do %>
+ <% form_tag admin_request_resend_path, :class => "admin-table-form" do %>
<%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %>
<%= submit_tag "Resend", :class => "btn" %>
<% end %>
@@ -329,7 +329,7 @@
<div class="accordion-group">
<div class="accordion-heading">
<a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><i class="icon-chevron-right"></i></a>
- <a href="../edit_comment/<%= comment.id %>">
+ <a href="<%= admin_request_edit_comment_path(comment) %>">
#<%=comment.id%>
--
<%=h(comment.user.name)%>
diff --git a/app/views/admin_request/show_raw_email.rhtml b/app/views/admin_request/show_raw_email.rhtml
index c770d432d..e8cc6471f 100644
--- a/app/views/admin_request/show_raw_email.rhtml
+++ b/app/views/admin_request/show_raw_email.rhtml
@@ -29,7 +29,7 @@
<h2>Raw email</h2>
-<p><%= link_to "Download", "../download_raw_email/" + @raw_email.id.to_s %></p>
+<p><%= link_to "Download", admin_request_download_raw_email_path(@raw_email) %></p>
<pre><%=h(@raw_email.data).gsub(/\n/, '<br>').html_safe %></pre>