osem-fcy/app/views/admin/venues/_form.html.haml

26 lines
1.1 KiB
Text
Raw Normal View History

.row
.col-md-12
.page-header
%h1 Venue
.row
.col-md-8
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
2015-06-15 12:19:13 +03:00
= f.inputs :street, :postalcode, :city, :country, :latitude, :longitude
- unless @venue.photo.blank?
= image_tag @venue.photo(:thumb)
= f.input :photo
%label
Additional photos
- @venue.venue_photos.in_groups_of(4, false).each do |photo_group|
.row
- photo_group.each do |photo|
.col-md-3
= image_tag photo.photo(:thumb)
= link_to "Delete", admin_conference_venue_photo_path(@conference.short_title, photo), method: :delete, class: 'btn btn-default', data: { confirm: 'really delete this photo ?' }
%br
= file_field_tag "venue_photos[]", type: :file, multiple: true
%br
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }