Add conference wide media, fix proposal#show view
This commit is contained in:
parent
4592802411
commit
633fff59d8
10 changed files with 82 additions and 54 deletions
|
|
@ -7,13 +7,24 @@
|
|||
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
|
||||
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
|
||||
= f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system."
|
||||
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
|
||||
- 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 :html_export_path, :hint => "The path for static HTML exports"
|
||||
|
||||
= f.inputs :name => "Scheduling" do
|
||||
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
|
||||
|
||||
= f.inputs :name => "Media" do
|
||||
- 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"}
|
||||
|
|
|
|||
|
|
@ -23,42 +23,28 @@
|
|||
%span.label{:style =>"background-color: #{@event.track.color};"}
|
||||
= @event.track.name
|
||||
.col-md-9
|
||||
-unless @event.media_id
|
||||
.row
|
||||
.col-md-12
|
||||
%h5.text-error
|
||||
.row
|
||||
.col-md-12
|
||||
- if @event.media_id.blank?
|
||||
%h5.text-warning
|
||||
No video of the event yet, sorry! Meanwhile...
|
||||
.row
|
||||
.col-md-13
|
||||
-if not @event.media_id.blank?
|
||||
.flexvideo
|
||||
-if @event.media_type == Event.media_types[:slideshare]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "www.slideshare.net/slideshow/embed_code/#{@event.media_id}"}
|
||||
-elsif @event.media_type == Event.media_types[:flickr]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "flic.kr/p/#{@event.media_id}/player/268a054da2"}
|
||||
-elsif @event.media_type == Event.media_types[:vimeo]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//player.vimeo.com/video/#{@event.media_id}"}
|
||||
-elsif @event.media_type == Event.media_types[:speakerdeck]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//speakerdeck.com/player/#{@event.media_id}?"}
|
||||
-elsif @event.media_type == Event.media_types[:instagram]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :scrolling =>"no", :allowtransparency=>"true", :src=> "//instagram.com/p/#{@event.media_id}/embed/"}
|
||||
-else
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "www.youtube.com/embed/#{@event.media_id}?rel=0"}
|
||||
-else
|
||||
%div.well.well-lg="No video of the event yet, sorry! Meanwhile..."
|
||||
= render partial: "shared/media_item", locals: {media_type: @conference.media_type, media_id: @conference.media_id}
|
||||
- else
|
||||
.flexvideo
|
||||
= render partial: "shared/media_item", locals: {media_type: @event.media_type, media_id: @event.media_id}
|
||||
.row
|
||||
.col-md-8
|
||||
%h3
|
||||
by
|
||||
= @speaker.public_name
|
||||
- if @speaker.company?
|
||||
%br
|
||||
%span.muted
|
||||
from
|
||||
= @speaker.company
|
||||
-if @speaker.biography?
|
||||
= simple_format(@speaker.biography)
|
||||
.col-md-4
|
||||
= image_tag @speaker.gravatar_url(:size => 200), :class => "img-responsive img-rounded"
|
||||
|
||||
|
||||
.speakerinfo
|
||||
.col-md-8
|
||||
%h3
|
||||
by
|
||||
= @speaker.public_name
|
||||
- if @speaker.company?
|
||||
%br
|
||||
%span.muted
|
||||
from
|
||||
= @speaker.company
|
||||
-if @speaker.biography?
|
||||
= simple_format(@speaker.biography)
|
||||
.col-md-4
|
||||
= image_tag @speaker.gravatar_url(:size => 200), :class => "img-responsive img-rounded"
|
||||
|
|
|
|||
12
app/views/shared/_media_item.html.haml
Normal file
12
app/views/shared/_media_item.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-if media_type == Conference.media_types[:slideshare]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "www.slideshare.net/slideshow/embed_code/#{media_id}"}
|
||||
-elsif media_type == Conference.media_types[:flickr]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "flic.kr/p/#{media_id}/player/268a054da2"}
|
||||
-elsif media_type == Conference.media_types[:vimeo]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//player.vimeo.com/video/#{media_id}"}
|
||||
-elsif media_type == Conference.media_types[:speakerdeck]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//speakerdeck.com/player/#{media_id}?"}
|
||||
-elsif media_type == Conference.media_types[:instagram]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :scrolling =>"no", :allowtransparency=>"true", :src=> "//instagram.com/p/#{media_id}/embed/"}
|
||||
-else
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "www.youtube.com/embed/#{media_id}?rel=0"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue