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

@ -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; }
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
<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
%td
%b State

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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

View file

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