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
%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

View file

@ -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