mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #31 from differentreality/schedule_show_by_date
Schedule show by date
This commit is contained in:
commit
0f229f3db0
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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