You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
2.1 KiB
35 lines
2.1 KiB
8 years ago
|
- unless @location.present?
|
||
|
%ul.locations.admin-blocks
|
||
|
- @locations.each do | location |
|
||
|
%li
|
||
|
%h4.title=location.title
|
||
|
.details
|
||
|
= data_set(:h5, 'forms.labels.generic.address', class: :address) do
|
||
|
=location.address
|
||
|
= data_set(:h5, 'articles.workshops.headings.space', class: :space) do
|
||
|
= _"workshop.options.space.#{location.space}"
|
||
|
- amenities = location.amenities.present? ? JSON.parse(location.amenities) : []
|
||
|
- if amenities.present?
|
||
|
= data_set(:h5, 'articles.admin.locations.headings.amenities', class: :amenities) do
|
||
|
%ul.amenities
|
||
|
- amenities.each do | amenity |
|
||
|
%li=_"workshop.options.needs.#{amenity}"
|
||
|
= form_tag administration_update_path(@this_conference.slug, :locations), class: [:actions, :fill] do
|
||
|
= hidden_field_tag :id, location.id
|
||
|
= button_tag :edit, value: :edit, class: :small
|
||
|
= button_with_confirmation :delete, (_'modals.admin.generic.delete.confirm', :p, vars: { title: location.title }), value: :delete, class: [:delete, :small]
|
||
|
%h4=_"articles.admin.locations.headings.#{@location.present? ? 'edit' : 'add'}_location", :t
|
||
|
= form_tag administration_update_path(@this_conference.slug, :locations) do
|
||
|
= hidden_field_tag :id, @location.id if @location.present?
|
||
|
= textfield :title, @location.present? ? @location.title : nil, required: true, big: true
|
||
|
= textfield :address, @location.present? ? @location.address : nil, required: true
|
||
|
= columns(medium: 6) do
|
||
|
= radiobuttons :space, EventLocation.all_spaces, @location.present? ? @location.space : nil, 'workshop.options.space', vertical: true, heading: 'articles.workshops.headings.space'
|
||
|
= columns(medium: 6) do
|
||
|
= checkboxes :needs, EventLocation.all_amenities, @location.present? ? JSON.parse(@location.amenities) : [], 'workshop.options.needs', vertical: true, heading: 'articles.admin.locations.headings.amenities'
|
||
|
.actions.next-prev
|
||
|
- if @location.present?
|
||
|
= button_tag :save, value: :save
|
||
|
= button_tag :cancel, value: :cancel, class: :subdued, formnovalidate: true
|
||
|
- else
|
||
|
= button_tag :create, value: :create
|