diff options
-rw-r--r-- | app/templates/macros/topics.html | 7 | ||||
-rw-r--r-- | app/views/__init__.py | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/app/templates/macros/topics.html b/app/templates/macros/topics.html index 66d11b4..5ef224a 100644 --- a/app/templates/macros/topics.html +++ b/app/templates/macros/topics.html @@ -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 %} diff --git a/app/views/__init__.py b/app/views/__init__.py index 4f45909..7ca7620 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -33,6 +33,10 @@ 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" |