osem-fcy/app/views/admin/booths/index.html.haml
2017-06-26 22:15:49 +03:00

54 lines
2 KiB
Text

.row
.col-md-12
.page-header
%h1
Booths
= "(#{@booths.length})" if @booths.any?
.pull-right
- if can? :create, Booth
= link_to 'Add Booth', new_admin_conference_booth_path(@conference.short_title), class: 'button btn btn-default btn-info'
%p.text-muted
All the booth requests
.row
.col-md-12
.margin-event-table
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th
%b ID
%th
%b Title
%th
%b Submitter
%th
%b Responsibles
%th
%b State
%th
%b Actions
- @booths.each do |booth|
%tr
%td
= booth.id
%td
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
%td
= booth.submitter.name if booth.submitter
%td
- booth.responsibles.each do |responsibles|
.responsibles
= link_to responsible.name, admin_user_path(responsibles)
%td
.btn-group
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
= booth.state.humanize
%span.caret
%ul.dropdown-menu{ role: 'menu' }
= render 'change_state_dropdown', booth: booth
%td
.btn-group{role: "group"}
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, booth.id),
method: :get, class: 'btn btn-primary'
= link_to 'Delete', admin_conference_booth_path(@conference.short_title, booth.id),
method: :delete, class: 'btn btn-danger',
data: { confirm: "Do you really want to delete #{booth.title}? Attention: This booth will be removed from all Events that have it set" }