From f9123172c6bfc6d70d9318815942c28d9d65cb38 Mon Sep 17 00:00:00 2001 From: Julian Rother <julianr@fsmpi.rwth-aachen.de> Date: Thu, 16 Feb 2017 00:17:00 +0100 Subject: [PATCH] Made courses list's group panels collapsable (#222) --- templates/courses.html | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/courses.html b/templates/courses.html index 09fa22d..bab3781 100644 --- a/templates/courses.html +++ b/templates/courses.html @@ -34,16 +34,18 @@ {% endif %} {% for g in grouped_courses %} -<div class="row panel-group"> +<div class="row panel-group" id="accordion"> <div class="col-xs-12"><div class="panel panel-default"> <div class="panel-heading"> - {% if groupedby == 'semester' %} - <h1 class="panel-title">{{g.grouper|semester(long=True)}} ({{g.list|length}} Veranstaltungen)</h1> - {% else %} - <h1 class="panel-title">{{g.grouper}}</h1> - {% endif %} + <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#{{g.grouper}}" style="color: #222;"> + {% if groupedby == 'semester' %} + <h1 class="panel-title">{{g.grouper|semester(long=True)}} ({{g.list|length}} Veranstaltungen)</h1> + {% else %} + <h1 class="panel-title">{{g.grouper}}</h1> + {% endif %} + </a> </div> - <ul class="{% if not ismod() %}courses-list {% endif %}list-group"> + <ul class="{% if not ismod() %}courses-list {% endif %}list-group panel-collapse collapse in" id="{{g.grouper}}"> {% for i in g.list|sort(attribute='title') %} {% if groupedby == 'semester' %} {{ course_list_item(i) }} @@ -55,5 +57,4 @@ </div></div> </div> {% endfor %} - {% endblock %} -- GitLab