Skip to content

Commit 1853292

Browse files
committed
fixed 'all events' filter tab not being visually selectable on the user activity tab
1 parent 7679552 commit 1853292

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

app/views/users/activity.html.erb

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,28 @@
77
<h1>Activity for <%= user_link @user %></h1>
88

99
<div class="button-list is-gutterless h-m-v-4">
10-
<a class="button is-muted is-outlined" href="?" role="button">
11-
Show all events
10+
<a class="button is-muted is-outlined <%= 'is-active' unless params[:filter].present? %>"
11+
href="<%= user_activity_path %>"
12+
role="button">
13+
All events
1214
</a>
13-
<a class="button is-muted is-outlined <%= params[:filter] == 'posts' ? 'is-active' : '' %>" href="?filter=posts" role="button">
15+
<a class="button is-muted is-outlined <%= 'is-active' if params[:filter] == 'posts' %>"
16+
href="<%= user_activity_path(filter: :posts) %>"
17+
role="button">
1418
Posts
1519
<% if @posts > 0 %><span class="badge is-status"><%= @posts %></span>
1620
<% end %>
1721
</a>
18-
<a class="button is-muted is-outlined <%= params[:filter] == 'comments' ? 'is-active' : '' %>" href="?filter=comments" role="button">
22+
<a class="button is-muted is-outlined <%= 'is-active' if params[:filter] == 'comments' %>"
23+
href="<%= user_activity_path(filter: :comments) %>"
24+
role="button">
1925
Comments
2026
<% if @comments > 0 %><span class="badge is-status"><%= @comments %></span>
2127
<% end %>
2228
</a>
23-
<a class="button is-muted is-outlined <%= params[:filter] == 'edits' ? 'is-active' : '' %>" href="?filter=edits" role="button">
29+
<a class="button is-muted is-outlined <%= 'is-active' if params[:filter] == 'edits' %>"
30+
href="<%= user_activity_path(filter: :edits) %>"
31+
role="button">
2432
Edits
2533
<% if @all_edits > 0 %><span class="badge is-status"><%= @all_edits %></span>
2634
<% end %>

0 commit comments

Comments
 (0)