mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
43 lines
1.5 KiB
Text
43 lines
1.5 KiB
Text
<div class="container">
|
|
<% if @rooms.length > 1 and @conference.program.events.scheduled.any? %>
|
|
<div role="tabpanel">
|
|
<!-- Nav tabs -->
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li role="presentation" class="active schedule">
|
|
<a title="Timetable of the events" href="#schedule" aria-controls="schedule" role="tab" data-toggle="tab">Schedule</a>
|
|
</li>
|
|
<li role="presentation" class="program">
|
|
<a title="All, including unscheduled Events" href="#program" aria-controls="program" role="tab" data-toggle="tab">All Events</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<!-- Tab panes -->
|
|
<div class="tab-content">
|
|
<div role="tabpanel" class="tab-pane active" id="schedule">
|
|
<%= render 'schedule' %>
|
|
</div>
|
|
<div role="tabpanel" class="tab-pane" id="program">
|
|
<%= render 'all_events' %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% else %>
|
|
<%= render 'all_events' %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= javascript_tag do %>
|
|
// We set the program tab to active if the url tag starts by 'program-'
|
|
$( document ).ready(function() {
|
|
if(window.location.hash.substring(1).startsWith('program-')){
|
|
schedule = $('.schedule');
|
|
schedule.removeClass('active');
|
|
schedule.find('a').attr("aria-expanded", "false");
|
|
$('#schedule').removeClass('active');
|
|
program = $('.program');
|
|
program.addClass('active');
|
|
program.find('a').attr("aria-expanded", "true");
|
|
$('#program').addClass('active');
|
|
}
|
|
});
|
|
<% end %>
|