Implement consistent admin interface
* Consistent route/model/controller/view layout * Get rid of unused photos, speakers, dietchoices, social_events controllers * Drop unused :public from Rooms and :description from CallForPapers
This commit is contained in:
parent
f6a87331be
commit
28063129c7
133 changed files with 1461 additions and 1461 deletions
|
|
@ -1,8 +1,19 @@
|
|||
= semantic_form_for(@lodging, :url => (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f|
|
||||
= f.input :name
|
||||
= f.input :website_link
|
||||
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
|
||||
- unless @lodging.photo.blank?
|
||||
= image_tag @lodging.photo(:thumb)
|
||||
= f.input :photo
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
- if @lodging.new_record?
|
||||
New
|
||||
Lodging
|
||||
= @lodging.name
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@lodging, :url => (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f|
|
||||
= f.input :name
|
||||
= f.input :website_link
|
||||
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
|
||||
- unless @lodging.photo.blank?
|
||||
= image_tag @lodging.photo(:thumb)
|
||||
= f.input :photo
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -1,26 +1,35 @@
|
|||
%h1 Lodgings
|
||||
- if @conference.lodgings.any?
|
||||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Lodgings
|
||||
%p.text-muted
|
||||
Recommended some Hotels, Motels, Hostels or Campsites around your venue
|
||||
|
||||
- @conference.lodgings.each_slice(3) do |slice|
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table
|
||||
%thead
|
||||
%th #
|
||||
%th Name
|
||||
%th Edit
|
||||
%th Delete
|
||||
%tbody
|
||||
- @conference.lodgings.each_with_index do |lodging, index|
|
||||
%tr
|
||||
%td
|
||||
= index + 1
|
||||
%td
|
||||
= link_to lodging.name, admin_conference_lodging_path(@conference.short_title, lodging.id)
|
||||
%td
|
||||
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, lodging.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
%td
|
||||
= link_to 'Delete', admin_conference_lodging_path(@conference.short_title, lodging.id),
|
||||
- slice.each do |lodging|
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
- if lodging.photo.blank?
|
||||
%p.text-center
|
||||
%i.fa.fa-home.fa-5x
|
||||
- else
|
||||
-if lodging.website_link.present?
|
||||
= link_to(lodging.website_link, class: 'thumbnail') do
|
||||
= image_tag lodging.photo(:thumb), class: 'img-responsive img-lodging'
|
||||
- else
|
||||
= image_tag lodging.photo(:thumb), class: 'img-responsive img-lodging'
|
||||
.caption
|
||||
%h3.text-center
|
||||
= lodging.name
|
||||
-if lodging.description.present?
|
||||
= markdown(lodging.description)
|
||||
.actions.text-right
|
||||
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, lodging), class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_conference_lodging_path(@conference.short_title, lodging),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the lodging #{lodging.name}?" }
|
||||
|
||||
= link_to 'Add Lodging', new_admin_conference_lodging_path(@conference.short_title), class: 'btn btn-success'
|
||||
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= link_to 'Add Lodging', new_admin_conference_lodging_path(@conference.short_title), class: 'btn btn-primary'
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
%h1
|
||||
= @lodging.name
|
||||
- unless @lodging.photo.blank? || @lodging.description.blank? || @lodging.website_link.blank?
|
||||
.div.thumbnail
|
||||
- unless @lodging.photo.blank?
|
||||
= image_tag @lodging.photo(:large), class: 'img-responsive'
|
||||
- unless @lodging.description.blank?
|
||||
.lead.text-center #{ markdown(@lodging.description) }
|
||||
- unless @lodging.website_link.blank?
|
||||
.text-center
|
||||
= link_to 'Go to Website', @lodging.website_link
|
||||
|
||||
= link_to 'Edit', edit_admin_conference_lodging_path(@conference.short_title, @lodging.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
|
||||
= link_to 'Back', admin_conference_lodgings_path(@conference.short_title)
|
||||
Loading…
Add table
Add a link
Reference in a new issue