Custom Calendar

This commit is contained in:
2024-09-29 19:21:20 +02:00
parent b0bda20baa
commit 85c129b602
14 changed files with 159 additions and 34 deletions

View File

@ -62,15 +62,26 @@
<div class="events">
{% for i in events %}
{% if i["weekday"] == e %}
<div class="event start-{{ i["start"][:2]+i["start"][3:] }} end-{{ i["end"][:2]+i["end"][3:]}}">
{% block event %} {% endblock %}
<p class="title">{{ i["name"] }}</p>
<p class="room">{{ i["room"] }}</p>
{% for teacher in i["teacher"] %}
<p class="teacher">{{ teacher }}</p>
{% endfor %}
<p class="time">{{ i["start"] }} - {{ i["end"] }} ({{ i["dur"] }}h)</p>
</div>
{% with event=i %}
<div class="event start-{{ event["start"][:2]+event["start"][3:] }} end-{{ event["end"][:2]+event["end"][3:]}}">
{% if login %}
<div class="userbuttons">
<form method="post" action={{ url_for ("removeEvent", id=event["id"], day=date, name=event["name"]) }}>
<button>👁</button>
</form>
<form>
<button class="plusbutton">+</button>
</form>
</div>
{% endif %}
<p class="title">{{ event["name"] }}</p>
<p class="room">{{ event["room"] }}</p>
{% for teacher in event["teacher"] %}
<p class="teacher">{{ teacher }}</p>
{% endfor %}
<p class="time">{{ event["start"] }} - {{ event["end"] }} ({{ event["dur"] }}h)</p>
</div>
{% endwith %}
{% endif %}
{% endfor %}
</div>

View File

@ -5,11 +5,8 @@
{% block startcontent %}
<h2>{{ name }}s Vorlesungsplan</h2>
{% endblock %}
{% block event %}
<div class="userbuttons">
<button>👁</button>
<button class="plusbutton">+</button>
</div>
{% endblock %}
{% block endcontent %}
<a href={{ url_for("deliverCalendar", uid=uid) }}>Kalender-Abo</a>
<br>
<a href={{ url_for("restoreVL") }}>Ausgeblendete Vorlesungen wieder einblenden</a>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "index.html" %}
{% block content %}
<h2>Ausgeblendete Vorlesungen</h2>
{% for event in events %}
<li>
<a href={{ url_for("restoreEvent", id=event.eventid) }}>{{ event.name }}</a>
</li>
{% endfor %}
{% if events | length == 0 %}
<a href = {{ url_for("displayRapla") }}>Zurück zum Stundenplan (keine ausgeblendeten Vorlesungen) </a>
{% endif %}
{% endblock %}