Skip to content

Commit

Permalink
add sort_link helper to views
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Apr 22, 2024
1 parent 86c4281 commit dad30e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def index
@tokens = paginate(tokens.order(created_at: :desc))
end

def collection
end

def new
enforce_permission_to :create, :anonymous_code_token

Expand Down
8 changes: 4 additions & 4 deletions app/views/decidim/anonymous_codes/admin/codes/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<table class="table-list">
<thead>
<tr>
<th><%= t(".token") %></th>
<th><%= t(".available") %></th>
<th><%= t(".used") %></th>
<th><%= t(".usage_count") %></th>
<th><%= sort_link(query, :token, t(".token")) %></th>
<th><%= sort_link(query, :available, t(".available")) %></th>
<th><%= sort_link(query, :used, t(".used")) %></th>
<th><%= sort_link(query, :usage_count, t(".usage_count")) %></th>
<th></th>
</tr>
</thead>
Expand Down

0 comments on commit dad30e6

Please sign in to comment.