show current day's schedule
This commit is contained in:
parent
f905bb8f8f
commit
adb04ab82e
2 changed files with 5 additions and 1 deletions
|
|
@ -7,6 +7,10 @@ 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")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -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');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue