Show user picture on blog update page

This commit is contained in:
Noah 2014-04-06 20:02:33 -07:00
parent 49496e1c2e
commit aa395ca206
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ def update():
# Get our available avatars.
g.info["avatars"] = Blog.list_avatars()
g.info["userpic"] = User.get_picture(uid=g.info["session"]["uid"])
# Default vars.
g.info.update(dict(

View File

@ -83,7 +83,7 @@
{% block scripts %}
<script>
var userPic = "/static/avatars/default.png"; // TODO
var userPic = "{% if userpic %}{{ app['photo_url'] }}/{{ userpic }}{% else %}/static/avatars/default.png{% endif %}";
$(document).ready(function() {
// Preview their selected avatar.