aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/general/search.rhtml10
-rw-r--r--app/views/request/list.rhtml2
-rw-r--r--app/views/user/show.rhtml82
3 files changed, 45 insertions, 49 deletions
diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml
index fe6229293..90ace809e 100644
--- a/app/views/general/search.rhtml
+++ b/app/views/general/search.rhtml
@@ -56,11 +56,7 @@
["all", _("everything")]]%>
<% for variety, label in labels %>
<% if @variety_postfix != variety %>
- <% if variety != "users" %>
- <%= link_to label, search_url([params[:query], @common_query], variety, @sort_postfix) %>
- <% else %>
- <%= link_to label, search_url(params[:query], variety, @sort_postfix) %>
- <% end %>
+ <%= link_to label, search_url([params[:query], variety, @sort_postfix]) %>
<% else %>
<%= label %>
<% end %>
@@ -126,9 +122,9 @@
<% if !@query.nil? %>
<p id="search_controls">
- <%=link_to_unless @sortby == 'relevant', _("Show most relevant results first"), search_url(@query, @variety_postfix, 'relevant') %>
+ <%=link_to_unless @sortby == 'relevant', _("Show most relevant results first"), search_url([params[:query], @variety_postfix, 'relevant'], params) %>
|
- <%=link_to_unless @sortby == 'newest', _("Newest results first"), search_url(@query, @variety_postfix, 'newest') %>
+ <%=link_to_unless @sortby == 'newest', _("Newest results first"), search_url([params[:query], @variety_postfix, 'newest'], params) %>
<% if @sortby == 'described' %>
| <%= _('Recently described results first') %>
<% end %>
diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml
index 42cd41498..7cbd982f1 100644
--- a/app/views/request/list.rhtml
+++ b/app/views/request/list.rhtml
@@ -14,7 +14,7 @@
<div style="clear:both"></div>
<div class="results_section">
- <% view_cache :ttl => 5.minutes.to_i, :tag => [@query, @page, I18n.locale] do %>
+ <% view_cache :ttl => 5.minutes.to_i, :tag => [@cache_tag] do %>
<% if @list_results.empty? %>
<p> <%= _('No requests of this sort yet.')%></p>
<% else %>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 4fa29f00d..a4466f5f4 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -190,56 +190,56 @@
<% end %>
<% end %>
- <% if @show_profile && @is_you %>
- <% if @track_things.empty? %>
- <h2 id="email_subscriptions"> <%= _('Your email subscriptions')%></h2>
- <p><%= _('None made.')%></p>
- <% else %>
- <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, _('email subscription')) %> </h2>
- <% if @track_things_grouped.size == 1 %>
+</div>
+<% end %>
+<% if @show_profile && @is_you %>
+ <% if @track_things.empty? %>
+ <h2 id="email_subscriptions"> <%= _('Your email subscriptions')%></h2>
+ <p><%= _('None made.')%></p>
+ <% else %>
+ <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, _('email subscription')) %> </h2>
+ <% if @track_things_grouped.size == 1 %>
+ <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>
+ <h3>
+ <%=TrackThing.track_type_description(@track_things[0].track_type)%>
+ <%= hidden_field_tag 'track_type', @track_things[0].track_type %>
+ <%= hidden_field_tag 'user', @display_user.id %>
+ <%= hidden_field_tag 'r', request.request_uri %>
+ <% if @track_things.size > 1 %>
+ <%= submit_tag _('unsubscribe all') %>
+ <% end %>
+ </h3>
+ <% end %>
+ <% end %>
+ <% for track_type, track_things in @track_things_grouped %>
+ <% if @track_things_grouped.size > 1 %>
<% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>
<h3>
- <%=TrackThing.track_type_description(@track_things[0].track_type)%>
- <%= hidden_field_tag 'track_type', @track_things[0].track_type %>
+ <%=TrackThing.track_type_description(track_type)%>
+ <%= hidden_field_tag 'track_type', track_type %>
<%= hidden_field_tag 'user', @display_user.id %>
<%= hidden_field_tag 'r', request.request_uri %>
- <% if @track_things.size > 1 %>
- <%= submit_tag _('unsubscribe all') %>
- <% end %>
+ <% if track_things.size > 1 %>
+ <%= submit_tag _('unsubscribe all')%>
+ <% end %>
</h3>
<% end %>
<% end %>
- <% for track_type, track_things in @track_things_grouped %>
- <% if @track_things_grouped.size > 1 %>
- <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %>
- <h3>
- <%=TrackThing.track_type_description(track_type)%>
- <%= hidden_field_tag 'track_type', track_type %>
- <%= hidden_field_tag 'user', @display_user.id %>
- <%= hidden_field_tag 'r', request.request_uri %>
- <% if track_things.size > 1 %>
- <%= submit_tag _('unsubscribe all')%>
- <% end %>
- </h3>
- <% end %>
- <% end %>
- <ul>
- <% for track_thing in track_things %>
- <li>
- <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %>
- <div>
- <%= track_thing.params[:list_description] %>
- <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
- <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
- <%= submit_tag _('unsubscribe') %>
- </div>
- <% end %>
- </li>
- <% end %>
- </ul>
+ <ul>
+ <% for track_thing in track_things %>
+ <li>
+ <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %>
+ <div>
+ <%= track_thing.params[:list_description] %>
+ <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
+ <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
+ <%= submit_tag _('unsubscribe') %>
+ </div>
+ <% end %>
+ </li>
<% end %>
+ </ul>
<% end %>
<% end %>
-</div>
<% end %>