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.
|
# Get our available avatars.
|
||||||
g.info["avatars"] = Blog.list_avatars()
|
g.info["avatars"] = Blog.list_avatars()
|
||||||
|
g.info["userpic"] = User.get_picture(uid=g.info["session"]["uid"])
|
||||||
|
|
||||||
# Default vars.
|
# Default vars.
|
||||||
g.info.update(dict(
|
g.info.update(dict(
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script>
|
<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() {
|
$(document).ready(function() {
|
||||||
// Preview their selected avatar.
|
// Preview their selected avatar.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user