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:
Henne Vogelsang 2014-11-25 10:47:18 +01:00
parent f6a87331be
commit 28063129c7
133 changed files with 1461 additions and 1461 deletions

View file

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