Implements more embed codes for events

- add slideshare embed code

TODO:
- review help texts
- refactor video_type  collection to event model enumeration
- add more embed code (flickr, instagram, myvideo)
- video_type and video_id is now more like media_type and media_id -> it should considered to rename these attributes
#26
This commit is contained in:
Christian Bruckmayer 2014-03-15 20:21:01 +01:00
parent 2ccd37a7af
commit 2421eaf4ea
3 changed files with 16 additions and 2 deletions

View file

@ -31,7 +31,10 @@
.row-fluid
.span12.flexvideo
-if @event.video_id
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> request.ssl? ? "https://" : "http://" + "www.youtube.com/embed/#{@event.video_id}?rel=0"}
-if @event.video_type == "youtube"
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> request.ssl? ? "https://" : "http://" + "www.youtube.com/embed/#{@event.video_id}?rel=0"}
-if @event.video_type == "slideshare"
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> request.ssl? ? "https://" : "http://" + "www.slideshare.net/slideshow/embed_code/#{@event.video_id}"}
-else
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=>request.ssl? ? "https://" : "http://" + "www.youtube.com/embed/Eiv4e5ZxTmg?rel=0"}
.row-fluid