Merge branch 'master' of https://github.com/CactusPuppy/snapcon into 176895037-add-link-to-view-event-from-admin-page
This commit is contained in:
commit
92d052970a
178 changed files with 2810 additions and 277 deletions
|
|
@ -16,7 +16,7 @@
|
|||
= semantic_form_for(@commercial, url: admin_conference_commercials_path(conference_id: @conference.short_title)) do |f|
|
||||
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', autofocus: true },
|
||||
hint: 'Just paste the url of your video/photo provider. YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }, label: 'Save Materials'
|
||||
%hr
|
||||
|
||||
- @commercials.each_slice(3) do |slice|
|
||||
|
|
@ -24,10 +24,10 @@
|
|||
- slice.each do |commercial|
|
||||
- if commercial.persisted?
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
.flexvideo{ id: "resource-content-#{commercial.id}" }
|
||||
.panel
|
||||
%div{ id: "resource-content-#{commercial.id}" }
|
||||
= render partial: 'shared/media_item', locals: { commercial: commercial }
|
||||
.caption
|
||||
.caption.panel-footer
|
||||
- if can? :update, commercial
|
||||
= semantic_form_for commercial, url: admin_conference_commercial_path(conference_id: @conference.short_title, id: commercial) do |f|
|
||||
= f.input :url, label: 'URL', as: :string, input_html: { id: "commercial_url_#{commercial.id}", required: 'required' }, hint: 'Just paste the url of your video/photo provider'
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
/ use smaller cell heights for more compact grids
|
||||
- cell_height = compact_grid ? 32 : 58
|
||||
- date_event_schedules = @event_schedules.select{ |e| e.start_time.to_date.eql? date }
|
||||
/ Dynamically set the column width, but no narrower than 2 (on a BS grid of 12)
|
||||
- col_size = [2, (12 / @rooms.count).to_i ].max
|
||||
.row
|
||||
- @rooms.each do |room|
|
||||
- non_schedulable = room.tracks.self_organized.confirmed.any? do |track|
|
||||
- !track.schedules.include?(@schedule) && (track.start_date..track.end_date).include?(date)
|
||||
.col-md-2.col-xs-6{ class: ('non_schedulable' if non_schedulable) }
|
||||
.col-xs-6{ class: "#{('non_schedulable' if non_schedulable)} col-md-#{col_size}" }
|
||||
.room-name
|
||||
- room_date_event_schedules = date_event_schedules.select{ |e| e.room == room }
|
||||
= room.name
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
.col-md-12
|
||||
.row.row-centered.shuffle-deck
|
||||
- highlights.each do |event|
|
||||
- speaker = event.speakers_ordered.first
|
||||
.col-md-3.col-sm-3.col-centered.col-top.highlights
|
||||
= link_to(conference_program_proposal_path(conference_id,
|
||||
event),
|
||||
class: 'thumbnail') do
|
||||
= image_tag speaker.profile_picture(size: 300),
|
||||
class: ['img-responsive', 'img-circle'],
|
||||
title: speaker.name
|
||||
.caption
|
||||
%h3.text-center= speaker.name
|
||||
%h4.text-center= event.title
|
||||
- event.speakers_ordered.each do |speaker|
|
||||
.col-md-3.col-sm-3.col-centered.col-top.highlights
|
||||
= link_to(conference_program_proposal_path(conference_id,
|
||||
event),
|
||||
class: 'thumbnail') do
|
||||
= image_tag speaker.profile_picture(size: 300),
|
||||
class: ['img-responsive', 'img-circle'],
|
||||
title: speaker.name
|
||||
.caption
|
||||
%h3.text-center= speaker.name
|
||||
%h4.text-center= event.title
|
||||
|
|
|
|||
|
|
@ -22,17 +22,17 @@
|
|||
= semantic_form_for(@event.commercials.build, url: conference_program_proposal_commercials_path(conference_id: @conference.short_title, proposal_id: @event)) do |f|
|
||||
= f.input :url, label: 'URL', as: :string, input_html: { required: 'required', type: 'url' },
|
||||
hint: 'Just paste the url of your video/photo provider. Currently supported: YouTube, Vimeo, SpeakerDeck, SlideShare, Instagram, Flickr.'
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary pull-right', disabled: true }, label: 'Save Materials'
|
||||
%hr
|
||||
- @event.commercials.each_slice(3) do |slice|
|
||||
.row
|
||||
- slice.each do |commercial|
|
||||
- if commercial.persisted?
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
.flexvideo{ id: "resource-content-#{commercial.id}"}
|
||||
.panel.panel-default
|
||||
%div{ id: "resource-content-#{commercial.id}"}
|
||||
= render partial: 'shared/media_item', locals: { commercial: commercial }
|
||||
.caption
|
||||
.caption.panel-footer
|
||||
- if can? :update, commercial
|
||||
= semantic_form_for commercial, url: conference_program_proposal_commercial_path(conference_id: @conference.short_title, proposal_id: @event, id: commercial) do |f|
|
||||
= f.input :url, label: 'URL', as: :string, input_html: { id: "commercial_url_#{commercial.id}", required: 'required', type: 'url' }
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
%p.text-right
|
||||
- if @event.new_record?
|
||||
= f.submit 'Create Proposal', class: 'btn btn-success'
|
||||
= f.submit 'Submit Proposal', class: 'btn btn-success'
|
||||
- else
|
||||
= f.submit 'Update Proposal', class: 'btn btn-success'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
.flexvideo
|
||||
- if commercial.url
|
||||
- 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: "https://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/"}
|
||||
- elsif commercial.commercial_type == 'YouTube'
|
||||
%iframe{width: '560', height: '315', frameborder: '0', allowfullscreen: 'true', src: "https://www.youtube.com/embed/#{commercial.commercial_id}?rel=0"}
|
||||
- elsif 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: "https://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"}
|
||||
- if commercial.url
|
||||
%br
|
||||
= link_to('Open in a new tab', commercial.url, target: '_blank')
|
||||
= link_to('Open in a new tab', commercial.url, target: '_blank', class: 'btn btn-info')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue