{% extends "base_template.html" %} {% from "courses/admin/_form.html" import flashes, state_badge, delete_button with context %} {% block title %}{{ _('Courses') }}{% endblock %} {% block content %}

{{ _('Courses') }}

{{ _('One course per academic year. Each one is a snapshot: editing this year never changes what an earlier one shows.') }}

{{ _('New course') }}
{{ flashes() }}
{% for course in courses %} {% else %} {% endfor %}
{{ _('Course') }} {{ _('Readers see it') }} {{ _('Actions') }}
{{ course.name }}
{{ course_url(course) }}
{{ state_badge(course) }} {{ _('View') }} {{ _('Edit') }} {{ delete_button(url_for('courses.admin_course_delete', course_id=course.id), confirm_form, _('Remove this course and everything in it?')) }}
{# Copying is how next September starts: the pages that repeat come across, withheld, and last year's dates do not come with them. #}
{{ copy_form.hidden_tag() }}
{# One form object renders every row, so the id has to be made unique per course. #} {{ copy_form.name(class="form-control", id="copy-name-" ~ course.id, placeholder=_('Name of the new course')) }}
{{ _('Everything is copied withheld, so nothing is released before you say so.') }}
{{ _('No courses yet.') }}
{% endblock %}