Add create date to topic list
This commit is contained in:
parent
50889ccca5
commit
fa0506f58a
|
@ -5,7 +5,7 @@
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
{% if show_author %}<th>Author</th>{% endif %}
|
{% if show_author %}<th>Author</th>{% endif %}
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Link</th>
|
<th>Date</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for topic in topics %}
|
{% 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>
|
<td><a href="{{ url_for('user_profile_page', username=topic.author.username) }}">{{ topic.author.display_name}}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ topic.name or ""}}</td>
|
<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">
|
<td class="btn-group">
|
||||||
<a class="btn btn-primary"
|
<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) }}">
|
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 %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if topic.link %}
|
||||||
|
<a class="btn btn-info" href="{{ topic.link }}">{{ topic.link | domain }}</a>
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -32,6 +32,10 @@ def throw(err):
|
||||||
def domain(url):
|
def domain(url):
|
||||||
return urlparse(url).netloc
|
return urlparse(url).netloc
|
||||||
|
|
||||||
|
@app.template_filter()
|
||||||
|
def date(value):
|
||||||
|
return value.strftime("%Y-%m-%d")
|
||||||
|
|
||||||
@app.template_filter()
|
@app.template_filter()
|
||||||
def datetime(value):
|
def datetime(value):
|
||||||
return value.strftime("%Y-%m-%d %H:%M") + " UTC"
|
return value.strftime("%Y-%m-%d %H:%M") + " UTC"
|
||||||
|
|
Loading…
Reference in New Issue