clarion/app/views/management/events/index.html.slim

107 lines
6.1 KiB
Plaintext
Raw Permalink Normal View History

2016-10-07 04:42:01 +03:00
- content_for :title
= Event.model_name.human(count: 2).mb_chars.capitalize
2015-07-14 21:00:02 +03:00
.row
.col-lg-12
h1.page-header
= Event.model_name.human(count: 2).mb_chars.titleize
2016-10-09 03:09:31 +03:00
small<
| (
2019-05-05 00:23:53 +03:00
= t '.total', current: @events.size, total: @conference.events.size
=< Event.model_name.human(count: @conference.events.size)
2016-10-09 03:09:31 +03:00
| )
.row.visible-sm
.col-xs-12
= link_to t('.filters'), '#filters', aria_expanded: true, aria_controls: 'filters', data: {toggle: 'collapse'}, role: 'button', class: 'btn btn-info'
2015-10-15 19:06:41 +03:00
.row
2016-10-10 19:14:40 +03:00
.col-md-3.collapse#filters
.panel.panel-default
.panel-heading
= EventType.model_name.human.mb_chars.titleize
.panel-body
ul.nav.nav-pills.nav-stacked
= content_tag :li, role: "presentation", class: @filters[:event_type_id].blank? ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:event_type_id))
= t '.all'
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.size
- @conference.event_types.each do |event_type|
= content_tag :li, role: "presentation", class: @filters[:event_type_id].to_i == event_type.id ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.merge({event_type_id: event_type.id}))
= event_type.name
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.where(event_type: event_type).size
.panel.panel-default
.panel-heading
= Event.human_attribute_name(:track)
.panel-body
ul.nav.nav-pills.nav-stacked
2016-10-08 20:42:51 +03:00
= content_tag :li, role: "presentation", class: @filters[:track_id].blank? ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:track_id))
= t '.all'
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.size
- @conference.tracks.each do |track|
2016-10-08 20:42:51 +03:00
= content_tag :li, role: "presentation", class: @filters[:track_id] == track.id.to_s ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.merge({track_id: track.id}))
= track.name
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.where(track: track).size
.panel.panel-default
.panel-heading
= Event.human_attribute_name(:language)
.panel-body
ul.nav.nav-pills.nav-stacked
= content_tag :li, role: "presentation", class: @filters[:language].blank? ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:language))
= t '.all'
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.size
- I18n.available_locales.map(&:to_s).each do |language|
= content_tag :li, role: "presentation", class: @filters[:language] == language ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.merge({language: language}))
= t("locales.#{language}")
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.where(language: language).size
.panel.panel-default
.panel-heading
= Proposition.human_attribute_name(:status)
.panel-body
ul.nav.nav-pills.nav-stacked
= content_tag :li, role: "presentation", class: @filters[:status].blank? ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:status))
= t '.all'
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.size
- Proposition.statuses.each do |status_name, status_id|
= content_tag :li, role: "presentation", class: @filters[:status] == status_id.to_s ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.merge({status: status_id}))
= t "activerecord.attributes.proposition.statuses.#{status_name}"
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.joins(:proposition).where(propositions: {status: status_id}).size
2017-10-19 16:22:02 +03:00
.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
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:confirmed, :not_confirmed))
2017-10-19 16:22:02 +03:00
= t '.all'
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.size
2017-10-19 16:22:02 +03:00
= content_tag :li, role: "presentation", class: @filters[:confirmed].present? ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:not_confirmed).merge({confirmed: true}))
2017-10-19 16:22:02 +03:00
= t "activerecord.attributes.proposition.confirmation.confirmed"
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.joins(:proposition).approved.where.not(propositions: {confirmed_at: nil}).size
2017-10-19 16:22:02 +03:00
= content_tag :li, role: "presentation", class: @filters[:not_confirmed].present? ? 'active' : nil
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters.except(:confirmed).merge({not_confirmed: true}))
2017-10-19 16:22:02 +03:00
= t "activerecord.attributes.proposition.confirmation.not_confirmed"
2019-05-05 00:23:53 +03:00
span.badge.pull-right = @conference.events.joins(:proposition).approved.where(propositions: {confirmed_at: nil}).size
2017-10-19 16:22:02 +03:00
2016-10-10 19:14:40 +03:00
.col-md-9
.panel.panel-default
2016-10-08 20:43:12 +03:00
table.table.table-striped.table-hover.record-table
thead
tr
th = Event.model_name.human.mb_chars.titleize
2016-10-08 21:19:42 +03:00
th.visible-md.visible-lg.visible-xl = Event.human_attribute_name(:participants)
th.action
= Event.human_attribute_name(:status)
th.actions
tbody
= render(partial: 'event', collection: @events) || render(partial: 'no_records')
2016-10-08 21:19:42 +03:00
.panel-footer.text-right
2019-05-05 00:23:53 +03:00
= link_to management_conference_events_path(@conference, filters: @filters, format: 'csv'), class: 'btn btn-info'
2016-10-08 21:19:42 +03:00
= icon :download, t('.export')