From 710a64eeffac75060255f4a0c93083c9c309f04d Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 19 Oct 2017 16:22:02 +0300 Subject: [PATCH] Add filter links to events index --- app/views/management/events/index.html.slim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/views/management/events/index.html.slim b/app/views/management/events/index.html.slim index 8c5d6b2..b1472ea 100644 --- a/app/views/management/events/index.html.slim +++ b/app/views/management/events/index.html.slim @@ -71,6 +71,24 @@ = link_to management_conference_events_path(current_conference, filters: @filters.merge({status: status_id})) = t "activerecord.attributes.proposition.statuses.#{status_name}" span.badge.pull-right = current_conference.events.joins(:proposition).where(propositions: {status: status_id}).count + .panel.panel-default + .panel-heading + = Proposition.human_attribute_name(:confirmed) + .panel-body + ul.nav.nav-pills.nav-stacked + = content_tag :li, role: "presentation", class: @filters[:confirmed].blank? && @filters[:not_confirmed].blank? ? 'active' : nil + = link_to management_conference_events_path(current_conference, filters: @filters.except(:confirmed, :not_confirmed)) + = t '.all' + span.badge.pull-right = current_conference.events.count + = content_tag :li, role: "presentation", class: @filters[:confirmed].present? ? 'active' : nil + = link_to management_conference_events_path(current_conference, filters: @filters.except(:not_confirmed).merge({confirmed: true})) + = t "activerecord.attributes.proposition.confirmation.confirmed" + span.badge.pull-right = current_conference.events.joins(:proposition).approved.where.not(propositions: {confirmed_at: nil}).count + = content_tag :li, role: "presentation", class: @filters[:not_confirmed].present? ? 'active' : nil + = link_to management_conference_events_path(current_conference, filters: @filters.except(:confirmed).merge({not_confirmed: true})) + = t "activerecord.attributes.proposition.confirmation.not_confirmed" + span.badge.pull-right = current_conference.events.joins(:proposition).approved.where(propositions: {confirmed_at: nil}).count + .col-md-9 .panel.panel-default table.table.table-striped.table-hover.record-table