Update partials and views
This commit is contained in:
parent
3c5703cdc6
commit
5bb297ab84
8 changed files with 71 additions and 0 deletions
17
app/views/admin/booth_types/_form.html.haml
Normal file
17
app/views/admin/booth_types/_form.html.haml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
- if booth_type.new_record?
|
||||
New
|
||||
#{(t'booth').capitalize} Type
|
||||
= booth_type.title
|
||||
.row
|
||||
.col-md-12
|
||||
= semantic_form_for(booth_type,
|
||||
url: (booth_type.new_record? ? admin_conference_program_booth_types_path : admin_conference_program_booth_type_path(conference,
|
||||
booth_type))) do |f|
|
||||
= f.input :title, input_html: { autofocus: true }
|
||||
= f.input :description
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
2
app/views/admin/booth_types/edit.html.haml
Normal file
2
app/views/admin/booth_types/edit.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
= render 'form', booth_type: @booth_type, conference: @conference
|
||||
|
||||
29
app/views/admin/booth_types/index.html.haml
Normal file
29
app/views/admin/booth_types/index.html.haml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 #{(t'booth').capitalize} Types
|
||||
%p.text-muted
|
||||
The different types of #{(t 'booth').pluralize} in your conference
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#track-types
|
||||
%thead
|
||||
%th Title
|
||||
%th Description
|
||||
%th Actions
|
||||
%tbody
|
||||
- @conference.program.booth_types.each do |booth_type|
|
||||
%tr
|
||||
%td
|
||||
= booth_type.title
|
||||
%td
|
||||
= booth_type.description
|
||||
%td
|
||||
.btn-group{ role: 'group' }
|
||||
= link_to 'Edit', edit_admin_conference_program_booth_type_path(@conference.short_title, booth_type.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_conference_program_booth_type_path(@conference.short_title, booth_type.id),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{booth_type.title}?" }
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= link_to "Add #{(t'booth').capitalize} Type", new_admin_conference_program_booth_type_path(@conference.short_title), class: 'btn btn-primary'
|
||||
1
app/views/admin/booth_types/new.html.haml
Normal file
1
app/views/admin/booth_types/new.html.haml
Normal file
|
|
@ -0,0 +1 @@
|
|||
= render 'form', booth_type: @booth_type, conference: @conference
|
||||
|
|
@ -62,6 +62,8 @@
|
|||
%b Logo
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Type
|
||||
%th
|
||||
%b Submitter
|
||||
%th
|
||||
|
|
@ -79,6 +81,8 @@
|
|||
= image_tag(booth.picture.thumb.url, width: '20%')
|
||||
%td
|
||||
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
|
||||
%td
|
||||
= booth_type_dropdown(booth, @booth_types, @conference.short_title)
|
||||
%td
|
||||
= link_to booth.submitter.name, admin_user_path(booth.submitter) if booth.submitter
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@
|
|||
%b Reasoning
|
||||
%td
|
||||
= markdown(@booth.reasoning)
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Type
|
||||
%td
|
||||
= booth_type_dropdown(@booth, @booth_types, @conference.short_title)
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Website
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@
|
|||
= f.input :submitter_relationship, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
|
||||
label: 'Submitter\'s relation',
|
||||
hint: 'e.g. employee, comunity manager, etc'
|
||||
|
||||
= f.input :booth_type_id, as: :select,
|
||||
collection: conference.program.booth_types.map {|type| ["#{type.title}", type.id]},
|
||||
include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' } if conference.program.booth_types.any?
|
||||
|
||||
- conference.program.booth_types.each do |booth_type|
|
||||
%span{ class: 'help-block select-help-text booth_booth_type_id collapse', id: "#{booth_type.id}-help" }
|
||||
= booth_type.description
|
||||
= f.input :website_url
|
||||
= responsibles_selector_input f
|
||||
= f.input :invite_responsible,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
%b Reasoning
|
||||
%td
|
||||
= markdown(@booth.reasoning)
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Type
|
||||
%td
|
||||
= @booth.booth_type.title
|
||||
%tr
|
||||
%td.col-md-2
|
||||
%b Website
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue