-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #772 from jaguarfi/fix_746_course_instances_page
Add instances page and redirect to the last course
- Loading branch information
Showing
5 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
{% load course %} | ||
|
||
{% block title %}{% trans "Course instances" %} | {{ block.super }}{% endblock %} | ||
{% block view_tag %}instances{% endblock %} | ||
|
||
{% block content %} | ||
<div class="frontpage-panel"> | ||
<div class="page-header"> | ||
<h1>{% trans "Course instances" %}</h1> | ||
</div> | ||
{% if instances %} | ||
{% regroup instances by starting_time|date:"Y" as instances_by_year %} | ||
{% for year, year_instances in instances_by_year %} | ||
<section class="frontpage frontpage-section" aria-labelledby="course-instances-in-{{ year }}"> | ||
<div class="section-heading"> | ||
<h2 id="course-instances-in-{{year}}">{{ year }}</h2> | ||
</div> | ||
<div class="cards"> | ||
{% include "course/_course_cards.html" with instances=year_instances condensed=True %} | ||
</div> | ||
</section> | ||
{% endfor %} | ||
{% else %} | ||
<h2>{{ msg }}</h2> | ||
{% endif %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters