Fix next/previous links on diary pages properly
authorTom Hughes <tom@compton.nu>
Sun, 7 Apr 2013 22:09:19 +0000 (23:09 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 7 Apr 2013 22:09:19 +0000 (23:09 +0100)
app/views/diary_entry/list.html.erb

index bbd86e269dfd099baa739d618eeea9eaafb23c75..2939ec7e62aa5cead3edd2a9cd902a6d3a10f79f 100644 (file)
   <% end %>
 
   <% if @entries.size < @page_size -%>
-    <%= link_to t('diary_entry.list.older_entries'), params.merge(:page => @page + 1 ) %>
-  <% else -%>
     <%= t('diary_entry.list.older_entries') %>
+  <% else -%>
+    <%= link_to t('diary_entry.list.older_entries'), params.merge(:page => @page + 1 ) %>
   <% end -%>
 
   |
 
   <% if @page > 1 -%>
-    <%= t('diary_entry.list.newer_entries') %>
-  <% else -%>
     <%= link_to t('diary_entry.list.newer_entries'), params.merge(:page => @page - 1) %>
+  <% else -%>
+    <%= t('diary_entry.list.newer_entries') %>
   <% end -%>
 <% end %>