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
c790c946
Commit
c790c946
authored
Mar 06, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify title generating
parent
d763d39e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
accounts/views.py
accounts/views.py
+2
-2
html/title.html
html/title.html
+5
-1
trans/views.py
trans/views.py
+0
-5
No files found.
accounts/views.py
View file @
c790c946
...
...
@@ -29,7 +29,7 @@ def profile(request):
response
=
render_to_response
(
'profile.html'
,
RequestContext
(
request
,
{
'form'
:
form
,
'userform'
:
userform
,
'title'
:
'%s @ %s'
%
(
_
(
'User profile'
),
settings
.
SITE_TITLE
),
'title'
:
_
(
'User profile'
),
}))
response
.
set_cookie
(
settings
.
LANGUAGE_COOKIE_NAME
,
request
.
user
.
get_profile
().
language
)
return
response
...
...
@@ -58,5 +58,5 @@ def contact(request):
return
render_to_response
(
'contact.html'
,
RequestContext
(
request
,
{
'form'
:
form
,
'title'
:
'%s @ %s'
%
(
_
(
'Contact'
),
settings
.
SITE_TITLE
),
'title'
:
_
(
'Contact'
),
}))
html/title.html
View file @
c790c946
{% if title %}
{{ title }}
{{ title }} @ {{ site_title }}
{% else %}
{% if object %}
{{ object }} @ {{ site_title }}
{% else %}
{{ site_title }}
{% endif %}
{% endif %}
trans/views.py
View file @
c790c946
...
...
@@ -35,7 +35,6 @@ def home(request):
'top_translations'
:
top_translations
,
'top_suggestions'
:
top_suggestions
,
'usertranslations'
:
usertranslations
,
'title'
:
settings
.
SITE_TITLE
,
}))
def
show_project
(
request
,
project
):
...
...
@@ -43,7 +42,6 @@ def show_project(request, project):
return
render_to_response
(
'project.html'
,
RequestContext
(
request
,
{
'object'
:
obj
,
'title'
:
'%s @ %s'
%
(
obj
.
__unicode__
(),
settings
.
SITE_TITLE
),
}))
def
show_subproject
(
request
,
project
,
subproject
):
...
...
@@ -51,7 +49,6 @@ def show_subproject(request, project, subproject):
return
render_to_response
(
'subproject.html'
,
RequestContext
(
request
,
{
'object'
:
obj
,
'title'
:
'%s @ %s'
%
(
obj
.
__unicode__
(),
settings
.
SITE_TITLE
),
}))
def
show_translation
(
request
,
project
,
subproject
,
lang
):
...
...
@@ -61,7 +58,6 @@ def show_translation(request, project, subproject, lang):
return
render_to_response
(
'translation.html'
,
RequestContext
(
request
,
{
'object'
:
obj
,
'title'
:
'%s @ %s'
%
(
obj
.
__unicode__
(),
settings
.
SITE_TITLE
),
'form'
:
form
,
'search_form'
:
search_form
,
}))
...
...
@@ -228,7 +224,6 @@ def translate(request, project, subproject, lang):
return
render_to_response
(
'translate.html'
,
RequestContext
(
request
,
{
'object'
:
obj
,
'title'
:
'%s @ %s'
%
(
obj
.
__unicode__
(),
settings
.
SITE_TITLE
),
'unit'
:
unit
,
'total'
:
total
,
'type'
:
rqtype
,
...
...
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