diff options
Diffstat (limited to 'app/views/request')
-rw-r--r-- | app/views/request/_bubble.html.erb | 6 | ||||
-rw-r--r-- | app/views/request/_incoming_correspondence.text.erb | 2 | ||||
-rw-r--r-- | app/views/request/_outgoing_correspondence.text.erb | 2 | ||||
-rw-r--r-- | app/views/request/_request_listing_single.html.erb | 10 | ||||
-rw-r--r-- | app/views/request/_sidebar.html.erb | 10 | ||||
-rw-r--r-- | app/views/request/_view_html_prefix.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/new.html.erb | 1 | ||||
-rw-r--r-- | app/views/request/select_authority.html.erb | 1 | ||||
-rw-r--r-- | app/views/request/show.text.erb | 8 |
9 files changed, 21 insertions, 21 deletions
diff --git a/app/views/request/_bubble.html.erb b/app/views/request/_bubble.html.erb index 94498612a..8827d114d 100644 --- a/app/views/request/_bubble.html.erb +++ b/app/views/request/_bubble.html.erb @@ -13,11 +13,11 @@ :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)) + full_filename = File.expand_path(File.join(File.dirname(__FILE__), "../../assets/images", img_filename)) if File.exist?(full_filename) %> - <a href="<%=attachment_path%>"><img class="attachment_image" alt="Attachment" src="/images/<%=img_filename%>"></a> + <%= link_to image_tag(img_filename, :class => "attachment_image", :alt => "Attachment"), attachment_path %> <% else %> - <a href="<%=attachment_path%>"><img class="attachment_image" alt="Attachment" src="/images/icon_unknown.png"></a> + <%= link_to image_tag("icon_unknown.png", :class => "attachment_image", :alt => "Attachment"), attachment_path %> <% end %> <strong><%= h a.display_filename %></strong> <br> diff --git a/app/views/request/_incoming_correspondence.text.erb b/app/views/request/_incoming_correspondence.text.erb index 33ddad926..c5e648d28 100644 --- a/app/views/request/_incoming_correspondence.text.erb +++ b/app/views/request/_incoming_correspondence.text.erb @@ -1,5 +1,5 @@ <%- if not incoming_message.user_can_view?(@user) %> - <%= render :partial => 'request/hidden_correspondence.text', :locals => { :message => incoming_message }%> + <%= render :partial => 'request/hidden_correspondence', :formats => 'text', :locals => { :message => incoming_message }%> <%- else %> <%= _('From:') %><% if incoming_message.specific_from_name? %> <%= incoming_message.safe_mail_from %><% end %><% if incoming_message.from_public_body? %>, <%= @info_request.public_body.name %><% end %> <%= _('To:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> diff --git a/app/views/request/_outgoing_correspondence.text.erb b/app/views/request/_outgoing_correspondence.text.erb index 80c71cc01..5375ef81b 100644 --- a/app/views/request/_outgoing_correspondence.text.erb +++ b/app/views/request/_outgoing_correspondence.text.erb @@ -1,5 +1,5 @@ <%- if not outgoing_message.user_can_view?(@user) %> - <%= render :partial => 'request/hidden_correspondence.text', :locals => { :message => outgoing_message }%> + <%= render :partial => 'request/hidden_correspondence', :formats => 'text', :locals => { :message => outgoing_message }%> <%- else %> <%= _('From:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> <%= _('To:') %> <%= @info_request.public_body.name %> diff --git a/app/views/request/_request_listing_single.html.erb b/app/views/request/_request_listing_single.html.erb index 56737fd3e..50f889d75 100644 --- a/app/views/request/_request_listing_single.html.erb +++ b/app/views/request/_request_listing_single.html.erb @@ -1,9 +1,9 @@ <div class="request_listing"> - <span class="head"> - <%= link_to h(info_request.title), (@play_urls ? categorise_request_path(:url_title => info_request.url_title) : request_path(info_request)) %> - </span> - <span class="desc"> - <%= excerpt(info_request.initial_request_text, "", 150) %> + <span class="head"> + <%= link_to h(info_request.title), (@play_urls ? categorise_request_path(:url_title => info_request.url_title) : request_path(info_request)) %> + </span> + <span class="desc"> + <%= excerpt(info_request.initial_request_text, "", :radius => 150) %> </span> <span class="bottomline icon_<%= info_request.calculate_status %>"> <strong> diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb index 8d4a4a2d8..8400cd6ac 100644 --- a/app/views/request/_sidebar.html.erb +++ b/app/views/request/_sidebar.html.erb @@ -51,16 +51,18 @@ <%= render :partial => 'request/next_actions' %> - <% # TODO: Cache for 1 day %> - <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %> + <% cache_if_caching_fragments(@similar_cache_key, :expires_in => 1.day) do %> + <% xapian_similar, xapian_similar_more = @info_request.similar_requests %> + <% if !xapian_similar.nil? && xapian_similar.results.size > 0 %> <h2><%= _('Similar requests')%></h2> - <% for result in @xapian_similar.results %> + <% for result in xapian_similar.results %> <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> <% end %> - <% if @xapian_similar_more %> + <% if xapian_similar_more %> <p><%= link_to _("More similar requests"), similar_request_path(@info_request.url_title) %></p> <% end %> <% end %> + <% end %> <p><%= link_to _('Event history details'), request_details_path(@info_request) %></p> diff --git a/app/views/request/_view_html_prefix.html.erb b/app/views/request/_view_html_prefix.html.erb index 3a9946745..63caa98d4 100644 --- a/app/views/request/_view_html_prefix.html.erb +++ b/app/views/request/_view_html_prefix.html.erb @@ -1,6 +1,6 @@ <div class="view_html_prefix"> <div class="view_html_logo"> - <a href="/"><img src="/images/navimg/logo-trans-small.png" alt="<%= site_name %>"></a> + <a href="/"><%= image_tag "navimg/logo-trans-small.png", :alt => site_name %></a> </div> <div class="view_html_download_link"> <%=link_to _("Download original attachment"), @attachment_url %> diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb index f8b97ffe3..849a94216 100644 --- a/app/views/request/new.html.erb +++ b/app/views/request/new.html.erb @@ -1,4 +1,3 @@ -<script type="text/javascript" src="/javascripts/ba-throttle-debounce.js"></script> <script type="text/javascript"> $(document).ready(function(){ // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin: diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb index 75c51fc57..4f117ee75 100644 --- a/app/views/request/select_authority.html.erb +++ b/app/views/request/select_authority.html.erb @@ -1,4 +1,3 @@ -<script type="text/javascript" src="/javascripts/ba-throttle-debounce.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#authority_preview").hide(); diff --git a/app/views/request/show.text.erb b/app/views/request/show.text.erb index 29ac2987f..8079d10d5 100644 --- a/app/views/request/show.text.erb +++ b/app/views/request/show.text.erb @@ -4,13 +4,13 @@ <% if info_request_event.visible %> <% case info_request_event.event_type %> <% when 'response' %> - <%= render :partial => 'request/incoming_correspondence.text', :locals => { :incoming_message => info_request_event.incoming_message } %> + <%= render :partial => 'request/incoming_correspondence', :formats => 'text', :locals => { :incoming_message => info_request_event.incoming_message } %> <% when 'sent', 'followup_sent' %> - <%= render :partial => 'request/outgoing_correspondence.text', :locals => { :outgoing_message => info_request_event.outgoing_message, :info_request_event => info_request_event }%> + <%= render :partial => 'request/outgoing_correspondence', :formats => 'text', :locals => { :outgoing_message => info_request_event.outgoing_message, :info_request_event => info_request_event }%> <% when 'resent', 'followup_resent' %> - <%= render :partial => 'request/resent_outgoing_correspondence.text', :locals => { outgoing_message => info_request_event.outgoing_message, :info_request_event => info_request_event }%> + <%= render :partial => 'request/resent_outgoing_correspondence', :formats => 'text', :locals => { outgoing_message => info_request_event.outgoing_message, :info_request_event => info_request_event }%> <% when 'comment' %> - <%= render :partial => 'comment/single_comment.text', :locals => { :comment => info_request_event.comment } %> + <%= render :partial => 'comment/single_comment', :formats => 'text', :locals => { :comment => info_request_event.comment } %> <% end %> ------------------------------- <% end %> |