Another round of splash design

* Add map to splash
* Reverse venue<->conference relation
* Split venue address into fields
* Don't go through venue for lodgings anymore
This commit is contained in:
Henne Vogelsang 2014-11-20 14:57:03 +01:00
parent 30e8ab856c
commit cb227a0afc
55 changed files with 717 additions and 548 deletions

View file

@ -12,7 +12,8 @@
%dt
Description
%dd
= markdown(@conference.description)
- unless @conference.description.blank?
= markdown(@conference.description)
%dt
Date
%dd

View file

@ -1,8 +1,8 @@
= f.input :name
= f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint("Write about the hotel/place, of what they are offering, about types of rooms, prices and address.")
= image_tag f.object.photo(:thumb) if !f.object.photo.blank?
= f.input :photo
= f.input :website_link
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= link_to 'Back', admin_conference_lodgings_path(@conference.short_title)
= 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' }

View file

@ -1,6 +0,0 @@
%h1
Edit Lodging
.row
.col-md-8
= semantic_form_for(@lodging, :url => admin_conference_lodging_path(@conference.short_title, @lodging)) do |f|
= render partial: 'form', locals: { f: f }

View file

@ -1,5 +1,5 @@
%h1 Lodgings
- if @venue.lodgings.any?
- if @conference.lodgings.any?
.row
.col-md-12
%table.table
@ -9,7 +9,7 @@
%th Edit
%th Delete
%tbody
- @venue.lodgings.each_with_index do |lodging, index|
- @conference.lodgings.each_with_index do |lodging, index|
%tr
%td
= index + 1

View file

@ -1,6 +0,0 @@
%h1
New Lodging
.row
.col-md-8
= semantic_form_for(@lodging, :url => admin_conference_lodgings_path(@conference.short_title, @lodging)) do |f|
= render partial: 'form', locals: { f: f }

View file

@ -1,8 +1,7 @@
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.input :name, input_html: { rows: 1 }
= f.input :address, input_html: { rows: 1 }
= f.input :website
= f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
= f.inputs :street, :postalcode, :city, :country, :longitude, :latitude
- unless @venue.photo.blank?
= image_tag @venue.photo(:thumb)
= f.input :photo

View file

@ -1,38 +0,0 @@
.row{'style'=>'padding-top: 15px;'}
.col-md-6
%dl.dl-horizontal
%dt
Name
%dd
= @venue.name
%dt
Address
%dd
= @venue.address
%dt
Website
%dd
= @venue.website
%dt
Description
%dd
- unless @venue.description.blank?
= markdown(@venue.description)
.row.row-flex.row-flex-wrap
.col-md-4
.thumbnail.flex-col
%h3.text-center
Venue Logo
- if @venue.photo
= image_tag(@venue.photo(:large), class: 'img-responsive')
.caption.flex-grow
.caption
%p
%dl.dl-horizontal
%dt
Filename
%dd
= @venue.photo_file_name
-else
%h4.text-center
Not set!

View file

@ -1,16 +0,0 @@
.row
.col-md-12
%ul.nav.nav-tabs{'role'=>'tablist'}
%li.active
%a{'href'=> '#show', 'role'=>'tab', 'data-toggle'=>'tab'}
Show
%li
%a{'href'=> '#edit', 'role'=>'tab', 'data-toggle'=>'tab'}
Edit
.row
.col-md-8
.tab-content
.tab-pane.active#show
= render partial: 'show'
.tab-pane#edit
= render partial: 'form'

View file

@ -0,0 +1,25 @@
-if @venue
.row
.col-md-6
=image_tag(@conference.venue.photo, class: 'img-responsive img-rounded') unless @conference.venue.photo.blank?
.col-md-6
%address
%strong
= @venue.name
%br
= @venue.street
%br
= "#{@venue.postalcode}, #{@venue.city}"
%br
= @venue.country_name
.row
.col-md-12
= link_to(edit_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
Edit Venue
= link_to(admin_conference_venue_path(@conference.short_title), method: 'delete', class: 'btn btn-danger') do
Delete Venue
-else
.row
.col-md-12
= link_to(new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-success') do
Create Venue