diff --git a/app/assets/stylesheets/osem.css b/app/assets/stylesheets/osem.css index d95889f8..57773a03 100644 --- a/app/assets/stylesheets/osem.css +++ b/app/assets/stylesheets/osem.css @@ -168,4 +168,30 @@ background-image: -webkit-gradient( color-stop(0.97, rgb(194,232,190)), color-stop(1, rgb(194,232,190)) ); +} + +/* Borrowed from foundation */ +.flex-video { + position: relative; + padding-top: 25px; + padding-bottom: 67.5%; + height: 0; + margin-bottom: 16px; + overflow: hidden; +} + +.flex-video.widescreen { padding-bottom: 57.25%; } +.flex-video.vimeo { padding-top: 0; } + +.flex-video iframe, +.flex-video object, +.flex-video embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +@media only screen and (max-device-width: 800px), only screen and (device-width: 1024px) and (device-height: 600px), only screen and (width: 1280px) and (orientation: landscape), only screen and (device-width: 800px), only screen and (max-width: 767px) { + .flex-video { padding-top: 0; } } \ No newline at end of file diff --git a/app/controllers/admin/events_controller.rb b/app/controllers/admin/events_controller.rb index 91acb2b3..71e01faa 100644 --- a/app/controllers/admin/events_controller.rb +++ b/app/controllers/admin/events_controller.rb @@ -21,6 +21,7 @@ class Admin::EventsController < ApplicationController def show @event = @conference.events.find(params[:id]) @tracks = @conference.tracks + @event_types = @conference.event_types @comments = @event.root_comments @comment_count = @event.comment_threads.count end @@ -53,6 +54,9 @@ class Admin::EventsController < ApplicationController if params.has_key? :track_id @event.update_attribute(:track_id, params[:track_id]) end + if params.has_key? :event_type_id + @event.update_attribute(:event_type_id, params[:event_type_id]) + end expire_page :controller => '/schedule', :action => :index redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated") end diff --git a/app/controllers/admin/schedule_controller.rb b/app/controllers/admin/schedule_controller.rb index d35f0b15..b8f673ee 100644 --- a/app/controllers/admin/schedule_controller.rb +++ b/app/controllers/admin/schedule_controller.rb @@ -47,6 +47,7 @@ class Admin::ScheduleController < ApplicationController startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M") event.start_time = startTime event.save! + expire_page :controller => '/schedule', :action => :index render :json => {"status" => "ok"} end diff --git a/app/controllers/proposal_controller.rb b/app/controllers/proposal_controller.rb index 4dc7dd27..699eab46 100644 --- a/app/controllers/proposal_controller.rb +++ b/app/controllers/proposal_controller.rb @@ -44,7 +44,7 @@ class ProposalController < ApplicationController @event_types = @conference.event_types @attachments = @event.event_attachments - if @event.nil? || !@conference.cfp_open? || @event.unconfirmed? || @event.confirmed? + if @event.nil? redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => 'Invalid or uneditable proposal.') end end diff --git a/app/views/admin/events/_proposal.html.haml b/app/views/admin/events/_proposal.html.haml index c4749bb5..c1074bfe 100644 --- a/app/views/admin/events/_proposal.html.haml +++ b/app/views/admin/events/_proposal.html.haml @@ -2,12 +2,13 @@ .span10 %h3 = @event.title - %i= @event.subtitle + %br + %span.muted + = @event.subtitle .span2 - = link_to "Edit Submission", "#", - :class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');" - + = link_to "Edit", edit_conference_proposal_path(@conference.short_title, @event.id), :class => "btn btn-mini btn-primary" + .row-fluid .span12 %table.table @@ -15,7 +16,17 @@ %td %b Type %td - = @event.event_type.title + .dropdown + = link_to "#", :class => "dropdown-toggle", :id => "type-dropdown" do + - if @event.event_type.nil? + Track + - else + = @event.event_type.title + + %ul.dropdown-menu + - @event_types.each do |type| + %li= link_to type.title, admin_conference_event_path(@conference.short_title, @event, :event_type_id => type.id) , + :method => :put, :event_type_id => type.id %tr %td %b State diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index a7ea9953..0a4a754c 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -32,10 +32,7 @@ .span4 = link_to "Schedule", conference_schedule_path(conference.short_title), :class => "btn btn-success btn-large" .span4 - - if conference.cfp_open? - - if !current_user.nil? && current_user.person.proposal_count(conference) > 0 - = link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right" - - else - = link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right" - - else - %b.pull-right Call for Papers is closed. + - if !current_user.nil? && current_user.person.proposal_count(conference) > 0 + = link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right" + - elsif conference.cfp_open? + = link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right" diff --git a/app/views/proposal/_proposal_form.html.haml b/app/views/proposal/_proposal_form.html.haml index 1c3ec600..05bf5f28 100644 --- a/app/views/proposal/_proposal_form.html.haml +++ b/app/views/proposal/_proposal_form.html.haml @@ -5,7 +5,8 @@ = f.input :title, :as => :string, :required => true = f.input :subtitle, :as => :string %section#details - = f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type" + - unless @event.state === "unconfirmed" || @event.state === "confirmed" + = f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type" = f.input :abstract, :input_html => {:rows => 5, :class => "span11"}, :required => true, :label => "Session Abstract" You have used diff --git a/app/views/proposal/index.html.haml b/app/views/proposal/index.html.haml index e2da2c5f..8c8d175a 100644 --- a/app/views/proposal/index.html.haml +++ b/app/views/proposal/index.html.haml @@ -28,8 +28,6 @@ .pull-right - if event.transition_possible? :confirm = link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event, :send_mail=>false), :method => :put, :class => "btn btn-mini btn-success" - - if @conference.cfp_open? - - if !event.unconfirmed? && !event.confirmed? - = link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary" - = link_to "Withdraw", conference_proposal_path(@conference.short_title, event.id), :method => :delete, + = link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary" + = link_to "Withdraw", conference_proposal_path(@conference.short_title, event.id), :method => :delete, :confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger" diff --git a/app/views/proposal/show.html.haml b/app/views/proposal/show.html.haml index c91f6713..88b71af8 100644 --- a/app/views/proposal/show.html.haml +++ b/app/views/proposal/show.html.haml @@ -2,11 +2,14 @@ .span10 %h3 = @event.title - %i= @event.subtitle + %br + %span.muted + = @event.subtitle .span2 - if @event.transition_possible? :confirm = link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, @event), :method => :put, :class => "btn btn-mini btn-success" + = link_to "Edit", edit_conference_proposal_path(@conference.short_title, @event.id), :class => "btn btn-mini btn-primary" = link_to "Withdraw", conference_proposal_path(@conference.short_title, @event.id), :method => :delete, :confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger" @@ -23,8 +26,8 @@ %tr %td %b Track - %td - = @event.track.name + %td + = @event.track.name - if !@event.room.nil? %tr %td diff --git a/app/views/schedule/index.html.erb b/app/views/schedule/index.html.erb index 1ab056a6..e3667b26 100644 --- a/app/views/schedule/index.html.erb +++ b/app/views/schedule/index.html.erb @@ -41,7 +41,7 @@ <% span[room.id] = event[0].event_type.length / 15 %>
- <%= image_tag event[0].submitter.gravatar_url, :class => "img-circle pull-right", :alt => event[0].submitter.public_name, :title => event[0].submitter.public_name%> + <%= image_tag event[0].submitter.gravatar_url, :class => "img-circle pull-right", :alt => event[0].submitter.public_name, :title => event[0].submitter.public_name, :style => "padding:8px;" %> <%= event[0].title %>
<% unless event[0].subtitle.empty? %> @@ -56,7 +56,9 @@
<% if span[room.id] > 2 %> <% length = span[room.id] * 40 %> - <%= truncate(event[0].abstract, :length => length) %> +

+ <%= truncate(event[0].abstract, :length => length) %> +

<% end %> <% span[room.id] = span[room.id] + 1 %>