Merge pull request #31 from differentreality/schedule_show_by_date

Schedule show by date
This commit is contained in:
Henne Vogelsang 2013-07-29 04:38:59 -07:00
commit 0f229f3db0
2 changed files with 7 additions and 1 deletions

View file

@ -7,6 +7,12 @@ class ScheduleController < ApplicationController
@rooms = @conference.rooms @rooms = @conference.rooms
@events = @conference.events @events = @conference.events
@dates = @conference.start_date..@conference.end_date @dates = @conference.start_date..@conference.end_date
if @dates === Date.current
@today = Date.current.strftime("%Y-%m-%d")
else
@today = @conference.start_date.strftime("%Y-%m-%d")
end end
end
end end

View file

@ -116,7 +116,7 @@ $(function() {
if (activeTab.length) { if (activeTab.length) {
activeTab.tab('show'); activeTab.tab('show');
} else { } else {
$('.nav-tabs a:first').tab('show'); $('.nav-tabs a[href=#<%= j @today %>]').tab('show');
} }
}); });
}); });