re-add rss feeds
This commit is contained in:
21
app/templates/topics/topic.atom
Normal file
21
app/templates/topics/topic.atom
Normal file
@@ -0,0 +1,21 @@
|
||||
{% from 'common/macros.html' import rss_html_content %}
|
||||
{%- extends 'base.atom' -%}
|
||||
{%- block title -%}latest threads in {{topic.name | escape}}{%- endblock -%}
|
||||
{%- block canonical_link -%}{{ url_for('topics.topic_by_id', topic_id=topic.id, _external=true) }}{%- endblock -%}
|
||||
{%- block content -%}
|
||||
<subtitle>{{ topic.description | escape }}</subtitle>
|
||||
{%- for thread in threads_list -%}
|
||||
<entry>
|
||||
<title>{{ thread.title | escape }}</title>
|
||||
<link href="{{ url_for('threads.thread_by_id', thread_id=thread.id, _external=true) }}"/>
|
||||
<link rel="replies" type="application/atom+xml" href="{{ url_for('threads.feed', thread_id=thread.id, _external=true) }}"/>
|
||||
<id>{{ url_for('threads.thread_by_id', thread_id=thread.id, _external=true) }}</id>
|
||||
{{ rss_html_content(thread.original_post_content) }}
|
||||
<updated>{{ thread.created_at | iso8601 }}</updated>
|
||||
<author>
|
||||
<name>{{ thread.started_by_display_name | escape }} @{{ thread.started_by }}</name>
|
||||
<uri>{{ url_for('users.user_page', username=thread.started_by, _external=true) }}</uri>
|
||||
</author>
|
||||
</entry>
|
||||
{%- endfor -%}
|
||||
{%- endblock -%}
|
||||
@@ -20,7 +20,7 @@
|
||||
<a href="{{url_for('topics.feed', topic_id=topic.id)}}" class="linkbutton rss">Subscribe via RSS</a>
|
||||
<form method="GET">
|
||||
<select name="sort_by">
|
||||
<option value="activity"{% if sort_by == 'activity' %}selected{% endif %}>Sorted by activity</option>
|
||||
<option value="activity" {% if sort_by == 'activity' %}selected{% endif %}>Sorted by activity</option>
|
||||
<option value="thread" {% if sort_by == 'thread' %}selected{% endif %}>Sorted by newest</option>
|
||||
</select>
|
||||
<input type="submit" value="Sort">
|
||||
|
||||
Reference in New Issue
Block a user