diff options
Diffstat (limited to 'app/views/request')
-rw-r--r-- | app/views/request/_act.html.erb | 15 | ||||
-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 | 17 | ||||
-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 |
10 files changed, 31 insertions, 33 deletions
diff --git a/app/views/request/_act.html.erb b/app/views/request/_act.html.erb new file mode 100644 index 000000000..1199cb4a2 --- /dev/null +++ b/app/views/request/_act.html.erb @@ -0,0 +1,15 @@ +<h2><%= _("Act on what you've learnt") %></h2> + +<div class="act_link"> + <% tweet_link = "https://twitter.com/share?" + {:url => request.url, :via => AlaveteliConfiguration::twitter_username, :text => "'#{@info_request.title}'", :related => _('alaveteli_foi:The software that runs {{site_name}}', :site_name => site_name)}.to_query %> + <% link_to tweet_link do %> + <%= image_tag "twitter-16.png", :alt => "twitter icon" %> + <% end %> + <%= link_to _("Tweet this request"), tweet_link %> +</div> +<div class="act_link"> + <%= link_to "http://wordpress.com/" do %> + <%= image_tag "wordpress.png", :class => "rss" %> + <% end %> + <%= link_to _("Start your own blog"), "http://wordpress.com/"%> +</div> diff --git a/app/views/request/_bubble.html.erb b/app/views/request/_bubble.html.erb index 94498612a..e038bb3dc 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(Rails.root.join('app', '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 8400cd6ac..0f7965ffa 100644 --- a/app/views/request/_sidebar.html.erb +++ b/app/views/request/_sidebar.html.erb @@ -33,22 +33,7 @@ <%= link_to _("Report this request"), new_request_report_path(:request_id => @info_request.url_title) %> <% end %> <% end %> - <h2><%= _("Act on what you've learnt") %></h2> - - <div class="act_link"> - <% tweet_link = "https://twitter.com/share?" + {:url => request.url, :via => AlaveteliConfiguration::twitter_username, :text => "'#{@info_request.title}'", :related => _('alaveteli_foi:The software that runs {{site_name}}', :site_name => site_name)}.to_query %> - <% link_to tweet_link do %> - <%= image_tag "twitter-16.png", :alt => "twitter icon" %> - <% end %> - <%= link_to _("Tweet this request"), tweet_link %> - </div> - <div class="act_link"> - <%= link_to "http://wordpress.com/" do %> - <%= image_tag "wordpress.png", :class => "rss" %> - <% end %> - <%= link_to _("Start your own blog"), "http://wordpress.com/"%> - </div> - + <%= render :partial => 'request/act' %> <%= render :partial => 'request/next_actions' %> <% cache_if_caching_fragments(@similar_cache_key, :expires_in => 1.day) do %> 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 %> |