Skip to content

Commit 0f046a2

Browse files
committed
fixed highlighting of the selected period on the spam profiles mod tool page
1 parent 97bd69a commit 0f046a2

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

app/views/moderator/spammy_users.html.erb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
<button type="button" class="button is-muted is-outlined js-bulk-check" data-check="none">Clear all</button>
1313
</div>
1414
<div class="button-list is-gutterless">
15-
<%= link_to '24 hours', query_url(period: 'day'), class: 'button is-muted is-outlined' %>
16-
<%= link_to '7 days', query_url(period: 'week'), class: 'button is-muted is-outlined' %>
17-
<%= link_to '30 days', query_url(period: 'month'), class: 'button is-muted is-outlined' %>
15+
<%= link_to '24 hours',
16+
query_url(period: 'day'),
17+
class: "button is-muted is-outlined#{' is-active' if params[:period] == 'day'}" %>
18+
<%= link_to '7 days',
19+
query_url(period: 'week'),
20+
class: "button is-muted is-outlined#{' is-active' if params[:period] == 'week'}" %>
21+
<%= link_to '30 days',
22+
query_url(period: 'month'),
23+
class: "button is-muted is-outlined#{' is-active' if params[:period].blank? || params[:period] == 'month'}" %>
1824
</div>
1925
</div>
2026

0 commit comments

Comments
 (0)