Show user picture on blog update page
This commit is contained in:
parent
49496e1c2e
commit
aa395ca206
|
@ -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(
|
||||
|
|
|
@ -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…
Reference in New Issue
Block a user