mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Make it possible to view proposals from the schedule
This commit is contained in:
parent
9d668ad1b1
commit
c18400f9df
4 changed files with 100 additions and 120 deletions
|
|
@ -153,7 +153,9 @@ div.dataTables_scrollFoot table {
|
|||
border-top: none;
|
||||
}
|
||||
|
||||
.eventtd {
|
||||
|
||||
|
||||
#schedule td.event {
|
||||
background-image: linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
|
||||
|
|
@ -170,28 +172,34 @@ background-image: -webkit-gradient(
|
|||
);
|
||||
}
|
||||
|
||||
/* Borrowed from foundation */
|
||||
.flex-video {
|
||||
position: relative;
|
||||
padding-top: 25px;
|
||||
padding-bottom: 67.5%;
|
||||
height: 0;
|
||||
margin-bottom: 16px;
|
||||
overflow: hidden;
|
||||
#schedule td.event:hover
|
||||
{
|
||||
background-image: linear-gradient(bottom, rgb(247,250,242) 24%, rgb(83,171,74) 97%, rgb(83,171,74) 100%);
|
||||
background-image: -o-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(83,171,74) 97%, rgb(83,171,74) 100%);
|
||||
background-image: -moz-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(83,171,74) 97%, rgb(83,171,74) 100%);
|
||||
background-image: -webkit-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(83,171,74) 97%, rgb(83,171,74) 100%);
|
||||
background-image: -ms-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(83,171,74) 97%, rgb(83,171,74) 100%);
|
||||
|
||||
background-image: -webkit-gradient(
|
||||
linear,
|
||||
left bottom,
|
||||
left top,
|
||||
color-stop(0.24, rgb(247,250,242)),
|
||||
color-stop(0.97, rgb(83,171,74)),
|
||||
color-stop(1, rgb(83,171,74))
|
||||
);
|
||||
}
|
||||
|
||||
.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%;
|
||||
|
||||
.flexvideo {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%; /* 16:9 */
|
||||
padding-top: 25px;
|
||||
height: 0;
|
||||
}
|
||||
@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; }
|
||||
.flexvideo iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
class ProposalController < ApplicationController
|
||||
before_filter :verify_user
|
||||
before_filter :verify_user, :except => [:show]
|
||||
before_filter :setup
|
||||
before_filter :verify_access, :only => [:edit, :update, :destroy, :confirm]
|
||||
|
||||
def setup
|
||||
@person = current_user.person
|
||||
@person = current_user.person if current_user
|
||||
#FIXME: @conference also comes from verify_user, but we need setup also in show
|
||||
# which can be accessed anonymusly
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
@url = conference_proposal_index_path(@conference.short_title)
|
||||
@event_types = @conference.event_types
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,87 +1,44 @@
|
|||
.row-fluid
|
||||
.span10
|
||||
.span3
|
||||
= image_tag @event.submitter.gravatar_url(:size => 200), :class => "img-rounded"
|
||||
%h3
|
||||
= @event.title
|
||||
%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"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b Type
|
||||
%td
|
||||
- if @event.event_type
|
||||
= @event.event_type.title
|
||||
- if !@event.track.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Track
|
||||
%td
|
||||
= @event.track.name
|
||||
- if !@event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Room
|
||||
%td
|
||||
= @event.room.name
|
||||
- if !@event.start_time.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Scheduled time
|
||||
%td
|
||||
= @event.start_time
|
||||
%tr
|
||||
%td
|
||||
%b Submitted on
|
||||
%td= @event.created_at
|
||||
%tr
|
||||
%td
|
||||
%b Last updated on
|
||||
%td= @event.updated_at
|
||||
%tr
|
||||
%td
|
||||
%b Abstract
|
||||
%td= simple_format(@event.abstract)
|
||||
%tr
|
||||
%td
|
||||
%b Description
|
||||
%td= simple_format(@event.description)
|
||||
- if @event.event_attachments.size > 0
|
||||
%table.table
|
||||
%thead
|
||||
%th
|
||||
%b Filename
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Size
|
||||
%th
|
||||
%b Public?
|
||||
%th
|
||||
%tbody
|
||||
- @event.event_attachments.each do |a|
|
||||
%tr
|
||||
%td
|
||||
= link_to a.attachment_file_name, conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id)
|
||||
%td
|
||||
= a.title
|
||||
%td
|
||||
= number_to_human_size a.attachment_file_size
|
||||
%td
|
||||
- if a.public?
|
||||
Public
|
||||
- else
|
||||
Not Public
|
||||
%td
|
||||
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
|
||||
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
|
||||
= @event.submitter.public_name
|
||||
- if @event.submitter.company
|
||||
%br
|
||||
%span.muted= @event.submitter.company
|
||||
-if @event.submitter.biography
|
||||
%p= @event.submitter.biography
|
||||
.span9
|
||||
.row-fluid
|
||||
.span12
|
||||
%h3.muted
|
||||
Video coming soon! Meanwhile...
|
||||
.row-fluid
|
||||
.span12.flexvideo
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=>"http://www.youtube.com/embed/Eiv4e5ZxTmg"}
|
||||
.row-fluid
|
||||
.span8
|
||||
%h2
|
||||
= @event.title
|
||||
- if @event.subtitle
|
||||
%br
|
||||
%span.muted
|
||||
= @event.subtitle
|
||||
%p
|
||||
= simple_format(@event.abstract)
|
||||
.span4
|
||||
%dl
|
||||
%dt Speaker:
|
||||
%dd= @event.submitter.public_name
|
||||
%dt Date:
|
||||
%dd= @event.start_time.strftime("%Y %B %e")
|
||||
- if @event.language
|
||||
%dt Language:
|
||||
%dd= @event.language
|
||||
%dt Conference:
|
||||
%dd= @event.conference.title
|
||||
- if @event.track_id
|
||||
%dt Track:
|
||||
%dd
|
||||
%span.label
|
||||
= @event.track.name
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<div class="tab-content">
|
||||
<% @dates.each do |date| %>
|
||||
<div class="tab-pane <%= 'active' if @dates.first == date %>" id ="<%= date %>" >
|
||||
<table class="table table-striped table-bordered" width="100%">
|
||||
<table class="table table-bordered" id="schedule" width="100%">
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<% @rooms.each do |room| %>
|
||||
|
|
@ -39,7 +39,10 @@
|
|||
<% if !event.empty? %>
|
||||
<!-- There is an event, calculate the span and show it -->
|
||||
<% 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 %>%; cursor:pointer"
|
||||
rowspan ="<%= span[room.id] %>"
|
||||
class="event" role="button"
|
||||
data-href="<%= url_for(conference_proposal_path(@conference.short_title, event[0].id)) %>">
|
||||
<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, :style => "padding:8px;" %>
|
||||
<i class="icon-comment"></i>
|
||||
|
|
@ -51,15 +54,9 @@
|
|||
<%= event[0].submitter.public_name %>
|
||||
<% if event[0].track%>
|
||||
<br><i class="icon-road"></i>
|
||||
<span style="background-color:<%= event[0].track.color if event[0].track %>"><%= event[0].track.name %></span>
|
||||
<span class="label" style="background-color:<%= event[0].track.color if event[0].track %>"><%= event[0].track.name %></span>
|
||||
<% end -%>
|
||||
</h5>
|
||||
<% if span[room.id] > 2 %>
|
||||
<% length = span[room.id] * 40 %>
|
||||
<p class="hidden-phone">
|
||||
<%= truncate(event[0].abstract, :length => length) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</td>
|
||||
<% span[room.id] = span[room.id] + 1 %>
|
||||
<% elsif span[room.id] > 1 %>
|
||||
|
|
@ -78,4 +75,19 @@
|
|||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
jQuery( function($) {
|
||||
$('tbody tr td[data-href]').addClass('clickable').mouseup(function(e) {
|
||||
if(e.which===1)
|
||||
{
|
||||
window.location = $(this).attr('data-href');
|
||||
}
|
||||
else if(e.which===2)
|
||||
{
|
||||
window.open($(this).attr('data-href'), '_blank');
|
||||
}
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
Loading…
Add table
Add a link
Reference in a new issue