views for call for booths

This commit is contained in:
nasia 2017-06-26 18:24:32 +03:00
parent 60ec569553
commit 5734c90d1e
9 changed files with 61 additions and 115 deletions

View file

@ -10,8 +10,7 @@
= f.input :reasoning, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true
= responsibles_selector_input f
= f.input :logo_link, as: :string, required: true
%p.text-right
- if @booth.new_record?
= f.submit 'Create Booth Request', class: 'btn btn-success'

View file

@ -1,6 +1,7 @@
.row
.col-md-12
%h3
= image_tag(@booth.gravatar_url(size: '48'))
= @booth.title
.btn-group.pull-right
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary'

View file

@ -1,19 +1,12 @@
= 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'
.row
.col-md-12
.page-header
%h1 Call for Booths
.row
.col-md-8
= semantic_form_for(@call_for_booth, url: admin_conference_call_for_booths_path(@conference.short_title), html: {multipart: true}) do |f|
= f.input :start_date, as: :string, input_html: { id: 'registration-period-start-datepicker', start_date: @conference.start_date, end_date: @conference.end_date, readonly: 'readonly' }
= f.input :end_date, as: :string, input_html: { id: 'registration-period-end-datepicker', readonly: 'readonly' }
= f.input :booth_limit
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

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

View file

@ -1,15 +1,36 @@
%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
.row
.col-md-12
.page-header
%h1 Call for Booths
%p.text-muted
Call for people to submit booth requests to your conference
- if @call_for_booth
.row
.col-md-8
%dl.dl-horizontal
%dt
Start Date
%dd
= @call_for_booth.start_date.strftime('%A, %B %-d. %Y')
%dt
End Date
%dd
= @call_for_booth.end_date.strftime('%A, %B %-d. %Y')
%dt
Days Left
%dd
= pluralize(@call_for_booth.remaining_days, 'day')
%dt
Maximum Booths
%dd
= @call_for_booth.booth_limit
.row
.col-md-12.text-right
= link_to(edit_admin_conference_call_for_booths_path(@conference.short_title), class: 'btn btn-primary') do
Edit
= link_to(admin_conference_call_for_booths_path(@conference.short_title), method: 'delete', class: 'btn btn-danger', data: {confirm: 'Are you sure you want to delete the Call for Booths?'}) do
Delete
- else
.row
.col-md-12.text-right
= link_to 'Create new Call for Pappers', new_admin_conference_call_for_booths_path(@conference.short_title), class: 'btn btn-primary'