blob: e8e2551a83c46ce6e744e1750264b2dd67cb8d64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{{extend 'default/_base.html'}}
<h1>{{ = image.title}}</h1>
<img width="1000px"src="{{=URL(r=request, f='download', args=image.newimage)}}">
<br>
{{if auth.is_logged_in():}}
{{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}}
{{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>
<h2>Comments</h2>
{{for comment in comments:}}
<a href={{= "profile?profile=" +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}}
{{if auth.is_logged_in():}}
<h2>Write a Comment</h2>
{{=form}}
|