myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3496] trunk: Fixed 500 error occurring when tryi


From: noreply
Subject: [myexperiment-hackers] [3496] trunk: Fixed 500 error occurring when trying to display multipage search results for users and groups
Date: Wed, 10 Apr 2013 11:08:15 +0000 (UTC)

Revision
3496
Author
fbacall
Date
2013-04-10 11:08:14 +0000 (Wed, 10 Apr 2013)

Log Message

Fixed 500 error occurring when trying to display multipage search results for users and groups

Modified Paths

Diff

Modified: trunk/app/views/search/model.rhtml (3495 => 3496)


--- trunk/app/views/search/model.rhtml	2013-04-09 13:14:28 UTC (rev 3495)
+++ trunk/app/views/search/model.rhtml	2013-04-10 11:08:14 UTC (rev 3496)
@@ -9,10 +9,13 @@
 <%= view_privileges_notice %>
 <br />
 
-<%= render :partial => "layouts/paginate", :locals => { :collection => @collection } %>
+<div style="overflow: auto"><%= render :partial => "layouts/paginate", :locals => { :collection => @collection } %></div><br/>
 
-<%= render :partial => "address@hidden/table", :locals => { :collection => @collection, :query => @query } %>
+<div class="summary">
+  <div class="results">
+    <%= render :partial => "address@hidden/table", :locals => { :collection => @collection, :query => @query } %>
+  </div>
+</div>
 
-<%= render :partial => "layouts/paginate", :locals => { :collection => @collection } %>
+<div style="overflow: auto"><%= render :partial => "layouts/paginate", :locals => { :collection => @collection } %></div>
 
-<br />

Modified: trunk/lib/paginated_array.rb (3495 => 3496)


--- trunk/lib/paginated_array.rb	2013-04-09 13:14:28 UTC (rev 3495)
+++ trunk/lib/paginated_array.rb	2013-04-10 11:08:14 UTC (rev 3496)
@@ -19,6 +19,8 @@
     ((@total - 1) / @limit) + 1
   end
 
+  alias_method :total_pages, :page_count
+
   def first_page
     1
   end
@@ -47,6 +49,8 @@
     (@offset / @limit) + 1
   end
 
+  alias_method :current_page, :page
+
   def page_exists?(x)
     return false if x < first_page
     return false if x > last_page
@@ -55,3 +59,4 @@
   end
 end
 
+

reply via email to

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