mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-14 14:22:30 +01:00
Add create date to topic list
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<th>Title</th>
|
||||
{% if show_author %}<th>Author</th>{% endif %}
|
||||
<th>Name</th>
|
||||
<th>Link</th>
|
||||
<th>Date</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for topic in topics %}
|
||||
@ -21,7 +21,7 @@
|
||||
<td><a href="{{ url_for('user_profile_page', username=topic.author.username) }}">{{ topic.author.display_name}}</a></td>
|
||||
{% endif %}
|
||||
<td>{{ topic.name or ""}}</td>
|
||||
<td>{% if topic.link %}<a href="{{ topic.link }}">{{ topic.link | domain }}</a>{% endif %}</td>
|
||||
<td>{{ topic.created_at | date }}</td>
|
||||
<td class="btn-group">
|
||||
<a class="btn btn-primary"
|
||||
href="{{ url_for('create_edit_package_page', author=topic.author.username, repo=topic.getRepoURL(), forums=topic.topic_id, title=topic.title, bname=topic.name) }}">
|
||||
@ -36,6 +36,9 @@
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if topic.link %}
|
||||
<a class="btn btn-info" href="{{ topic.link }}">{{ topic.link | domain }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -32,6 +32,10 @@ def throw(err):
|
||||
def domain(url):
|
||||
return urlparse(url).netloc
|
||||
|
||||
@app.template_filter()
|
||||
def date(value):
|
||||
return value.strftime("%Y-%m-%d")
|
||||
|
||||
@app.template_filter()
|
||||
def datetime(value):
|
||||
return value.strftime("%Y-%m-%d %H:%M") + " UTC"
|
||||
|
Reference in New Issue
Block a user