Add author to bookmark card.
This commit is contained in:
parent
4da25c1d9e
commit
e101f4c2d8
2 changed files with 11 additions and 2 deletions
|
@ -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 %}
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue