Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
b4cab11a
Commit
b4cab11a
authored
Jul 27, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include some information in user profile
parent
9de50add
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
weblate/accounts/views.py
weblate/accounts/views.py
+3
-1
weblate/html/profile.html
weblate/html/profile.html
+21
-0
No files found.
weblate/accounts/views.py
View file @
b4cab11a
...
...
@@ -57,13 +57,15 @@ def profile(request):
subscriptionform
=
SubscriptionForm
(
instance
=
request
.
user
.
get_profile
())
userform
=
UserForm
(
instance
=
request
.
user
)
profile
=
request
.
user
.
get_profile
()
response
=
render_to_response
(
'profile.html'
,
RequestContext
(
request
,
{
'form'
:
form
,
'userform'
:
userform
,
'subscriptionform'
:
subscriptionform
,
'profile'
:
profile
,
'title'
:
_
(
'User profile'
),
}))
response
.
set_cookie
(
settings
.
LANGUAGE_COOKIE_NAME
,
request
.
user
.
get_profile
()
.
language
)
response
.
set_cookie
(
settings
.
LANGUAGE_COOKIE_NAME
,
profile
.
language
)
return
response
def
contact
(
request
):
...
...
weblate/html/profile.html
View file @
b4cab11a
...
...
@@ -22,6 +22,7 @@
<li><a
href=
"#subscriptions"
>
{% trans "Subscriptions" %}
</a></li>
<li><a
href=
"#account"
>
{% trans "Account" %}
</a></li>
<li><a
href=
"#password"
>
{% trans "Password" %}
</a></li>
<li><a
href=
"#info"
>
{% trans "Information" %}
</a></li>
</ul>
<div
id=
"preferences"
>
<table>
...
...
@@ -44,6 +45,26 @@
{% url 'django.contrib.auth.views.password_change' as pw_url %}
{% blocktrans %}You can change password on
<a
href=
"{{ pw_url }}"
>
separate page
</a>
.{% endblocktrans %}
</div>
<div
id=
"info"
>
<table>
<tr>
<th>
{% trans "Suggestions made" %}
</th>
<td>
{{ profile.suggested }}
</td>
</tr>
<tr>
<th>
{% trans "Translations made" %}
</th>
<td>
{{ profile.translated }}
</td>
</tr>
<tr>
<th>
{% trans "Last login" %}
</th>
<td>
{{ request.user.last_login|date:"DATETIME_FORMAT" }}
</td>
</tr>
<tr>
<th>
{% trans "Registration date" %}
</th>
<td>
{{ request.user.date_joined|date:"DATETIME_FORMAT" }}
</td>
</tr>
</table>
</div>
</div>
<input
type=
"submit"
value=
"{% trans "
Save
"
%}"
class=
"button"
/>
...
...
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