Show create/modify/update time
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
{% macro author(name, ctime, mtime) %}
|
||||
<p><sub><i>{{ name }} - {{ format_since(ctime) }}{% if ctime != mtime %} (last modified {{ format_since(mtime) }}){% endif %}</i></sub></p>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_comment_pre(comment) %}
|
||||
<div class=comment>
|
||||
<p><sub><i>{{ comment.author }}</i></sub></p>
|
||||
{{ author(comment.author, comment.create_time, comment.modify_time) }}
|
||||
<p>{{ comment.text }}</p>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from 'comment.html' import render_comment, render_comment_pre, render_comment_post, reply %}
|
||||
{% from 'comment.html' import render_comment, render_comment_pre, render_comment_post, reply with context %}
|
||||
|
||||
{% block content %}
|
||||
<sup><a href="{{ url_for('thread', thread_id = thread_id) }}">thread</a></sup>
|
||||
|
||||
@@ -4,10 +4,22 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th>Forum</th>
|
||||
<th>Last update</th>
|
||||
</tr>
|
||||
{% for id, name, description in subforums %}
|
||||
{% for id, name, description, t_id, t_title, t_mtime in subforums %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('subforum', forum_id = id) }}"><b>{{ name }}</b> - {{ description }}</a></td>
|
||||
<td>
|
||||
<p><a href="{{ url_for('subforum', forum_id = id) }}"><b>{{ name }}</b></a></p>
|
||||
<p>{{ description }}</p>
|
||||
</td>
|
||||
{% if t_id %}
|
||||
<td>
|
||||
<p><a href="{{ url_for('thread', thread_id = t_id) }}"><b>{{ t_title }}</b></a></p>
|
||||
<p>{{ format_since(t_mtime) }}</p>
|
||||
</td>
|
||||
{% else %}
|
||||
<td>No threads</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -6,10 +6,18 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th>Topic</th>
|
||||
<th>Author</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th>Comments</th>
|
||||
</tr>
|
||||
{% for id, title in threads %}
|
||||
{% for id, title, ctime, utime, author_id, author, comment_count in threads %}
|
||||
<tr>
|
||||
<th><a href="{{ url_for('thread', thread_id = id) }}">{{ title }}</a></th>
|
||||
<td><a href="{{ url_for('user_info', user_id = author_id) }}">{{ author }}</a></td>
|
||||
<td>{{ format_since(ctime) }}</td>
|
||||
<td>{{ format_since(utime) }}</td>
|
||||
<td>{{ comment_count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from 'comment.html' import render_comment, reply %}
|
||||
{% from 'comment.html' import render_comment, reply, author as f_author with context %}
|
||||
|
||||
{% block content %}
|
||||
{% if manage %}
|
||||
@@ -9,7 +9,7 @@
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<sup><i>{{ author }}</i></sup>
|
||||
<i>{{ f_author(author, create_time, modify_time) }}</i>
|
||||
<p>{{ text }}</p>
|
||||
|
||||
{{ reply() }}
|
||||
|
||||
Reference in New Issue
Block a user