osem-fcy/app/views/admin/booths/index.html.haml
2019-08-18 22:59:41 +05:30

70 lines
3.5 KiB
Text

.row
.col-md-12
.page-header
%h1
#{(t'booth').pluralize.capitalize }
.pull-right
- if can? :read, Booth
.btn-group
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export PDF
%span.caret
%ul.dropdown-menu{ role: 'menu' }
%li= link_to "All #{(t'booth').pluralize.capitalize }", admin_conference_booths_path(@conference.short_title, format: :pdf, booth_export_option: 'all')
%li= link_to "Confirmed #{(t'booth').pluralize.capitalize }", admin_conference_booths_path(@conference.short_title, format: :pdf, booth_export_option: 'confirmed')
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export CSV
%span.caret
%ul.dropdown-menu{ role: 'menu' }
%li= link_to 'All', admin_conference_booths_path(@conference.short_title, format: :csv, booth_export_option: 'all')
%li= link_to 'Confirmed', admin_conference_booths_path(@conference.short_title, format: :csv, booth_export_option: 'confirmed')
.btn-group
%button.btn.btn-default.dropdown-toggle{ 'data-toggle' => 'dropdown', type: 'button', class: 'btn btn-success' }
Export XLS
%span.caret
%ul.dropdown-menu{ role: 'menu' }
%li= link_to 'All', admin_conference_booths_path(@conference.short_title, format: :xlsx, booth_export_option: 'all')
%li= link_to 'Confirmed', admin_conference_booths_path(@conference.short_title, format: :xlsx, booth_export_option: 'confirmed')
= "(#{@booths.length})" if @booths.any?
%p.text-muted
All the #{t'booth'} requests
.tabbable
%ul.nav.nav-tabs
%li.active
= link_to "All #{(t 'booth').pluralize}", '#all-stands', 'data-toggle' => 'tab'
%li
= link_to "Combined #{(t 'booth').pluralize}", '#combined-stands', 'data-toggle' => 'tab'
.tab-content
#all-stands.tab-pane.active
= render 'booths'
#combined-stands.tab-pane
.col-md-12
%table.datatable
%thead
%th ID
%th Title
%th #{(t 'booth').pluralize.capitalize}
%th Actions
%tbody
- @booth_groups.each do |booth_group|
%tr
%td
= booth_group.id
%td
= booth_group.name
%td
- booth_group.booths.each do |booth|
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
%td
.btn-group{ role: 'group' }
= link_to 'Edit', edit_admin_conference_program_booth_group_path(@conference.short_title, booth_group.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_program_booth_group_path(@conference.short_title, booth_group.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{booth_group.name}?" }
.row
.col-md-12.text-right
= link_to "Create #{(t 'booth').capitalize} Group", new_admin_conference_program_booth_group_path(@conference.short_title), class: 'btn btn-primary'