diff options
Diffstat (limited to 'views/default/image.html')
-rw-r--r-- | views/default/image.html | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/views/default/image.html b/views/default/image.html index 7af062f..223ed4d 100644 --- a/views/default/image.html +++ b/views/default/image.html @@ -3,11 +3,25 @@ <img width="1000px"src="{{=URL(r=request, f='download', args=image.newimage)}}"> <br> {{if auth.is_logged_in():}} - {{if image.creator == auth.user.username:}} - <a href={{="delete?id="+str(image.id)}}>delete image</a> + {{if auth.user.username in favorites:}} + <a href={{="remove_as_favorite?id="+str(image.id)}}>remove from favorites</a> + {{pass}} + {{if auth.user.username not in favorites:}} + <a href={{="add_as_favorite?id="+str(image.id)}}>add to favorites</a> + {{pass}} + <br><br> + {{if image.creator == auth.user.username or auth.has_membership('admin'):}} + <a href={{="delete_image_confirmation?id="+str(image.id)}}>delete image</a> {{pass}} + <!--<br><br> + {{if image.creator == auth.user.username:}} + {{pass}} + <a href={{="make_avatar?image="+str(image.id)}}>make this your avatar</a>>--> {{pass}} -<p>{{ = "author: "}}<a href={{= "index?profile=" +str(image.creator)}}>{{=image.creator}} </a></p> +{{if len(favorites) > 0:}} + <p>{{ = "this is in " + str(len(favorites)) + " users favorite pictures"}}</p> + {{pass}} +<p>{{ = "author: "}}<a href={{= "profile?profile=" +str(image.creator)}}>{{=image.creator}} </a></p> <a href="{{=URL(r=request, f='download', args=image.file)}}"> Download TA file</a> <p>{{ = "description: " + str(image.description)}}</p> <p>views: {{=image.views}}</p> @@ -15,6 +29,11 @@ {{for comment in comments:}} <a href={{= "profile?user=" +str(comment.author)}}>{{=comment.author}} </a> {{=": " + comment.body}} + {{if auth.is_logged_in():}} + {{if image.creator == auth.user.username or auth.has_membership('admin'):}} + ( <a href={{="delete_comment?id="+str(comment.id)+";image="+str(image.id)}}>delete comment</a> ) + {{pass}} + {{pass}} <br> <br> {{pass}} |