summaryrefslogtreecommitdiff
path: root/app/views/forums/show.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/forums/show.html.erb')
-rw-r--r--app/views/forums/show.html.erb13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb
index 60f3185..9dcdad8 100644
--- a/app/views/forums/show.html.erb
+++ b/app/views/forums/show.html.erb
@@ -1,8 +1,15 @@
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= @forum %>
-<h1><%= title @forum %></h1>
+<h1>
+ <%= title @forum %>
+ <% params[:id] = params[:id].split("-")[0] %>
+ <%= link_to "Search Threads", forumthreads_path(params.except("action", "controller")), class: "btn blue right" %>
+</h1>
<% if @forum.can_write?(current_user) %>
- <p><%= link_to "New thread", new_forumthread_path(forum: @forum), class: "btn blue" %></p>
+ <p>
+ <%= link_to "New thread", new_forumthread_path(forum: @forum), class: "btn blue" %>
+ <% params[:id] = params[:id].split("-")[0] %>
+ </p>
<% end %>
<% if @forum.role_read && @forum.role_write && @forum.role_write < @forum.role_read %>
@@ -51,4 +58,4 @@
</div>
<% end %>
<%= paginate @threads %>
-</div> \ No newline at end of file
+</div>