Tweak Materials to allow anything
This commit is contained in:
parent
74b77e132d
commit
b553e0fed7
5 changed files with 24 additions and 23 deletions
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
- if @event.commercials.empty?
|
||||
%h5.text-warning
|
||||
No video of the event yet, sorry!
|
||||
No materials for the event yet, sorry!
|
||||
- unless @conference.commercials.empty?
|
||||
Meanwhile...
|
||||
- unless @conference.commercials.empty?
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
- if commercial.url
|
||||
.flexvideo
|
||||
- if commercial.url
|
||||
= Commercial.render_from_url(commercial.url)[:html]
|
||||
- else
|
||||
- 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'
|
||||
|
|
@ -13,3 +14,6 @@
|
|||
%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"}
|
||||
- if commercial.url
|
||||
%br
|
||||
= link_to('Open in a new tab', commercial.url, target: '_blank')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
- unless commercials.empty?
|
||||
- if commercials.length == 1
|
||||
.flexvideo
|
||||
= render partial: 'shared/media_item', locals: { commercial: commercials.first }
|
||||
- else
|
||||
%ul.nav.nav-tabs{ 'role'=>'tablist' }
|
||||
|
|
@ -12,9 +11,7 @@
|
|||
- commercials.each.with_index(1) do |commercial, index|
|
||||
- if index == 1
|
||||
.tab-pane.active{'id'=>"#{index}"}
|
||||
.flexvideo
|
||||
= render partial: 'shared/media_item', locals: { commercial: commercial }
|
||||
- else
|
||||
.tab-pane{'id'=>"#{index}"}
|
||||
.flexvideo
|
||||
= render partial: 'shared/media_item', locals: { commercial: commercial }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
class AddUrlToRooms < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :rooms, :url, :text
|
||||
add_column :rooms, :url, :string
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ ActiveRecord::Schema.define(version: 2020_07_10_215300) do
|
|||
t.string "name", null: false
|
||||
t.integer "size"
|
||||
t.integer "venue_id", null: false
|
||||
t.text "url"
|
||||
t.string "url"
|
||||
end
|
||||
|
||||
create_table "schedules", force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue