summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-05-25 13:27:37 +0200
committerMichał Górny <mgorny@gentoo.org>2018-05-25 13:32:41 +0200
commit38079f86567d47c443375d620eec5daf0b8e43e7 (patch)
tree07f51ba1c95c1177b2f4b60cca02711eb7a53fbe /views
parentAdd redirects for plain /threads and /messages URL (diff)
downloadfrontend-38079f86567d47c443375d620eec5daf0b8e43e7.tar.gz
frontend-38079f86567d47c443375d620eec5daf0b8e43e7.tar.bz2
frontend-38079f86567d47c443375d620eec5daf0b8e43e7.zip
Replace redirect on no threads with inline display
Instead of redirecting from thread to message URL when no threads are found, just display the messages inline. This prevents the irritating URL rewrite while the result is the same. Bug: https://bugs.gentoo.org/656386
Diffstat (limited to 'views')
-rw-r--r--views/listmonth.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/views/listmonth.erb b/views/listmonth.erb
index 9f137f0..b7ef11c 100644
--- a/views/listmonth.erb
+++ b/views/listmonth.erb
@@ -6,7 +6,7 @@
<%= partial :views, locals: { list: list, mode: mode } %>
-<% if params[:no_threads] %>
+<% if no_threads %>
<div class="alert alert-info">
There were no threads that started this month, showing you all messages instead.
</div>
@@ -29,4 +29,4 @@
</table>
</div>
-<%= partial :pagination, locals: { current_page: current_page, max_pages: max_pages } %> \ No newline at end of file
+<%= partial :pagination, locals: { current_page: current_page, max_pages: max_pages } %>