aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin_public_body/_form.html.erb14
-rw-r--r--app/views/comment/_single_comment.html.erb6
-rw-r--r--app/views/general/_footer.html.erb4
-rw-r--r--app/views/general/_frontpage_requests_list.html.erb2
-rw-r--r--app/views/general/_header.html.erb37
-rw-r--r--app/views/general/_stylesheet_includes.html.erb13
-rw-r--r--app/views/general/_topnav.html.erb2
-rw-r--r--app/views/general/blog.html.erb4
-rw-r--r--app/views/help/api.html.erb2
-rw-r--r--app/views/layouts/_favicon.html.erb2
-rw-r--r--app/views/layouts/admin.html.erb5
-rw-r--r--app/views/layouts/default.html.erb55
-rw-r--r--app/views/layouts/no_chrome.html.erb8
-rw-r--r--app/views/public_body/statistics.html.erb4
-rw-r--r--app/views/request/_act.html.erb15
-rw-r--r--app/views/request/_bubble.html.erb6
-rw-r--r--app/views/request/_incoming_correspondence.text.erb2
-rw-r--r--app/views/request/_outgoing_correspondence.text.erb2
-rw-r--r--app/views/request/_request_listing_single.html.erb10
-rw-r--r--app/views/request/_sidebar.html.erb17
-rw-r--r--app/views/request/_view_html_prefix.html.erb2
-rw-r--r--app/views/request/new.html.erb1
-rw-r--r--app/views/request/select_authority.html.erb1
-rw-r--r--app/views/request/show.text.erb8
-rw-r--r--app/views/track/_tracking_links.html.erb2
-rw-r--r--app/views/track/atom_feed.atom.erb2
-rw-r--r--app/views/user/_show_user_info.html.erb2
27 files changed, 110 insertions, 118 deletions
diff --git a/app/views/admin_public_body/_form.html.erb b/app/views/admin_public_body/_form.html.erb
index c577d1e18..5a80386ec 100644
--- a/app/views/admin_public_body/_form.html.erb
+++ b/app/views/admin_public_body/_form.html.erb
@@ -51,12 +51,6 @@
</div>
</div>
<div class="control-group">
- <label for="<%= form_tag_id(t.object_name, :disclosure_log, locale) %>" class="control-label"><%=_("Disclosure log URL")%></label>
- <div class="controls">
- <%= t.text_field :disclosure_log, :size => 60, :id => form_tag_id(t.object_name, :disclosure_log, locale), :class => "span3" %>
- </div>
- </div>
- <div class="control-group">
<label for="<%= form_tag_id(t.object_name, :notes, locale) %>" class="control-label"><%=_("Public notes")%></label>
<div class="controls">
<%= t.text_area :notes, :rows => 3, :id => form_tag_id(t.object_name, :notes, locale), :class => "span6" %>
@@ -82,13 +76,19 @@
</div>
</div>
<div class="control-group">
- <label for="public_body_home_page"><%=_("Home page")%></label>
+ <label for="public_body_home_page" class="control-label"><%=_("Home page")%></label>
<div class="controls">
<%= f.text_field :home_page, :class => "span4" %>
<p class="help-block">(of whole authority, not just their FOI page; set to <strong>blank</strong> (empty string) to guess it from the email)</p>
</div>
</div>
<div class="control-group">
+ <label for="public_body_disclosure_log" class="control-label"><%=_("Disclosure log URL")%></label>
+ <div class="controls">
+ <%= f.text_field :disclosure_log, :size => 60, :class => "span4" %>
+ </div>
+</div>
+<div class="control-group">
<label for="public_body_last_edit_comment" class="control-label"><strong>Comment</strong> for this edit</label>
<div class="controls">
<%= f.text_area :last_edit_comment, :rows => 3, :class => "span6" %></p>
diff --git a/app/views/comment/_single_comment.html.erb b/app/views/comment/_single_comment.html.erb
index af1de0649..a6d234b34 100644
--- a/app/views/comment/_single_comment.html.erb
+++ b/app/views/comment/_single_comment.html.erb
@@ -11,16 +11,16 @@
</h2>
<div class="comment_in_request_text">
<p>
- <img class="comment_quote" src="/images/quote-marks.png" alt="">
+ <%= image_tag "quote-marks.png", :class => "comment_quote" %>
<%= comment.get_body_for_html_display %>
</p>
</div>
<p class="event_actions">
<% if !comment.id.nil? %>
- <%= link_to "Link to this", comment_path(comment), :class => "link_to_this" %>
<% if !@user.nil? && @user.admin_page_links? %>
- | <%= link_to "Admin", admin_request_edit_comment_path(comment) %>
+ <%= link_to "Admin", admin_request_edit_comment_path(comment) %> |
<% end %>
+ <%= link_to "Link to this", comment_path(comment), :class => "link_to_this" %>
<!-- | <%= link_to _('Report abuse'), comment_path(comment) %> -->
<% end %>
</p>
diff --git a/app/views/general/_footer.html.erb b/app/views/general/_footer.html.erb
index 990093694..2e10a0f94 100644
--- a/app/views/general/_footer.html.erb
+++ b/app/views/general/_footer.html.erb
@@ -1,6 +1,8 @@
<div id="footer">
<%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_path %>
-| <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>"><%= _("Follow us on twitter") %></a>
+<% unless AlaveteliConfiguration::twitter_username.blank? %>
+| <%= image_tag "twitter-16.png", :alt => "twitter icon", :class => "twitter-icon" %> <a href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>"><%= _("Follow us on twitter") %></a>
+<% end %>
<%= render :partial => 'general/credits' %>
</div>
<div class="after-footer">&nbsp;</div>
diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb
index 41a875cab..d7d9184c4 100644
--- a/app/views/general/_frontpage_requests_list.html.erb
+++ b/app/views/general/_frontpage_requests_list.html.erb
@@ -22,7 +22,7 @@
<%=link_to h(event.info_request.title), request_path(event.info_request)%>
<%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %>
- <p class="excerpt" onclick="document.location.href='<%=request_path(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", 200) %></p>
+ <p class="excerpt" onclick="document.location.href='<%=request_path(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", :radius => 200) %></p>
</li>
<% end %>
</ul>
diff --git a/app/views/general/_header.html.erb b/app/views/general/_header.html.erb
new file mode 100644
index 000000000..55bf719e2
--- /dev/null
+++ b/app/views/general/_header.html.erb
@@ -0,0 +1,37 @@
+<div id="banner">
+ <div id="banner_inner">
+ <div class="lang"><%= render :partial => 'general/locale_switcher' %></div>
+
+ <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
+ <div id="logged_in_bar">
+ <% if @user %>
+ <%= _('Hello, {{username}}!', :username => h(@user.name))%>
+
+ <% if @user %>
+ <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
+ <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
+ <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %>
+ <% end %>
+
+
+ <%= link_to _("Sign out"), signout_path(:r => request.fullpath) %>
+ <% else %>
+ <%= link_to _("Sign in or sign up"), signin_path(:r => request.fullpath) %>
+ <% end %>
+ </div>
+ <% end %>
+
+ <div id="navigation_search">
+ <form id="navigation_search_form" method="post" action="<%= search_redirect_path %>">
+ <p>
+ <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query", :title => "type your search term here" } %>
+ <input id="navigation_search_button" type="submit" value="search">
+ </p>
+ </form>
+ </div>
+
+ <%= render :partial => 'general/orglink' %>
+
+ <%= render :partial => 'general/topnav' %>
+ </div>
+</div>
diff --git a/app/views/general/_stylesheet_includes.html.erb b/app/views/general/_stylesheet_includes.html.erb
index 416ddb825..7a1648efd 100644
--- a/app/views/general/_stylesheet_includes.html.erb
+++ b/app/views/general/_stylesheet_includes.html.erb
@@ -1,23 +1,22 @@
<%- if @render_to_file %>
<style>
- <%= raw File.read(Rails.root.join('public', 'stylesheets', 'main.css')) %>
- <%= raw File.read(Rails.root.join('public', 'stylesheets', 'print.css')) %>
+ <%= Rails.application.assets["main.css"].to_s %>
+ <%= Rails.application.assets["print.css"].to_s %>
</style>
<%- else %>
- <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %>
+ <%= stylesheet_link_tag 'application', :title => "Main", :rel => "stylesheet", :media => "all" %>
<%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all" %>
<%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print" %>
<% if !params[:print_stylesheet].nil? %>
<%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all" %>
<% end %>
- <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>
<!--[if LT IE 7]>
- <style type="text/css">@import url("/stylesheets/ie6.css");</style>
+ <%= stylesheet_link_tag 'ie6.css' %>
<![endif]-->
<!--[if LT IE 8]>
- <style type="text/css">@import url("/stylesheets/ie7.css");</style>
+ <%= stylesheet_link_tag 'ie7.css' %>
<![endif]-->
<% if AlaveteliConfiguration::force_registration_on_new_request %>
- <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %>
+ <%= stylesheet_link_tag 'jquery.fancybox-1.3.4.css', :rel => "stylesheet" %>
<% end %>
<% end %>
diff --git a/app/views/general/_topnav.html.erb b/app/views/general/_topnav.html.erb
index c7f2cedea..d37bd97d1 100644
--- a/app/views/general/_topnav.html.erb
+++ b/app/views/general/_topnav.html.erb
@@ -4,7 +4,9 @@
<li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_path, :id => 'make-request-link' %></li>
<li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("View requests"), request_list_successful_path %></li>
<li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default_path %></li>
+<% unless AlaveteliConfiguration::blog_feed.empty? %>
<li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_path %></li>
+<% end %>
<li class="<%= 'selected' if params[:controller] == 'help' %>"><%= link_to _("Help"), help_about_path %></li>
</ul>
</div>
diff --git a/app/views/general/blog.html.erb b/app/views/general/blog.html.erb
index ef587421e..b81989ca8 100644
--- a/app/views/general/blog.html.erb
+++ b/app/views/general/blog.html.erb
@@ -4,8 +4,8 @@
<div id="right_column">
<div class="act_link">
<h2><%= _("Stay up to date") %></h2>
- <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %></a><br/><br/>
- <img src="/images/feed-16.png" alt="RSS icon"> <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %></a>
+ <%= image_tag "twitter-16.png", :alt => "twitter icon", :class => "twitter-icon" %> <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %></a><br/><br/>
+ <%= image_tag "feed-16.png", :alt => "RSS icon" %> <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %></a>
</div>
<% if AlaveteliConfiguration::twitter_widget_id %>
<div id="twitter">
diff --git a/app/views/help/api.html.erb b/app/views/help/api.html.erb
index 57390d65a..df7bb30b6 100644
--- a/app/views/help/api.html.erb
+++ b/app/views/help/api.html.erb
@@ -36,7 +36,7 @@
use to get updates and links in XML format. Find the URL of the Atom feed in
one of these ways:
<ul>
- <li>Look for the <img src="/images/feed-16.png" alt=""> RSS feed links.</li>
+ <li>Look for the <%= image_tag "feed-16.png", :alt => "RSS icon" %> RSS feed links.</li>
<li>Examine the <code>&lt;link rel="alternate" type="application/atom+xml"&gt;</code> tag in the head of the HTML. </li>
<li>Add <code>/feed</code> to the start of another URL.
</ul>
diff --git a/app/views/layouts/_favicon.html.erb b/app/views/layouts/_favicon.html.erb
index 4f3859d6c..0ee7d48e3 100644
--- a/app/views/layouts/_favicon.html.erb
+++ b/app/views/layouts/_favicon.html.erb
@@ -1 +1 @@
-<link rel="shortcut icon" href="/favicon.ico">
+<%= favicon_link_tag 'favicon.ico' %>
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 7722efad4..c1f9335b1 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -4,9 +4,8 @@
<meta http-equiv="content-type" content="text/html;charset=UTF-8" >
<title><%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%></title>
- <%= javascript_include_tag '/javascripts/jquery.js', '/admin/javascripts/jquery-ui.min.js', '/admin/javascripts/bootstrap-collapse', '/admin/javascripts/bootstrap-tab', '/admin/javascripts/admin', '/javascripts/jquery_ujs' %>
- <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%>
- <%= stylesheet_link_tag "/admin/stylesheets/admin", :title => "Main", :rel => "stylesheet" %>
+ <%= javascript_include_tag "admin" %>
+ <%= stylesheet_link_tag "admin", :title => "Main", :rel => "stylesheet" %>
</head>
<body class="admin">
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index 07e1bb808..f07c453d1 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -14,14 +14,13 @@
<%= render :partial => 'general/stylesheet_includes' %>
<% if is_admin? %>
- <%= stylesheet_link_tag "/admin/stylesheets/admin", :title => "Main", :rel => "stylesheet" %>
+ <%= stylesheet_link_tag "admin", :title => "Main", :rel => "stylesheet" %>
<% end %>
- <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js', 'general.js' %>
+ <%= javascript_include_tag "application" %>
<% if @profile_photo_javascript %>
- <script type="text/javascript" src="/javascripts/jquery.Jcrop.js"></script>
- <script type="text/javascript" src="/javascripts/profile_photo.js"></script>
- <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" >
+ <%= javascript_include_tag "profile-photos" %>
+ <%= stylesheet_link_tag "jquery.Jcrop.css" %>
<% end %>
<% if @feed_autodetect %>
@@ -44,7 +43,7 @@
</head>
<body class="<%= 'front' if params[:action] == 'frontpage' %>">
<% if AlaveteliConfiguration::force_registration_on_new_request && !@user %>
- <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %>
+ <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack.js' %>
<script type="text/javascript">
$(document).ready(function() {
$("#make-request-link").fancybox({
@@ -78,49 +77,7 @@
<span class="popup-close"><a href="#top" ><%= _('Close') %></a></span>
</div>
<% end %>
-
- <div id="other-country-notice" class="popup">
- <span class="popup-content">
- </span>
- <span class="popup-close"><a href="#top" ><%= _('Close') %></a></span>
- </div>
- <div id="banner">
- <div id="banner_inner">
- <div class="lang"><%= render :partial => 'general/locale_switcher' %></div>
-
- <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
- <div id="logged_in_bar">
- <% if @user %>
- <%= _('Hello, {{username}}!', :username => h(@user.name))%>
-
- <% if @user %>
- <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
- <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
- <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %>
- <% end %>
-
-
- <%= link_to _("Sign out"), signout_path(:r => request.fullpath) %>
- <% else %>
- <%= link_to _("Sign in or sign up"), signin_path(:r => request.fullpath) %>
- <% end %>
- </div>
- <% end %>
-
- <div id="navigation_search">
- <form id="navigation_search_form" method="post" action="<%= search_redirect_path %>">
- <p>
- <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query", :title => "type your search term here" } %>
- <input id="navigation_search_button" type="submit" value="search">
- </p>
- </form>
- </div>
-
- <%= render :partial => 'general/orglink' %>
-
- <%= render :partial => 'general/topnav' %>
- </div>
- </div>
+ <%= render :partial => 'general/header' %>
<div id="wrapper">
<div id="content">
<% if flash[:notice] %>
diff --git a/app/views/layouts/no_chrome.html.erb b/app/views/layouts/no_chrome.html.erb
index d7918cffc..e613b8ca2 100644
--- a/app/views/layouts/no_chrome.html.erb
+++ b/app/views/layouts/no_chrome.html.erb
@@ -10,15 +10,13 @@
<% end %>
</title>
- <script type="text/javascript" src="/javascripts/jquery.js"></script>
+ <%= javascript_include_tag "application" %>
- <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %>
+ <%= stylesheet_link_tag 'application', :title => "Main", :rel => "stylesheet" %>
<%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %>
- <%= stylesheet_link_tag 'theme', :rel => "stylesheet" %>
<!--[if LT IE 7]>
- <style type="text/css">@import url("/stylesheets/ie6.css");</style>
+ <%= stylesheet_link_tag 'ie6', :rel => "stylesheet" %>
<![endif]-->
- <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %>
</head>
<body>
<div class="entirebody">
diff --git a/app/views/public_body/statistics.html.erb b/app/views/public_body/statistics.html.erb
index 6ea253260..d935a9e47 100644
--- a/app/views/public_body/statistics.html.erb
+++ b/app/views/public_body/statistics.html.erb
@@ -69,7 +69,7 @@ are due to him.") %></p>
<script type="text/javascript">
var graphs_data = <%= @graph_list.to_json.html_safe %>;
</script>
-<!--[if lte IE 8]><%= javascript_include_tag 'excanvas.min.js' %><![endif]-->
-<%= javascript_include_tag 'jquery.flot.min.js', 'jquery.flot.errorbars.min.js', 'jquery.flot.tickrotor.min.js', 'jquery.flot.axislabels.min.js', 'stats-graphs.js' %>
+<!--[if lte IE 8]><%= javascript_include_tag "excanvas.min.js" %><![endif]-->
+<%= javascript_include_tag "stats" %>
</div>
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 %>
diff --git a/app/views/track/_tracking_links.html.erb b/app/views/track/_tracking_links.html.erb
index a16dbc78f..a3cd8fc60 100644
--- a/app/views/track/_tracking_links.html.erb
+++ b/app/views/track/_tracking_links.html.erb
@@ -21,7 +21,7 @@
</div>
<div class="feed_link feed_link_<%=location%>">
- <%= link_to '<img src="/images/feed-16.png" alt="">'.html_safe, do_track_path(track_thing, 'feed') %>
+ <%= link_to image_tag('feed-16.png', :alt => "RSS icon"), do_track_path(track_thing, 'feed') %>
<%= link_to (location == 'sidebar' ? _('RSS feed of updates') : _('RSS feed')), do_track_path(track_thing, 'feed') %>
</div>
<% end %>
diff --git a/app/views/track/atom_feed.atom.erb b/app/views/track/atom_feed.atom.erb
index a12b9eff0..be9c39e72 100644
--- a/app/views/track/atom_feed.atom.erb
+++ b/app/views/track/atom_feed.atom.erb
@@ -9,7 +9,7 @@
# Get the HTML content from the same partial template as website search does
content = ''
if result[:model].class.to_s == 'InfoRequestEvent'
- content += render :partial => 'request/request_listing_via_event.html', :locals => { :event => result[:model], :info_request => result[:model].info_request }
+ content += render :partial => 'request/request_listing_via_event', :formats => ['html'], :locals => { :event => result[:model], :info_request => result[:model].info_request }
else
content = "<p><strong>Unknown search result type " + result[:model].class.to_s + "</strong></p>"
end
diff --git a/app/views/user/_show_user_info.html.erb b/app/views/user/_show_user_info.html.erb
index 305300236..9182f0733 100644
--- a/app/views/user/_show_user_info.html.erb
+++ b/app/views/user/_show_user_info.html.erb
@@ -1,7 +1,7 @@
<% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>
<div class="user_about_me">
- <img class="comment_quote" src="/images/quote-marks.png" alt="">
+ <%= image_tag "quote-marks.png", :class => "comment_quote" %>
<%= @display_user.get_about_me_for_html_display %>
<% if @is_you %>
(<%= link_to _("edit text about you"), set_profile_about_me_path %>)