Add flexvideo class, enable proposal editing,

This commit is contained in:
Henne Vogelsang 2013-06-20 00:26:34 +02:00 committed by Henne Vogelsang
parent 2d79e8e692
commit 9d668ad1b1
10 changed files with 66 additions and 23 deletions

View file

@ -169,3 +169,29 @@ background-image: -webkit-gradient(
color-stop(1, 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; }
}

View file

@ -21,6 +21,7 @@ class Admin::EventsController < ApplicationController
def show def show
@event = @conference.events.find(params[:id]) @event = @conference.events.find(params[:id])
@tracks = @conference.tracks @tracks = @conference.tracks
@event_types = @conference.event_types
@comments = @event.root_comments @comments = @event.root_comments
@comment_count = @event.comment_threads.count @comment_count = @event.comment_threads.count
end end
@ -53,6 +54,9 @@ class Admin::EventsController < ApplicationController
if params.has_key? :track_id if params.has_key? :track_id
@event.update_attribute(:track_id, params[:track_id]) @event.update_attribute(:track_id, params[:track_id])
end 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 expire_page :controller => '/schedule', :action => :index
redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated") redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated")
end end

View file

@ -47,6 +47,7 @@ class Admin::ScheduleController < ApplicationController
startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M") startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M")
event.start_time = startTime event.start_time = startTime
event.save! event.save!
expire_page :controller => '/schedule', :action => :index
render :json => {"status" => "ok"} render :json => {"status" => "ok"}
end end

View file

@ -44,7 +44,7 @@ class ProposalController < ApplicationController
@event_types = @conference.event_types @event_types = @conference.event_types
@attachments = @event.event_attachments @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.') redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => 'Invalid or uneditable proposal.')
end end
end end

View file

@ -2,11 +2,12 @@
.span10 .span10
%h3 %h3
= @event.title = @event.title
%i= @event.subtitle %br
%span.muted
= @event.subtitle
.span2 .span2
= link_to "Edit Submission", "#", = link_to "Edit", edit_conference_proposal_path(@conference.short_title, @event.id), :class => "btn btn-mini btn-primary"
:class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
.row-fluid .row-fluid
.span12 .span12
@ -15,7 +16,17 @@
%td %td
%b Type %b Type
%td %td
.dropdown
= link_to "#", :class => "dropdown-toggle", :id => "type-dropdown" do
- if @event.event_type.nil?
Track
- else
= @event.event_type.title = @event.event_type.title
<b class="caret"></b>
%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 %tr
%td %td
%b State %b State

View file

@ -32,10 +32,7 @@
.span4 .span4
= link_to "Schedule", conference_schedule_path(conference.short_title), :class => "btn btn-success btn-large" = link_to "Schedule", conference_schedule_path(conference.short_title), :class => "btn btn-success btn-large"
.span4 .span4
- if conference.cfp_open?
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0 - 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" = link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right"
- else - elsif conference.cfp_open?
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large pull-right" = 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.

View file

@ -5,6 +5,7 @@
= f.input :title, :as => :string, :required => true = f.input :title, :as => :string, :required => true
= f.input :subtitle, :as => :string = f.input :subtitle, :as => :string
%section#details %section#details
- 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 :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type"
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"}, = f.input :abstract, :input_html => {:rows => 5, :class => "span11"},
:required => true, :label => "Session Abstract" :required => true, :label => "Session Abstract"

View file

@ -28,8 +28,6 @@
.pull-right .pull-right
- if event.transition_possible? :confirm - 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" = 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 "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 "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" :confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger"

View file

@ -2,11 +2,14 @@
.span10 .span10
%h3 %h3
= @event.title = @event.title
%i= @event.subtitle %br
%span.muted
= @event.subtitle
.span2 .span2
- if @event.transition_possible? :confirm - 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 "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, = 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" :confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger"

View file

@ -41,7 +41,7 @@
<% span[room.id] = event[0].event_type.length / 15 %> <% span[room.id] = event[0].event_type.length / 15 %>
<td style="width: <%= 95 / @rooms.length %>%" rowspan ="<%= span[room.id] %>" class="eventtd" > <td style="width: <%= 95 / @rooms.length %>%" rowspan ="<%= span[room.id] %>" class="eventtd" >
<h5> <h5>
<%= 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;" %>
<i class="icon-comment"></i> <i class="icon-comment"></i>
<%= event[0].title %><br> <%= event[0].title %><br>
<% unless event[0].subtitle.empty? %> <% unless event[0].subtitle.empty? %>
@ -56,7 +56,9 @@
</h5> </h5>
<% if span[room.id] > 2 %> <% if span[room.id] > 2 %>
<% length = span[room.id] * 40 %> <% length = span[room.id] * 40 %>
<p class="hidden-phone">
<%= truncate(event[0].abstract, :length => length) %> <%= truncate(event[0].abstract, :length => length) %>
</p>
<% end %> <% end %>
</td> </td>
<% span[room.id] = span[room.id] + 1 %> <% span[room.id] = span[room.id] + 1 %>