diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-12-21 15:58:43 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-12-21 15:58:43 +0000 |
| commit | c97eefc7b26b6f05800f12bb8d2573f4c632da85 (patch) | |
| tree | 22840a2372168ddeeb46de985d19900c99188362 /app/templates/macros/threads.html | |
| parent | 9da6b45cc371fe99712e273eab5af692b669b833 (diff) | |
| download | cheatdb-c97eefc7b26b6f05800f12bb8d2573f4c632da85.tar.xz | |
Format package page
Diffstat (limited to 'app/templates/macros/threads.html')
| -rw-r--r-- | app/templates/macros/threads.html | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/app/templates/macros/threads.html b/app/templates/macros/threads.html index cdb6b4f..9ce8a73 100644 --- a/app/templates/macros/threads.html +++ b/app/templates/macros/threads.html @@ -25,12 +25,24 @@ {% endif %} {% endmacro %} -{% macro render_threadlist(threads) -%} - <ul> +{% macro render_threadlist(threads, list_group=False) -%} + {% if not list_group %}<ul>{% endif %} + <li {% if list_group %}class="list-group-item"{% endif %}> {% for t in threads %} - <li>{% if t.private %}🔒 {% endif %}<a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a> by {{ t.author.display_name }}</li> + {% if list_group %} + <a href="{{ url_for('thread_page', id=t.id) }}"> + {% if t.private %}🔒 {% endif %} + {{ t.title }} + by {{ t.author.display_name }} + </a> + {% else %} + {% if t.private %}🔒 {% endif %} + <a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a> + by {{ t.author.display_name }} + {% endif %} {% else %} - <li><i>No threads found</i></li> + <i>No threads found</i> {% endfor %} + </li> </ul> {% endmacro %} |
