Add author to bookmark card.

This commit is contained in:
voussoir 2021-10-23 18:48:27 -07:00
parent 4da25c1d9e
commit e101f4c2d8
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
2 changed files with 11 additions and 2 deletions

View file

@ -65,7 +65,7 @@ draggable=true
{# BOOKMARK ###################################################################}
{% macro create_bookmark_card(bookmark, add_delete_button=False) %}
{% macro create_bookmark_card(bookmark, add_delete_button=False, add_author=True) %}
<div class="bookmark_card" data-id="{{bookmark.id}}">
<a href="{{bookmark.url}}" class="bookmark_title">{{bookmark.display_name}}</a>
@ -83,6 +83,15 @@ draggable=true
</button>
{% endif %}
</div>
{% if add_author %}
{% set author = bookmark.author %}
{% if author is not none %}
<p>
Author: <a href="/userid/{{author.id}}">{{author.display_name}}</a>
</p>
{% endif %}
{% endif %}
</div>
{% endmacro %}

View file

@ -73,7 +73,7 @@ h2, h3
<div id="hierarchy_bookmarks" class="panel">
<h3>Bookmarks by <span class="dynamic_user_display_name">{{user.display_name}}</span></h3>
{% for bookmark in bookmarks %}
{{cards.create_bookmark_card(bookmark)}}
{{cards.create_bookmark_card(bookmark, add_author=False)}}
{% endfor %}
</div>
{% endif %}