<%
# Copyright (C) 2013 - 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/>.
%>

<% css_bundle :all_courses %>
<% js_bundle  :all_courses %>
<% provide :page_title, t('titles.all_courses', "All Courses") %>

<h1>All Courses</h1>
<form id="course_filter" action="/search/all_courses" method="get" class="form-inline">
  <input type="search" placeholder="<%= t(:name, 'Name') %>" aria-label="<%= t(:search, 'Search') %>" name="search" value="<%= @search %>" />
  <input type="checkbox" id="public_only" name="public_only"<%= ' checked' if @public_only %> />
  <label for="public_only">
    <%= t(:public_only, 'Public courses only') %>
  </label>
  <input type="checkbox" id="open_enrollment_only" name="open_enrollment_only"<%= ' checked' if @open_enrollment_only %> />
  <label for="open_enrollment_only">
    <%= t(:open_enrollment_only, 'Open enrollment courses only') %>
  </label>
  <button type="submit"><%= t(:search, 'Search') %></button>
</form>
<div id="catalog_content">
  <%=raw @contentHTML %>
</div>
