From 232522688aa07ccf29ee4284bd7efa7fb8f605d7 Mon Sep 17 00:00:00 2001
From: Andreas Valder <andreasv@fsmpi.rwth-aachen.de>
Date: Wed, 31 Aug 2016 09:18:30 +0200
Subject: [PATCH] made schedule links to course move the page to the right
 lecture

---
 templates/course_id.html | 5 +----
 templates/macros.html    | 2 +-
 templates/schedule.html  | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/templates/course_id.html b/templates/course_id.html
index b023577..1b1a4e6 100644
--- a/templates/course_id.html
+++ b/templates/course_id.html
@@ -31,10 +31,7 @@
 </div>
 <div class="panel panel-default">
 	<div class="panel-heading">
-		<h1 class="panel-title">Videos</h1>
-		{% if ismod() %}
-				<a class="btn btn-default" style="margin-right: 5px;" href="todo">Neuer Termin</a>
-		{% endif %}
+		<h1 class="panel-title">Videos{% if ismod() %} <a class="btn btn-default" style="margin-right: 5px;" href="todo">Neuer Termin</a>{% endif %}</h1>
 	</div>
 	<ul class="list-group lectureslist">
 		{% for l in lectures %}
diff --git a/templates/macros.html b/templates/macros.html
index 468bdd1..8bcb597 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -123,7 +123,7 @@ $('#embedcodebtn').popover(
 {% endmacro %}
 
 {% macro lecture_list_item(lecture,videos) %}
-<li class="list-group-item">
+<li class="list-group-item" id="lecture-{{lecture.id}}">
 	<div class="row">
 		<img class="col-sm-2 col-xs-12"src="https://videoag.fsmpi.rwth-aachen.de/{{lecture.titlefile}}" alt="Vorschaubild">
 		<span class="col-sm-3 col-xs-12">
diff --git a/templates/schedule.html b/templates/schedule.html
index f4f64d2..42328d4 100644
--- a/templates/schedule.html
+++ b/templates/schedule.html
@@ -17,7 +17,7 @@
 						{% for l in d.lectures|selectattr('schedule_col','equalto',i) if (((l.time_asdate.time() > t) and (l.time_asdate.time() < times[time_loop.index+1])) != (l.time_asdate.time() == t ) ) %}
 						<td rowspan="{{l.duration / 15}}" style="background: lightgrey;">
 							<p class="small">
-							<strong><a href="{{url_for('course', id=l['course_id'])}}#{{l.id}}">{{l.short}}</a></strong><br>
+							<strong><a href="{{url_for('course', id=l['course_id'])}}#lecture-{{l.id}}">{{l.short}}</a></strong><br>
 								{{l.time_asdate.strftime("%H:%M")}} - {{l.end_asdate.strftime("%H:%M")}}<br>
 								{{l.place}}</p>
 						</td>
-- 
GitLab