Add tag delete button to specific tag page.
On the main tag listing, for child tags, you only get an unlink button on hover. So if you want to delete a child tag you'd have to unlink, then refresh, then delete. Now you can just go to its page and delete it there.
This commit is contained in:
		
							parent
							
								
									3f2cde02e1
								
							
						
					
					
						commit
						9ac91d3850
					
				
					 2 changed files with 24 additions and 0 deletions
				
			
		|  | @ -281,6 +281,18 @@ function remove_synonym(tag_name, syn_name, callback) | ||||||
|     common.post(url, data, callback); |     common.post(url, data, callback); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | api.tags.callback_go_to_tags = | ||||||
|  | function callback_go_to_tags(response) | ||||||
|  | { | ||||||
|  |     if (response["meta"]["status"] == 200) | ||||||
|  |     { | ||||||
|  |         window.location.href = "/tags"; | ||||||
|  |     } | ||||||
|  |     else | ||||||
|  |     { | ||||||
|  |         console.log(response); | ||||||
|  |     } | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| /**************************************************************************************************/ | /**************************************************************************************************/ | ||||||
| api.users = {}; | api.users = {}; | ||||||
|  |  | ||||||
|  | @ -125,6 +125,18 @@ h2, h3 | ||||||
|                 </pre> |                 </pre> | ||||||
|             </div> |             </div> | ||||||
|             <button class="green_button editor_toolbox_placeholder">Edit</button> |             <button class="green_button editor_toolbox_placeholder">Edit</button> | ||||||
|  | 
 | ||||||
|  |             <button | ||||||
|  |             class="red_button button_with_confirm" | ||||||
|  |             data-onclick="api.tags.delete('{{specific_tag.name}}', api.tags.callback_go_to_tags);" | ||||||
|  |             data-prompt="Delete Tag?" | ||||||
|  |             data-confirm="Delete" | ||||||
|  |             data-confirm-class="red_button" | ||||||
|  |             data-cancel-class="gray_button" | ||||||
|  |             > | ||||||
|  |             Delete | ||||||
|  |             </button> | ||||||
|  | 
 | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|         {% set parents = specific_tag.get_parents() %} |         {% set parents = specific_tag.get_parents() %} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue