Added carousel component to take photos in Conference#edit
This commit is contained in:
parent
d9818f2749
commit
b10b43ac7a
3 changed files with 12 additions and 1 deletions
|
|
@ -10,7 +10,8 @@ class Conference < ActiveRecord::Base
|
|||
:difficulty_levels_attributes, :use_difficulty_levels,
|
||||
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
||||
:media_id, :media_type, :color, :description,
|
||||
:registration_description, :ticket_description
|
||||
:registration_description, :ticket_description,
|
||||
:photos_attributes
|
||||
|
||||
has_paper_trail
|
||||
|
||||
|
|
@ -46,6 +47,7 @@ class Conference < ActiveRecord::Base
|
|||
accepts_nested_attributes_for :questions, :allow_destroy => true
|
||||
accepts_nested_attributes_for :vdays, :allow_destroy => true
|
||||
accepts_nested_attributes_for :vpositions, :allow_destroy => true
|
||||
accepts_nested_attributes_for :photos, allow_destroy: true
|
||||
|
||||
has_attached_file :logo,
|
||||
:styles => {:thumb => "100x100>", :large => "300x300>" }
|
||||
|
|
|
|||
7
app/views/admin/conference/_photo_fields.html.erb
Normal file
7
app/views/admin/conference/_photo_fields.html.erb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :picture %>
|
||||
<%= f.input :description, :input_html => {:rows => 2 } %>
|
||||
<%= remove_association_link :photo, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
@ -17,6 +17,8 @@
|
|||
= f.input :registration_description, hint: 'This description will appear in registration segment of the splash'
|
||||
= f.input :ticket_description, hint: 'This will appear in the Tickets segment of the splash'
|
||||
|
||||
= dynamic_association :photos, "Photos", f
|
||||
|
||||
= f.inputs :name => "Media" do
|
||||
- if !@conference.logo.blank?
|
||||
= image_tag @conference.logo(:thumb)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue