<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%
  provide :page_title, join_title(t(:page_title, "Web Conferences"), @context.name)
  js_bundle :conferences
  css_bundle :conferences
%>

<h1 class="screenreader-only"><%= t(:conference_header, 'Conferences')%></h1>

<div id="big-blue-button-message-container"></div>
<div id="conference-alternatives-container"></div>

<% unless @render_alternatives %>
  <% if can_do(WebConference.new(:context => @context), @current_user, :create) %>
    <div class="ic-Action-header ic-Action-header--before-item-groups">
      <div class="ic-Action-header__Secondary">
        <button type="button" class="btn btn-primary new-conference-btn" title="<%= t(:new_conference, 'New Conference') %>" aria-label="<%= t(:new_conference, 'New Conference') %>">
          <i class="icon-plus"></i>
          <%= t(:conference, 'Conference') %>
        </button>
      </div>
    </div>
  <% end %>
<% end %>

<div class="item-group-container item-box">
  <% unless @render_alternatives %>
    <div class="item-group-condensed">
      <div class="ig-header">
        <h2 class="ig-header-title">
          <a
            class="element_toggler accessible-toggler"
            href="#"
            aria-label= "<%= t('New Conferences') %>"
            aria-controls="new-conference-list"
            aria-expanded="true">
            <i class="icon-mini-arrow-down auto_rotate"></i>
            <%= t(:new_conferences, 'New Conferences') %>
          </a>
        </h2>
      </div>
      <div class="item-group-expandable" id="new-conference-list"></div>
    </div>
  <% end %>

  <div class="item-group-condensed">
    <div class="ig-header">
      <h2 class="ig-header-title">
        <a
            class="element_toggler accessible-toggler"
            href="#"
            aria-label= "<%= t('Concluded Conferences') %>"
            aria-controls="concluded-conference-list"
            aria-expanded="true">
          <i class="icon-mini-arrow-down auto_rotate"></i>
          <%= t(:concluded_conferences, 'Concluded Conferences') %>
        </a>
      </h2>
    </div>
    <div class="item-group-expandable" id="concluded-conference-list"></div>
  </div>

</div>

<div id="add_conference_form"></div>
