myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2451] trunk/app/views/layouts/_paginate.rhtml: m


From: noreply
Subject: [myexperiment-hackers] [2451] trunk/app/views/layouts/_paginate.rhtml: made sort options appear when there is only one page of results to show
Date: Thu, 24 Jun 2010 11:23:33 -0400 (EDT)

Revision
2451
Author
dgc
Date
2010-06-24 11:23:33 -0400 (Thu, 24 Jun 2010)

Log Message

made sort options appear when there is only one page of results to show

Modified Paths

Diff

Modified: trunk/app/views/layouts/_paginate.rhtml (2450 => 2451)


--- trunk/app/views/layouts/_paginate.rhtml	2010-06-23 13:44:41 UTC (rev 2450)
+++ trunk/app/views/layouts/_paginate.rhtml	2010-06-24 15:23:33 UTC (rev 2451)
@@ -1,17 +1,17 @@
+<% 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 %>
+
 <% 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">

reply via email to

[Prev in Thread] Current Thread [Next in Thread]