Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6dd29f48
authored
Jun 12, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add gravatar option to my preferences
parent
9ece75fb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
circle/dashboard/forms.py
+2
-1
circle/dashboard/templates/dashboard/profile.html
+1
-1
circle/dashboard/templates/dashboard/profile_form.html
+19
-3
No files found.
circle/dashboard/forms.py
View file @
6dd29f48
...
...
@@ -1103,7 +1103,8 @@ class TraitForm(forms.ModelForm):
class
MyProfileForm
(
forms
.
ModelForm
):
class
Meta
:
fields
=
(
'preferred_language'
,
'email_notifications'
,
)
fields
=
(
'preferred_language'
,
'email_notifications'
,
'use_gravatar'
,
)
model
=
Profile
@property
...
...
circle/dashboard/templates/dashboard/profile.html
View file @
6dd29f48
...
...
@@ -38,7 +38,7 @@
{%
if
profile
.
profile
.
use_gravatar
%}
checked=
"checked"
{%
endif
%}
type=
"checkbox"
/>
<a
href=
"https://gravatar.com"
>
{% trans "What's Gravatar?" %}
</a>
</p>
<a
href=
"{% url "
dashboard
.
views
.
profile-preferences
"
%}"
>
{% trans "Change
password and language
" %}
</a>
<a
href=
"{% url "
dashboard
.
views
.
profile-preferences
"
%}"
>
{% trans "Change
my preferences
" %}
</a>
{% endif %}
</div>
<div
class=
"clearfix"
></div>
...
...
circle/dashboard/templates/dashboard/profile_form.html
View file @
6dd29f48
...
...
@@ -10,23 +10,39 @@
<div
class=
"col-md-12"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<a
class=
"pull-right btn btn-default btn-xs"
href=
"{% url "
dashboard
.
index
"
%}"
>
{% trans "Back" %}
</a>
<a
class=
"pull-right btn btn-default btn-xs"
href=
"{% url "
dashboard
.
views
.
profile
"
username=
object.user.username
%}"
>
{% trans "Go to my profile" %}
</a>
<h3
class=
"no-margin"
><i
class=
"icon-desktop"
></i>
{% trans "My profile" %}
</h3>
</div>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-
sm
-4"
style=
"margin-bottom: 50px;"
>
<div
class=
"col-
md
-4"
style=
"margin-bottom: 50px;"
>
<fieldset>
<legend>
{% trans "Password change" %}
</legend>
{% crispy forms.change_password %}
</fieldset>
</div>
<div
class=
"col-
sm-offset-5 col-sm-3
"
>
<div
class=
"col-
md-4"
style=
"margin-bottom: 50px;
"
>
<fieldset>
<legend>
{% trans "Language selection" %}
</legend>
{% crispy forms.change_language %}
</fieldset>
</div>
<div
class=
"col-md-4"
>
<fieldset>
<legend>
{% trans "Current avatar" %}
</legend>
<p>
<img
id=
"dashboard-profile-avatar"
class=
"img-rounded"
src=
"{{ object.get_avatar_url }}"
/>
</p>
<p>
<a
href=
"{% url "
dashboard
.
views
.
profile
"
username=
profile.user.username
%}"
>
{% trans "Go to my profile" %}
</a>
</p>
</fieldset>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment