Browse Source

Show user picture on blog update page

pull/2/head
Noah Petherbridge 8 years ago
parent
commit
aa395ca206
  1. 1
      rophako/modules/blog.py
  2. 2
      rophako/www/blog/update.html

1
rophako/modules/blog.py

@ -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(

2
rophako/www/blog/update.html

@ -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.

Loading…
Cancel
Save