app/views/decidim/meetings/admin/meetings/index.html.erb in decidim-meetings-0.24.3 vs app/views/decidim/meetings/admin/meetings/index.html.erb in decidim-meetings-0.25.0.rc1

- old
+ new

@@ -7,30 +7,49 @@ <%= export_dropdown %> </div> </h2> </div> + <%= admin_filter_selector(:meetings) %> <div class="card-section"> <div class="table-scroll"> <table class="table-list"> <thead> <tr> - <th><%= t("models.meeting.fields.title", scope: "decidim.meetings") %></th> - <th><%= t("models.meeting.fields.start_time", scope: "decidim.meetings") %></th> - <th><%= t("models.meeting.fields.end_time", scope: "decidim.meetings") %></th> - <th><%= t("models.meeting.fields.closed", scope: "decidim.meetings") %></th> - <% if Decidim::Map.available?(:static, :geocoding) %> + <th> + <%= sort_link(query, :id, t("models.meeting.fields.id", scope: "decidim.meetings"), default_order: :desc ) %> + </th> + <th> + <%= sort_link(query, :translated_title, t("models.meeting.fields.title", scope: "decidim.meetings"), default_order: :desc ) %> + </th> + <th> + <%= sort_link(query, :start_time, t("models.meeting.fields.start_time", scope: "decidim.meetings"), default_order: :desc ) %> + </th> + <th> + <%= sort_link(query, :end_time, t("models.meeting.fields.end_time", scope: "decidim.meetings"), default_order: :desc ) %> + </th> + <th> + <%= sort_link(query, :closed, t("models.meeting.fields.closed", scope: "decidim.meetings"), default_order: :desc ) %> + </th> + <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %> <th><%= t("models.meeting.fields.map", scope: "decidim.meetings") %></th> <% end %> - <%= th_resource_scope_label %> + <% if resource_with_scopes_enabled? %> + <th> + <%= sort_link(query, :scope_name, t("models.proposal.fields.scope", scope: "decidim.proposals") ) %> + </th> + <% end %> <th class="actions"><%= t("actions.title", scope: "decidim.meetings") %></th> </tr> </thead> <tbody> <% meetings.each do |meeting| %> <tr data-id="<%= meeting.id %>"> <td> + <%= meeting.id %><br> + </td> + <td> <%= present(meeting).title %><br> </td> <td> <% if meeting.start_time %> <%= l meeting.start_time, format: :long %> @@ -42,42 +61,51 @@ <% end %> </td> <td> <%= humanize_boolean meeting.closed? %> </td> - <% if Decidim::Map.available?(:static, :geocoding) %> + <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %> <td> <%= static_map_link(meeting) %> </td> <% end %> <%= td_resource_scope_for(meeting.scope) %> <td class="table-list__actions"> + <% if allowed_to? :update, :meeting, meeting: meeting %> + <% if meeting.published? %> + <%= icon_link_to "x", unpublish_meeting_path(meeting), t("actions.unpublish", scope: "decidim.admin"), method: :put, class: "action-icon--unpublish", data: { confirm: t("actions.unpublish", scope: "decidim.admin") } %> + <% else %> + <%= icon_link_to "check", publish_meeting_path(meeting), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %> + <% end %> + <% else %> + <span class="action-space icon"></span> + <% end %> + <%= icon_link_to "eye", resource_locator(meeting).path, t("actions.preview", scope: "decidim.meetings"), class: "action-icon--preview", target: :blank %> <% if allowed_to? :copy, :meeting, meeting: meeting %> <%= icon_link_to "clipboard", new_meeting_copy_path(meeting), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %> <% else %> <span class="action-space icon"></span> <% end %> <% if allowed_to? :update, :meeting, meeting: meeting %> <% if meeting.registration_disabled? %> - <%= icon "people", class: "action-icon action-icon--disabled", role: "img" %> + <%= icon "people", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.registrations", scope: "decidim.meetings") %> <% else %> <%= icon_link_to "people", meeting.on_this_platform? ? edit_meeting_registrations_path(meeting) : meeting.registration_url, t("actions.registrations", scope: "decidim.meetings"), class: "action-icon--registrations" %> <% end %> <% end %> <% if allowed_to? :update, :meeting, meeting: meeting %> <%= icon_link_to "pencil", edit_meeting_path(meeting), t("actions.edit", scope: "decidim.meetings"), class: "action-icon--edit" %> - <%= icon_link_to "clock", meeting.minutes.present? ? edit_meeting_minute_path(meeting, meeting.minutes) : new_meeting_minute_path(meeting), t("actions.minutes", scope: "decidim.meetings"), class: "action-icon--minutes" %> <%= icon_link_to "calendar", meeting.agenda.present? ? edit_meeting_agenda_path(meeting, meeting.agenda) : new_meeting_agenda_path(meeting), t("actions.agenda", scope: "decidim.meetings"), class: "action-icon--agenda" %> + <%= icon_link_to "list", edit_meeting_poll_path(meeting), t("actions.manage_poll", scope: "decidim.meetings"), class: "action-icon--manage-poll-questionnaire" %> <% else %> <span class="action-space icon"></span> <span class="action-space icon"></span> <span class="action-space icon"></span> - <span class="action-space icon"></span> <% end %> <% if allowed_to? :close, :meeting, meeting: meeting %> <%= icon_link_to "lock-locked", edit_meeting_meeting_close_path(meeting_id: meeting.id, id: meeting.id), t("actions.close", scope: "decidim.meetings"), class: "action-icon--close" %> <% else %> @@ -126,6 +154,6 @@ <%= paginate meetings, theme: "decidim" %> </div> </div> </div> -<%= javascript_include_tag "decidim/meetings/admin/destroy_meeting_alert" %> +<%= javascript_pack_tag "decidim_meetings_admin" %>