app/views/decidim/initiatives/admin/initiatives/index.html.erb in decidim-initiatives-0.21.0 vs app/views/decidim/initiatives/admin/initiatives/index.html.erb in decidim-initiatives-0.22.0

- old
+ new

@@ -1,22 +1,26 @@ <div class="card with-overflow" id="initiatives"> <div class="card-divider"> <h2 class="card-title"> <%= t "decidim.admin.titles.initiatives" %> + <div class="button--title"> + <%= render partial: "decidim/initiatives/admin/exports/dropdown" if allowed_to? :export, :initiatives %> + </div> </h2> </div> - <%= admin_filter_selector %> + <%= admin_filter_selector(:initiatives) %> <div class="card-section"> <div class="table-scroll"> <table class="table-list"> <thead> <tr> <th><%= t("models.initiatives.fields.id", scope: "decidim.admin") %></th> <th><%= t("models.initiatives.fields.title", scope: "decidim.admin") %></th> <th><%= t("models.initiatives.fields.state", scope: "decidim.admin") %></th> - <th><%= t("models.initiatives.fields.supports_count", scope: "decidim.admin") %></th> + <th><%= sort_link(query, :supports_count, t("models.initiatives.fields.supports_count", scope: "decidim.admin"), default_order: :desc) %></th> <th><%= sort_link(query, :created_at, t("models.initiatives.fields.created_at", scope: "decidim.admin"), default_order: :desc) %></th> + <th><%= sort_link(query, :published_at, t("models.initiatives.fields.published_at", scope: "decidim.admin"), default_order: :desc) %></th> <th class="actions"><%= t ".actions_title" %></th> </tr> </thead> <tbody> <% @initiatives.each do |initiative| %> @@ -31,10 +35,11 @@ <% end %> </td> <td><%= humanize_admin_state initiative.state %></td> <td><%= initiative.supports_count %>/<%= initiative.scoped_type.supports_required %></td> <td><%= l initiative.created_at, format: :short %></td> + <td><%= initiative.published_at? ? l(initiative.published_at, format: :short) : "" %></td> <td class="table-list__actions"> <% if allowed_to? :preview, :initiative, initiative: initiative %> <%= icon_link_to "eye", decidim_initiatives.initiative_path(initiative.to_param), t(".preview"), @@ -50,10 +55,10 @@ <% end %> <% if allowed_to?(:answer, :initiative, initiative: initiative) %> <%= icon_link_to "comment-square", edit_initiative_answer_path(initiative.slug), t("actions.answer", scope: "decidim.initiatives"), class: "action-icon action-icon--answer" %> <% else %> - <%= icon "comment-square", scope: "decidim.admin", class: "action-icon action-icon--disabled" %> + <%= icon "comment-square", scope: "decidim.admin", class: "action-icon action-icon--disabled", role: "img", "aria-hidden": true %> <% end %> <% if allowed_to? :read, :initiative, initiative: initiative %> <%= icon_link_to "print", decidim_admin_initiatives.initiative_path(initiative.to_param),