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 ###################################################################} | {# 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}}"> | <div class="bookmark_card" data-id="{{bookmark.id}}"> | ||||||
|     <a href="{{bookmark.url}}" class="bookmark_title">{{bookmark.display_name}}</a> |     <a href="{{bookmark.url}}" class="bookmark_title">{{bookmark.display_name}}</a> | ||||||
| 
 | 
 | ||||||
|  | @ -83,6 +83,15 @@ draggable=true | ||||||
|         </button> |         </button> | ||||||
|         {% endif %} |         {% endif %} | ||||||
|     </div> |     </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> | </div> | ||||||
| {% endmacro %} | {% endmacro %} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ h2, h3 | ||||||
|         <div id="hierarchy_bookmarks" class="panel"> |         <div id="hierarchy_bookmarks" class="panel"> | ||||||
|             <h3>Bookmarks by <span class="dynamic_user_display_name">{{user.display_name}}</span></h3> |             <h3>Bookmarks by <span class="dynamic_user_display_name">{{user.display_name}}</span></h3> | ||||||
|             {% for bookmark in bookmarks %} |             {% for bookmark in bookmarks %} | ||||||
|             {{cards.create_bookmark_card(bookmark)}} |             {{cards.create_bookmark_card(bookmark, add_author=False)}} | ||||||
|             {% endfor %} |             {% endfor %} | ||||||
|         </div> |         </div> | ||||||
|         {% endif %} |         {% endif %} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue