Diff
Modified: trunk/app/views/blobs/index.rhtml (2426 => 2427)
--- trunk/app/views/blobs/index.rhtml 2010-06-08 12:55:56 UTC (rev 2426)
+++ trunk/app/views/blobs/index.rhtml 2010-06-08 12:57:29 UTC (rev 2427)
@@ -13,19 +13,8 @@
<%= render :partial => "blobs/all_tags" %>
<% end -%>
-<div style="float: right; margin: 0.5em;">
- Sort by:
- <select = this.options[this.selectedIndex].value;">
- <% Conf.contribution_order_options.each do |args| %>
- <option value="?order=<%= args["option"] -%>" <% if params[:order] == args["option"] -%> selected="selected"<% end -%>><%= args["label"] -%></option>
- <% end %>
- </select>
-</div>
+<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions, :sort_by => Conf.contribution_order_options } %>
-<div style="clear: right"></div>
-
-<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions } %>
-
<%= render :partial => "contributions/list", :locals => { :collection => @contributions, :table => true } %>
<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions } %>
Modified: trunk/app/views/layouts/_paginate.rhtml (2426 => 2427)
--- trunk/app/views/layouts/_paginate.rhtml 2010-06-08 12:55:56 UTC (rev 2426)
+++ trunk/app/views/layouts/_paginate.rhtml 2010-06-08 12:57:29 UTC (rev 2427)
@@ -1,5 +1,17 @@
<% if collection.page_count != collection.first_page -%>
<div class="pagination">
+
+ <% if local_assigns[:sort_by] %>
+ <div style="float: right; margin: 1em;">
+ Sort by:
+ <select = this.options[this.selectedIndex].value;">
+ <% sort_by.each do |args| %>
+ <option value="?order=<%= args["option"] -%>" <% if params[:order] == args["option"] -%> selected="selected"<% end -%>><%= args["label"] -%></option>
+ <% end %>
+ </select>
+ </div>
+ <% end %>
+
<ul>
<% if collection.previous_page? -%>
<li class="nextpage">
Modified: trunk/app/views/packs/index.rhtml (2426 => 2427)
--- trunk/app/views/packs/index.rhtml 2010-06-08 12:55:56 UTC (rev 2426)
+++ trunk/app/views/packs/index.rhtml 2010-06-08 12:57:29 UTC (rev 2427)
@@ -33,19 +33,8 @@
<%= render :partial => "packs/all_tags" %>
<% end -%>
-<div style="float: right; margin: 0.5em;">
- Sort by:
- <select = this.options[this.selectedIndex].value;">
- <% Conf.contribution_order_options.each do |args| %>
- <option value="?order=<%= args["option"] -%>" <% if params[:order] == args["option"] -%> selected="selected"<% end -%>><%= args["label"] -%></option>
- <% end %>
- </select>
-</div>
+<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions, :sort_by => Conf.contribution_order_options } %>
-<div style="clear: right"></div>
-
-<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions } %>
-
<%= render :partial => "contributions/list", :locals => { :collection => @contributions, :table => true } %>
<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions } %>
Modified: trunk/app/views/workflows/index.rhtml (2426 => 2427)
--- trunk/app/views/workflows/index.rhtml 2010-06-08 12:55:56 UTC (rev 2426)
+++ trunk/app/views/workflows/index.rhtml 2010-06-08 12:57:29 UTC (rev 2427)
@@ -15,19 +15,8 @@
<%= render :partial => "workflows/all_tags" %>
<% end -%>
-<div style="float: right; margin: 0.5em;">
- Sort by:
- <select = this.options[this.selectedIndex].value;">
- <% Conf.contribution_order_options.each do |args| %>
- <option value="?order=<%= args["option"] -%>" <% if params[:order] == args["option"] -%> selected="selected"<% end -%>><%= args["label"] -%></option>
- <% end %>
- </select>
-</div>
+<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions, :sort_by => Conf.contribution_order_options } %>
-<div style="clear: right"></div>
-
-<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions } %>
-
<%= render :partial => "contributions/list", :locals => { :collection => @contributions, :table => true } %>
<%= render :partial => "layouts/paginate", :locals => { :collection => @contributions } %>