SchedulesController introduced
The actions #schedule and #events were moved from conference controller to the new controller
This commit is contained in:
parent
b037a5eb7c
commit
71dab6b79c
18 changed files with 87 additions and 69 deletions
43
app/views/schedules/_event.html.haml
Normal file
43
app/views/schedules/_event.html.haml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
.panel.panel-default.event-panel{ id: "link-#{event.id}" }
|
||||
.panel-body
|
||||
- if speaker = event.speakers.first
|
||||
= image_tag speaker.gravatar_url, :class => "img-circle pull-right all-speaker-pic", |
|
||||
:alt => speaker.name, |
|
||||
:title => speaker.name |
|
||||
%span.h3
|
||||
= event.title
|
||||
%br
|
||||
%small
|
||||
= event.subtitle
|
||||
%h4
|
||||
presented by #{event.speaker_names}
|
||||
%p
|
||||
= truncate(event.abstract, :length => 400)
|
||||
= link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400
|
||||
- if event_schedule.present?
|
||||
%span.track
|
||||
%span.fa.fa-clock-o
|
||||
%span.label{ style: "background-color: grey" }
|
||||
= event_schedule.start_time.strftime('%H:%M')
|
||||
\-
|
||||
= event_schedule.end_time.strftime('%H:%M')
|
||||
%span.track
|
||||
%span.fa.fa-map-marker
|
||||
%span.label{ style: "background-color: grey" }
|
||||
= event_schedule.room.name
|
||||
- if event.track
|
||||
%span.track
|
||||
%span.fa.fa-road
|
||||
%span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" }
|
||||
= event.track.name
|
||||
|
||||
:javascript
|
||||
|
||||
$("#link-#{event.id}").click(function(e) {
|
||||
var url = "#{url_for(conference_program_proposal_path(@conference.short_title, event.id))}";
|
||||
|
||||
if(e.ctrlKey)
|
||||
window.open(url,'_blank');
|
||||
else
|
||||
window.location = url;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue