Update partials and views

This commit is contained in:
Rishabh Singh 2019-08-17 18:14:32 +05:30
parent 3c5703cdc6
commit 5bb297ab84
8 changed files with 71 additions and 0 deletions

View 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' }

View file

@ -0,0 +1,2 @@
= render 'form', booth_type: @booth_type, conference: @conference

View 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'

View file

@ -0,0 +1 @@
= render 'form', booth_type: @booth_type, conference: @conference

View file

@ -62,6 +62,8 @@
%b Logo %b Logo
%th %th
%b Title %b Title
%th
%b Type
%th %th
%b Submitter %b Submitter
%th %th
@ -79,6 +81,8 @@
= image_tag(booth.picture.thumb.url, width: '20%') = image_tag(booth.picture.thumb.url, width: '20%')
%td %td
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth) = link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
%td
= booth_type_dropdown(booth, @booth_types, @conference.short_title)
%td %td
= link_to booth.submitter.name, admin_user_path(booth.submitter) if booth.submitter = link_to booth.submitter.name, admin_user_path(booth.submitter) if booth.submitter
%td %td

View file

@ -20,6 +20,11 @@
%b Reasoning %b Reasoning
%td %td
= markdown(@booth.reasoning) = markdown(@booth.reasoning)
%tr
%td.col-md-2
%b Type
%td
= booth_type_dropdown(@booth, @booth_types, @conference.short_title)
%tr %tr
%td.col-md-2 %td.col-md-2
%b Website %b Website

View file

@ -10,6 +10,14 @@
= f.input :submitter_relationship, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true, = f.input :submitter_relationship, input_html: { rows: 5, data: { provide: 'markdown-editable' } }, required: true,
label: 'Submitter\'s relation', label: 'Submitter\'s relation',
hint: 'e.g. employee, comunity manager, etc' 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 = f.input :website_url
= responsibles_selector_input f = responsibles_selector_input f
= f.input :invite_responsible, = f.input :invite_responsible,

View file

@ -21,6 +21,11 @@
%b Reasoning %b Reasoning
%td %td
= markdown(@booth.reasoning) = markdown(@booth.reasoning)
%tr
%td.col-md-2
%b Type
%td
= @booth.booth_type.title
%tr %tr
%td.col-md-2 %td.col-md-2
%b Website %b Website