Add Bookmark.display_name, just like Album.
This commit is contained in:
		
							parent
							
								
									4a1aad4622
								
							
						
					
					
						commit
						6fb6b1eeb0
					
				
					 2 changed files with 8 additions and 5 deletions
				
			
		|  | @ -639,6 +639,13 @@ class Bookmark(ObjectBase): | |||
|         self._uncache() | ||||
|         self.deleted = True | ||||
| 
 | ||||
|     @property | ||||
|     def display_name(self): | ||||
|         if self.title: | ||||
|             return self.title | ||||
|         else: | ||||
|             return self.id | ||||
| 
 | ||||
|     @decorators.required_feature('bookmark.edit') | ||||
|     @decorators.transaction | ||||
|     def edit(self, title=None, url=None): | ||||
|  |  | |||
|  | @ -58,11 +58,7 @@ | |||
|                 data-editor-placeholder="title (optional)" | ||||
|                 data-editor-empty-text="{{bookmark.id}}" | ||||
|                 > | ||||
|                     {%- if bookmark.title -%} | ||||
|                         {{bookmark.title}} | ||||
|                     {%- else -%} | ||||
|                         {{bookmark.id}} | ||||
|                     {%- endif -%} | ||||
|                     {{-bookmark.display_name-}} | ||||
|                 </a> | ||||
| 
 | ||||
|                 <a | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue