Introduce Booths for admin
This commit is contained in:
parent
29aee82a14
commit
f7c0b64eb5
22 changed files with 534 additions and 1 deletions
58
app/views/admin/booths/index.html.haml
Normal file
58
app/views/admin/booths/index.html.haml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
.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-primary'
|
||||
%p.text-muted
|
||||
All the booth requests
|
||||
.row
|
||||
.col-md-12
|
||||
.margin-booth-table
|
||||
%table.table.table-striped.table-bordered.table-hover.datatable
|
||||
%thead
|
||||
%th
|
||||
%b ID
|
||||
%th
|
||||
%b Logo
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Submitter
|
||||
%th
|
||||
%b Responsibles
|
||||
%th
|
||||
%b State
|
||||
%th
|
||||
%b Actions
|
||||
- @booths.each do |booth|
|
||||
%tr
|
||||
%td
|
||||
= booth.id
|
||||
%td
|
||||
= image_tag(booth.picture.thumb.url, width: '20%')
|
||||
%td
|
||||
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
|
||||
%td
|
||||
= link_to booth.submitter.name, admin_user_path(booth.submitter) if booth.submitter
|
||||
%td
|
||||
.responsibles
|
||||
- booth.responsibles.each do |responsible|
|
||||
= link_to responsible.name, admin_user_path(responsible)
|
||||
%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),
|
||||
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 this booth request?"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue