aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/request')
-rw-r--r--app/views/request/_after_actions.rhtml2
-rw-r--r--app/views/request/_bubble.rhtml16
-rw-r--r--app/views/request/_request_listing_via_event.rhtml2
-rw-r--r--app/views/request/similar.rhtml2
4 files changed, 12 insertions, 10 deletions
diff --git a/app/views/request/_after_actions.rhtml b/app/views/request/_after_actions.rhtml
index a3ee7c86b..3d74cf42d 100644
--- a/app/views/request/_after_actions.rhtml
+++ b/app/views/request/_after_actions.rhtml
@@ -15,9 +15,11 @@
<%= link_to _('Update the status of this request'), '#describe_state_form_1' %>
</li>
<% end %>
+ <% if @info_request.all_can_view? %>
<li>
<%= link_to _("Download a zip file of all correspondence"), download_entire_request_url(:url_title => @info_request.url_title) %>
</li>
+ <% end %>
</ul>
</div>
<% if ! @info_request.is_external? %>
diff --git a/app/views/request/_bubble.rhtml b/app/views/request/_bubble.rhtml
index 331c2163e..747e2aa1f 100644
--- a/app/views/request/_bubble.rhtml
+++ b/app/views/request/_bubble.rhtml
@@ -1,16 +1,16 @@
<div class="correspondence_text">
<% if not attachments.nil? and attachments.size > 0 %>
- <div class="attachments">
+ <div class="attachments">
<hr class="top">
<% attachments.each do |a| %>
<p class="attachment">
- <%
+ <%
attachment_url = get_attachment_url(:id => incoming_message.info_request_id,
- :incoming_message_id => incoming_message.id, :part => a.url_part_number,
- :file_name => a.display_filename)
+ :incoming_message_id => incoming_message.id, :part => a.url_part_number,
+ :file_name => a.display_filename)
attachment_as_html_url = get_attachment_as_html_url(:id => incoming_message.info_request_id,
- :incoming_message_id => incoming_message.id, :part => a.url_part_number,
- :file_name => a.display_filename + '.html')
+ :incoming_message_id => incoming_message.id, :part => a.url_part_number,
+ :file_name => a.display_filename + '.html')
%>
<% img_filename = "icon_" + a.content_type.sub('/', '_') + "_large.png"
full_filename = File.expand_path(File.join(File.dirname(__FILE__), "../../../public/images", img_filename))
@@ -23,9 +23,9 @@
<br>
<%= a.display_size %>
<%= link_to "Download", attachment_url %>
- <% if a.has_body_as_html? %>
+ <% if a.has_body_as_html? && incoming_message.info_request.all_can_view? %>
<%= link_to "View as HTML", attachment_as_html_url %>
- <% end %>
+ <% end %>
<!-- (<%= a.content_type %>) -->
<%= a.extra_note %>
</p>
diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml
index ee1cc079a..2ba9613e5 100644
--- a/app/views/request/_request_listing_via_event.rhtml
+++ b/app/views/request/_request_listing_via_event.rhtml
@@ -25,7 +25,7 @@ end %>
<%=event.display_status %>
<%= _('by {{public_body_name}} to {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
<% elsif event.event_type == 'comment' %>
- <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %>
+ <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %>
<% else %>
<%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search?
However, it can happen that we see other types of event transiently here in the period
diff --git a/app/views/request/similar.rhtml b/app/views/request/similar.rhtml
index d9806aeb1..0d53f6919 100644
--- a/app/views/request/similar.rhtml
+++ b/app/views/request/similar.rhtml
@@ -20,4 +20,4 @@
<% end %>
<% end %>
-<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_object.matches_estimated) %>
+<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %>