Add a Happening Now View
This commit is contained in:
parent
0d4733b130
commit
70bde86dd6
8 changed files with 80 additions and 9 deletions
|
|
@ -3,5 +3,7 @@
|
|||
%ul.nav.nav-tabs{ role: "tablist" }
|
||||
%li{ class: "program #{ 'active' if active == 'program' }", role: "presentation" }
|
||||
= link_to('All events', events_conference_schedule_path(@conference.short_title))
|
||||
%li{ class: "program #{ 'active' if active == 'now' }", role: "presentation" }
|
||||
= link_to('Happening Now', happening_now_conference_schedule_path(@conference.short_title))
|
||||
%li{ class: "schedule #{ 'active' if active == 'schedule' }", role: "presentation" }
|
||||
= link_to('Schedule', conference_schedule_path(@conference.short_title))
|
||||
|
|
|
|||
46
app/views/schedules/happening_now.haml
Normal file
46
app/views/schedules/happening_now.haml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
.container#program
|
||||
= render partial: 'schedule_tabs', locals: { active: 'now' }
|
||||
|
||||
%h1.text-center
|
||||
Happening Now at
|
||||
= @conference.title
|
||||
-# .dropdown.program-dropdown
|
||||
-# %button{ type: "button", class: "btn btn-default dropdown-toggle", 'data-toggle' => "dropdown" }
|
||||
-# Dates
|
||||
-# %span.caret
|
||||
-# %ul.dropdown-menu
|
||||
-# - @dates.each do |date|
|
||||
-# %li.li-dropdown-program
|
||||
-# = link_to date, "##{date}", class: "program-selector#{ ' no-events-day' unless @conference.program.any_event_for_this_date?(date) }"
|
||||
-# - if @unscheduled_events.any?
|
||||
-# %li.li-dropdown-program
|
||||
-# = link_to('Unscheduled', "#unscheduled", class: 'program-selector')
|
||||
|
||||
.row
|
||||
%h2
|
||||
#{pluralize(@events_schedules.count, 'Event')} Occurring Within The Next 30 minutes.
|
||||
%h3
|
||||
This page was loaded at #{Time.now.strftime('%Y-%m-%d at %H:%M %P')}
|
||||
%p
|
||||
P.S. This page is in beta, and if it doesn't make sense, we're sorry.
|
||||
%small
|
||||
Times & Timezones...only of the many 2 hard problems in computer science.
|
||||
|
||||
.row
|
||||
/ scheduled events
|
||||
- @events_schedules.each do |event_schedule|
|
||||
.col-xs-12.col-md-11.col-md-offset-1
|
||||
= render partial: 'event', locals: { event: event_schedule.event, event_schedule: event_schedule }
|
||||
|
||||
:javascript
|
||||
$('.program-selector').on('click', function(e) {
|
||||
$('.li-dropdown-program').removeClass('active');
|
||||
});
|
||||
|
||||
// Go to current date and time
|
||||
$(document).ready(function(){
|
||||
tag = "#{ @tag }";
|
||||
if(tag !== ""){
|
||||
document.getElementById(tag).scrollIntoView();
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue