Add profile image
This commit is contained in:
parent
a22afe0c57
commit
57136d9652
15 changed files with 529 additions and 438 deletions
|
@ -263,7 +263,7 @@
|
|||
<span id="user-links">
|
||||
<ul><li><a href="javascript:void(0)">
|
||||
<span>
|
||||
<img src="{{ gravatar(request.user, 32) }}" height="24" width="24">{# -#}
|
||||
<img src="{{ gravatar(request.profile, 32) }}" height="24" width="24">{# -#}
|
||||
<span>
|
||||
<b class="{{request.profile.css_class}}">{{ request.user.username }}</b>
|
||||
</span>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</h3>
|
||||
<div class="sidebox-content">
|
||||
<div class="user-gravatar">
|
||||
<img src="{{ gravatar(request.user, 135) }}"
|
||||
<img src="{{ gravatar(request.profile, 135) }}"
|
||||
alt="gravatar" width="135px" height="135px">
|
||||
</div>
|
||||
<div class="recently-attempted">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% if other_user %}
|
||||
<div class="status-container" style="height: 100%">
|
||||
<img src="{{ gravatar(other_user.user, 135) }}" class="info-pic">
|
||||
<img src="{{ gravatar(other_user, 135) }}" class="info-pic">
|
||||
<svg style="position:absolute; height:100%; width: 100%">
|
||||
<circle class="info-circle"
|
||||
fill="{{'green' if other_online else 'red'}}"/>
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
<section class="message new-message">
|
||||
<div class="info">
|
||||
<a href="{{ url('user_page', request.user.username) }}" class="user">
|
||||
<img src="{{ gravatar(request.user, 135) }}" class="gravatar">
|
||||
<img src="{{ gravatar(request.profile, 135) }}" class="gravatar">
|
||||
<div class="username {{ request.profile.css_class }}">{{ request.user.username }}</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -79,11 +79,13 @@
|
|||
|
||||
{% block body %}
|
||||
<div id="center-float">
|
||||
<form id="edit-form" action="" method="post" class="form-area">
|
||||
{% if form.errors %}
|
||||
<form id="edit-form" action="" method="post" class="form-area" enctype="multipart/form-data">
|
||||
{% if form.errors or form_user.errors %}
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<a href="#" class="close">x</a>
|
||||
{{ form.non_field_errors() }}
|
||||
{{ form.errors }}
|
||||
<br>
|
||||
{{ form_user.errors }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
@ -98,6 +100,10 @@
|
|||
<td> {{ _('School') }}: </td>
|
||||
<td> {{ form_user.last_name }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ _('Avatar') }}: </td>
|
||||
<td>{{ form.profile_image }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
|
@ -127,12 +133,6 @@
|
|||
<td><span class="fullwidth">{{ form.math_engine }}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="http://www.gravatar.com/" title="{{ _('Change your avatar') }}"
|
||||
target="_blank" class="inline-header">{{ _('Change your avatar') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{{ url('password_change') }}" class="inline-header">
|
||||
|
|
13
templates/widgets/image.html
Normal file
13
templates/widgets/image.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% if widget.is_initial %}
|
||||
<div>
|
||||
<a href="{{widget.value.url}}" target=_blank>
|
||||
<img src="{{widget.value.url}}" width="{{widget.width}}" height="{{widget.height}}" style="border-radius: 3px;">
|
||||
</a>
|
||||
<div>
|
||||
{{ widget.input_text }}:
|
||||
{% endif %}
|
||||
<input type="{{ widget.type }}" name="{{ widget.name }}">
|
||||
{% if widget.is_initial %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue