parent
850beb72e1
commit
2a731e8350
31 changed files with 491 additions and 57 deletions
9
app/views/admin/commercials/_form.html.haml
Normal file
9
app/views/admin/commercials/_form.html.haml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
= f.input :commercial_type, as: :select, label: 'Conference Promo Media Type', class: 'form-control', collection: CONFIG['commercial_types'].values, include_blank: false, hint: 'This media-item will be used to represent this conference at various places in OSEM.'
|
||||
= f.input :commercial_id, label: 'Conference Promo Media ID', as: :string
|
||||
%p{ class: 'help-block media-type', id: 'youtube-help' } Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/"
|
||||
%p{ class: 'help-block media-type', id: 'slideshare-help', style: 'display:none' } Go to your SlideShare, click on "share" -> "embed" and copy the id
|
||||
%p{ class: 'help-block media-type', id: 'flickr-help', style: 'display:none' } Go to your flickr image, click on "Grab the link" -> "Show short url" and copy everything behind https://flic.kr/p/
|
||||
%p{ class: 'help-block media-type', id: 'vimeo-help', style: 'display:none' } Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/
|
||||
%p{ class: 'help-block media-type', id: 'speakerdeck-help', style: 'display:none' } Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id
|
||||
%p{ class: 'help-block media-type', id: 'instagram-help', style: 'display:none' } Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol)
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
8
app/views/admin/commercials/edit.html.haml
Normal file
8
app/views/admin/commercials/edit.html.haml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
%h1 Editing Commercial
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for @commercial, url: admin_conference_commercial_path(conference_id: @conference.short_title, id: @commercial.id) do |f|
|
||||
= render 'form', f: f
|
||||
|
||||
= link_to 'Back', admin_conference_commercials_path
|
||||
21
app/views/admin/commercials/index.html.haml
Normal file
21
app/views/admin/commercials/index.html.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
%h1 Commercials
|
||||
|
||||
%p.text-muted
|
||||
You can add commercials for your conference. These commercials will be displayed on the event detail site if
|
||||
the event submitter doesn't add a commercial. Currently supported commercial types are YouTube, Vimeo, Instagram
|
||||
Flickr, Speakerdeck and SlideShare.
|
||||
|
||||
- @commercials.each_slice(3) do |slice|
|
||||
.row
|
||||
- slice.each do |commercial|
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
%h3.text-center
|
||||
= commercial.commercial_type
|
||||
.flexvideo
|
||||
= render partial: 'shared/media_item', locals: { commercial_type: commercial.commercial_type, commercial_id: commercial.commercial_id }
|
||||
= link_to 'Edit', edit_admin_conference_commercial_path(@conference.short_title, commercial.id), class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_conference_commercial_path(@conference.short_title, commercial.id),
|
||||
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
|
||||
%br
|
||||
= link_to 'New Commercial', new_admin_conference_commercial_path, class: 'btn btn-primary'
|
||||
7
app/views/admin/commercials/new.html.haml
Normal file
7
app/views/admin/commercials/new.html.haml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
%h1 New Commercial
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for @commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title) do |f|
|
||||
= render 'form', f: f
|
||||
|
||||
= link_to 'Back', admin_conference_commercials_path
|
||||
|
|
@ -32,12 +32,4 @@
|
|||
- if !@conference.logo.blank?
|
||||
= image_tag @conference.logo(:thumb)
|
||||
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
|
||||
= f.input :media_type, :as => :select, :label => "Conference Promo Media Type", :class=>"form-control", :collection => Conference.media_types.values, :include_blank => false, :hint => "This media-item will be used to represent this conference at various places in OSEM."
|
||||
= f.input :media_id, :label => "Conference Promo Media ID", :as => :string
|
||||
%p{:class => "help-block media-type", :id => "youtube-help"} Go to your YouTube video, click on "share" and copy everything behind http://youtu.be/"
|
||||
%p{:class => "help-block media-type", :id => "slideshare-help", :style => "display:none"} Go to your SlideShare, click on "share" -> "embed" and copy the id
|
||||
%p{:class => "help-block media-type", :id => "flickr-help", :style => "display:none"} Go to your flickr image, click on "Grab the link" -> "Show short url" and copy everything behind https://flic.kr/p/
|
||||
%p{:class => "help-block media-type", :id => "vimeo-help", :style => "display:none"} Go to your vimeo video, click on "share" and copy everything behind http://vimeo.com/
|
||||
%p{:class => "help-block media-type", :id => "speakerdeck-help", :style => "display:none"} Go to your SpeakerDeck, click on "share" -> "embed" and copy the data-id
|
||||
%p{:class => "help-block media-type", :id => "instagram-help", :style => "display:none"} Go to your Instagram photo page and copy everything behind instagram.com/p/ (without trailing /# hash symbol)
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue