mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 04:04:03 +00:00
Merge pull request #220 from gopesht/adds_carousel_dashboard
Adds admin component for conference photos
This commit is contained in:
commit
0ec673b582
3 changed files with 15 additions and 2 deletions
|
|
@ -19,8 +19,8 @@ class Conference < ActiveRecord::Base
|
|||
:lodging_description, :include_registrations_in_splash,
|
||||
:include_sponsors_in_splash, :include_tracks_in_splash,
|
||||
:include_tickets_in_splash, :include_social_media_in_splash,
|
||||
:include_program_in_splash, :make_conference_public
|
||||
|
||||
:include_program_in_splash, :make_conference_public,
|
||||
:photos_attributes
|
||||
|
||||
has_paper_trail
|
||||
|
||||
|
|
@ -60,6 +60,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>" }
|
||||
|
|
|
|||
10
app/views/admin/conference/_photo_fields.html.erb
Normal file
10
app/views/admin/conference/_photo_fields.html.erb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= image_tag(f.object.picture(:thumb)) unless f.object.picture.blank? %>
|
||||
<%= f.input :picture, hint: 'This photo will appear in the gallery of the splash
|
||||
so please give photos of banner sizes' %>
|
||||
<%= f.input :description, :input_html => {:rows => 2 }, hint: 'This description will appear
|
||||
at the bottom of each photo' %>
|
||||
<%= remove_association_link :photo, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
@ -25,6 +25,8 @@
|
|||
= f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'
|
||||
= f.input :lodging_description, hint: 'This will appear in the lodging segment of the splash'
|
||||
|
||||
= dynamic_association :photos, "Photos", f
|
||||
|
||||
= f.inputs :name => 'Social Media' do
|
||||
- if !@conference.logo.blank?
|
||||
= image_tag @conference.logo(:thumb)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue