diff --git a/app/controllers/decidim/anonymous_codes/admin/codes_controller.rb b/app/controllers/decidim/anonymous_codes/admin/codes_controller.rb index 2c860b1..0250a72 100644 --- a/app/controllers/decidim/anonymous_codes/admin/codes_controller.rb +++ b/app/controllers/decidim/anonymous_codes/admin/codes_controller.rb @@ -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 diff --git a/app/views/decidim/anonymous_codes/admin/codes/index.html.erb b/app/views/decidim/anonymous_codes/admin/codes/index.html.erb index 87db4ad..f4affcb 100644 --- a/app/views/decidim/anonymous_codes/admin/codes/index.html.erb +++ b/app/views/decidim/anonymous_codes/admin/codes/index.html.erb @@ -20,10 +20,10 @@
<%= t(".token") %> | -<%= t(".available") %> | -<%= t(".used") %> | -<%= t(".usage_count") %> | +<%= sort_link(query, :token, t(".token")) %> | +<%= sort_link(query, :available, t(".available")) %> | +<%= sort_link(query, :used, t(".used")) %> | +<%= sort_link(query, :usage_count, t(".usage_count")) %> |
---|