Commit abf8acd1 authored by Julian Rother's avatar Julian Rother
Browse files

Forgot to add feed templates

parent a0c7fac9
{% macro summary(entry) %}
{% if not course.handle %}
Veranstaltung: <a href="{{ url_for('course_id', id=entry.course_handle) }}">{{entry.course_title}}</a><br>
{% if entry.course_organizer %}
Veranstalter: {{ entry.course_organizer }}<br>
{% endif %}
{% endif %}
{% if entry.speaker %}
Gehalten von {{ entry.speaker }}<br>
{% endif %}
{{ entry.comment }}
{% endmacro %}
{% macro subtitle() %}
Veranstaltung: <a href="{{ url_for('course_id', id=course.handle) }}">{{course.title}}</a><br>
{% if course.organizer %}
Veranstalter: {{ course.organizer }}<br>
{% endif %}
<p>{{ course.description }}</p>
{% endmacro %}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ course.atomid }}</id>
<title>{{ course.title }} — Video AG, FSMPI</title>
<author>
<name>Video AG, FSMPI, RWTH Aachen</name>
<email>video@fsmpi.rwth-aachen.de</email>
</author>
{% if not course.handle %}
<link rel="alternate" href="{{ url_for('course', _external=True) }}" />
{% else %}
<link rel="alternate" href="{{ url_for('course_id', id=course.handle, _external=True) }}" />
{% endif %}
<link rel="self" href="{{ request.url }}" />
<icon>{{ url_for('static', filename='favicon.png', _external=True) }}</icon>
<logo>https://videoag.fsmpi.rwth-aachen.de/site/video-logo-150px.png</logo>
<updated>{{ course.updated|rfc3339 }}</updated>
{% if not course.handle %}
<subtitle>Alle neuen Videos der Video AG!</subtitle>
{% else %}
<subtitle type="html">{{ subtitle()|e }}</subtitle>
{% endif %}
{% for entry in entries %}
<entry>
<title>{% if not course.handle %}{{ entry.course_short }} {% if entry.semester %}({{ entry.semester|semester }}){% endif %}, {% endif %}{{ entry.time|date }}: {{ entry.title }}</title>
{% if not course.handle and entry.course_organizer %}
<author>
<name>{{ entry.course_organizer }}</name>
</author>
{% endif %}
{% if entry.speaker %}
<author>
<name>{{ entry.speaker }}</name>
</author>
{% endif %}
<link rel="alternate" href="{{ url_for('play', id=entry.id, _external=True) }}"/>
<link rel="enclosure" href="{{ url_for('files', filename=entry.path, _external=True)}}" length="{{ entry.file_size }}"/>
<id>{{ entry.atomid }}</id>
<updated>{{ entry.updated|rfc3339 }}</updated>
<summary type="html">{{ summary(entry)|e }}</summary>
</entry>
{% endfor %}
</feed>
{% macro summary(course) %}
{% if course.organizer %}
Veranstalter: {{ course.organizer }}<br>
{% endif %}
<p>{{ course.description }}</p>
{% endmacro %}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ atomid }}</id>
<updated>{{ updated|rfc3339 }}</updated>
<title>Neueste Veranstaltungen — Video AG, FSMPI</title>
<author>
<name>Video AG, FSMPI, RWTH Aachen</name>
<email>video@fsmpi.rwth-aachen.de</email>
</author>
<link rel="alternate" href="{{ url_for('course', _external=True) }}"/>
<link rel="self" href="{{ request.url }}"/>
<icon>{{ url_for('static', filename='favicon.png', _external=True) }}</icon>
<logo>https://videoag.fsmpi.rwth-aachen.de/site/video-logo-150px.png</logo>
<subtitle>Alle neuen Veranstaltungen der Video AG!</subtitle>
{% for course in courses %}
<entry>
<id>{{ course.atomid }}</id>
<updated>{{ course.updated|rfc3339 }}</updated>
<title>{{ course.title|e }} {% if course.semester %}({{ course.semester|semester|e }}){% endif %}</title>
{% if course.organizer %}
<author>
<name>{{ course.organizer|e }}</name>
</author>
{% endif %}
<link rel="alternate" href="{{ url_for('course_id', id=course.handle, _external=True) }}"/>
<link rel="alternate" href="{{ url_for('feed', handle=course.handle, _external=True) }}" type="application/atom+xml" title="Feed"/>
<summary type="html">{{ summary(course)|e }}</summary>
</entry>
{% endfor %}
</feed>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment