This commit is contained in:
nasia-sam 2017-06-23 08:02:49 +00:00 committed by GitHub
commit 5a178b8dad
32 changed files with 781 additions and 2 deletions

View file

@ -0,0 +1,25 @@
- if booth.transition_possible? :accept
%li= link_to 'Accept booth',
accept_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "accept_booth_#{booth.id}"
- if booth.transition_possible? :reject
%li= link_to 'Reject booth',
reject_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, confirm: 'Are you sure?', id: "reject_booth_#{booth.id}"
- if booth.transition_possible? :restart
%li= link_to 'Start review',
restart_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "restart_booth_#{booth.id}"
- if booth.transition_possible? :to_accept
%li= link_to 'To accept booth',
to_accept_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "to_accept_booth_#{booth.id}"
- if booth.transition_possible? :cancel
%li= link_to 'Cancel booth',
cancel_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "cancel_booth_#{booth.id}"

View file

@ -0,0 +1,17 @@
.row
.col-md-12
.page-header
%title Request a Booth
.row
.col-md-8
= semantic_form_for(@booth, url: admin_conference_booths_path(@conference.short_title), html: {multipart: true}) do |f|
= f.input :title, as: :string, required: true
= f.input :description, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true
= f.input :reasoning, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true
= f.input :logo_link, as: :string, required: true
%p.text-right
- if @booth.new_record?
= f.submit 'Create Booth Request', class: 'btn btn-success'
- else
= f.submit 'Update Booth Request', class: 'btn btn-success'

View file

@ -0,0 +1,3 @@
%h1 Editing booth
= render 'form'

View file

@ -0,0 +1,47 @@
.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 Responsible
%th
%b Secondary Responsible
%th
%b State
- @booths.each do |booth|
%tr
%td
= booth.id
%td
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
%td
a
%td
b
%td
c
%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

View file

@ -0,0 +1,5 @@
%h1 New booth
= render 'form'
= link_to 'Back', admin_conference_booths_path

View file

@ -0,0 +1,20 @@
.row
.col-md-12
%h3
= @booth.title
.btn-group.pull-right
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary'
.row
.col-md-12
%table.table
%tr
%td.col-md-2
%b Description
%td
= @booth.description
%tr
%td.col-md-2
%b Reasoning
%td
= @booth.reasoning

View file

@ -0,0 +1,19 @@
= form_for @call_for_booth do |f|
- if @call_for_booth.errors.any?
#error_explanation
%h2= "#{pluralize(@call_for_booth.errors.count, "error")} prohibited this call_for_booth from being saved:"
%ul
- @call_for_booth.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :start_date
= f.date_select :start_date
.field
= f.label :end_date
= f.date_select :end_date
.field
= f.label :booth_limit
= f.number_field :booth_limit
.actions
= f.submit 'Save'

View file

@ -0,0 +1,7 @@
%h1 Editing call_for_booth
= render 'form'
= link_to 'Show', @call_for_booth
\|
= link_to 'Back', call_for_booths_path

View file

@ -0,0 +1,23 @@
%h1 Listing call_for_booths
%table
%tr
%th Start date
%th End date
%th Booth limit
%th
%th
%th
- @call_for_booths.each do |call_for_booth|
%tr
%td= call_for_booth.start_date
%td= call_for_booth.end_date
%td= call_for_booth.booth_limit
%td= link_to 'Show', call_for_booth
%td= link_to 'Edit', edit_call_for_booth_path(call_for_booth)
%td= link_to 'Destroy', call_for_booth, :method => :delete, :data => { :confirm => 'Are you sure?' }
%br
= link_to 'New Call for booth', new_call_for_booth_path

View file

@ -0,0 +1,5 @@
%h1 New call_for_booth
= render 'form'
= link_to 'Back', call_for_booths_path

View file

@ -0,0 +1,15 @@
%p#notice= notice
%p
%b Start date:
= @call_for_booth.start_date
%p
%b End date:
= @call_for_booth.end_date
%p
%b Booth limit:
= @call_for_booth.booth_limit
= link_to 'Edit', edit_call_for_booth_path(@call_for_booth)
\|
= link_to 'Back', call_for_booths_path