diff options
author | James Boisture <jboisture@jboisture-laptop.(none)> | 2010-07-29 18:05:01 (GMT) |
---|---|---|
committer | James Boisture <jboisture@jboisture-laptop.(none)> | 2010-07-29 18:05:01 (GMT) |
commit | 09e3eea7a72e9e2300b639f0356100c7b83b5dfb (patch) | |
tree | d3608997517daa0ae5f98e5bf5ba95c8e29520b9 /views/default/profile.html | |
parent | b817158f554f7b3342ecfe3ce24d04e91abed3c3 (diff) |
made a lot of major changes because it has been a long time since I commited last. There are many new features. Also added app.yaml file which should be placed in the web2py directly in order for the URL to work properly.
Diffstat (limited to 'views/default/profile.html')
-rw-r--r-- | views/default/profile.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/views/default/profile.html b/views/default/profile.html new file mode 100644 index 0000000..ed442c0 --- /dev/null +++ b/views/default/profile.html @@ -0,0 +1,42 @@ +{{extend 'default/_base.html'}} +{{if avatar != None:}} + <img src="{{=URL(r=request,f='download',args=avatar.avatar)}}"/> + {{pass}} +<h1>{{=profile.username + "'s profile"}}</h1> +{{if auth.is_logged_in():}} + {{if profile.username != auth.user.username:}} + {{if ("friend",auth.user.username) in requests:}} + <p>friend request pending</p> + {{pass}} + {{if ("friend",auth.user.username) not in requests and auth.user.username not in friends:}} + <p><a href={{="add_as_friend?user="+profile.username}}>Add as friend</a></p> + {{pass}} + <p>{{=profile.username+" has "+str(len(friends))+" friend(s) ("}}<a href={{="friends?user="+profile.username}}>view all</a>)</p> + {{pass}} + {{if profile.username == auth.user.username:}} + <p>{{="You have "+str(len(friends))+" friend(s) ("}}<a href={{="friends?user="+profile.username}}>view all</a>)</p> + {{pass}} + {{pass}} + +<p>{{=profile.username + "'s submissions ("}}<a href={{="index?profile="+profile.username}}>view all</a>):</p> +{{for row in images:}} + <table><tr> + {{for image in row:}} + <td><a href = {{="image.html?image="+str(image.id)}}> + <img src="{{=URL(r=request, f='download', args=image.small_image)}}" + onclick="ajax('ajaxwiki_onclick',['text'],'html')"/> + <br><center>{{=image.title}}</center></a></td> + {{pass}} + </tr></table> + {{pass}} +<p>{{=profile.username + "'s favorites("}}<a href={{="index?profile="+profile.username+";favorites=True"}}>view all</a>):</p> +{{for row in favorites:}} + <table><tr> + {{for image in row:}} + <td><a href = {{="image.html?image="+str(image.id)}}> + <img width="250px" src="{{=URL(r=request, f='download', args=image.small_image)}}" + onclick="ajax('ajaxwiki_onclick',['text'],'html')"/> + <br><center>{{=image.title}}</center></a></td> + {{pass}} + </tr></table> + {{pass}} |