Implement simplified commercials workflow
It's now possible to simply enter the url of the third party provider to enter a commercial.
This commit is contained in:
parent
fb7ebab5a0
commit
23664119bd
25 changed files with 220 additions and 194 deletions
|
|
@ -1,12 +1,15 @@
|
|||
-if commercial_type == CONFIG['commercial_types']['slideshare']
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "www.slideshare.net/slideshow/embed_code/#{commercial_id}"}
|
||||
-elsif commercial_type == CONFIG['commercial_types']['flickr']
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "flic.kr/p/#{commercial_id}/player/268a054da2"}
|
||||
-elsif commercial_type == CONFIG['commercial_types']['vimeo']
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//player.vimeo.com/video/#{commercial_id}"}
|
||||
-elsif commercial_type == CONFIG['commercial_types']['speakerdeck']
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//speakerdeck.com/player/#{commercial_id}?"}
|
||||
-elsif commercial_type == CONFIG['commercial_types']['instagram']
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :scrolling =>"no", :allowtransparency=>"true", :src=> "//instagram.com/p/#{commercial_id}/embed/"}
|
||||
-else
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> (request.ssl? ? "https://" : "http://") + "www.youtube.com/embed/#{commercial_id}?rel=0"}
|
||||
- if commercial.url
|
||||
= Commercial.render_from_url(commercial.url)[:html]
|
||||
- else
|
||||
- if commercial.commercial_type == 'SlideShare'
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "https://www.slideshare.net/slideshow/embed_code/#{commercial.commercial_id}"}
|
||||
- elsif commercial.commercial_type == 'Flickr'
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "https://flic.kr/p/#{commercial.commercial_id}/player/268a054da2"}
|
||||
- elsif commercial.commercial_type == 'Vimeo'
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//player.vimeo.com/video/#{commercial.commercial_id}"}
|
||||
- elsif commercial.commercial_type == 'Speakerdeck'
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//speakerdeck.com/player/#{commercial.commercial_id}?"}
|
||||
- elsif commercial.commercial_type == 'Instagram'
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :scrolling =>"no", :allowtransparency=>"true", :src=> "//instagram.com/p/#{commercial.commercial_id}/embed/"}
|
||||
- else
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "https://www.youtube.com/embed/#{commercial.commercial_id}?rel=0"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue