aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-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/layouts/default.html.erb38
-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/show.text.erb8
-rw-r--r--app/views/track/atom_feed.atom.erb2
8 files changed, 51 insertions, 50 deletions
diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb
index fa498dfa7..a628c14ef 100644
--- a/app/views/general/_frontpage_requests_list.html.erb
+++ b/app/views/general/_frontpage_requests_list.html.erb
@@ -21,7 +21,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/layouts/default.html.erb b/app/views/layouts/default.html.erb
index e90e89a00..8d69b2a08 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -76,43 +76,7 @@
<% end %>
<div class="entirebody">
- <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/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/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/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