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
32e8cece
Commit
32e8cece
authored
Apr 17, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add links to changes browser (fixes #192)
parent
bff4bcd4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
1 deletion
+47
-1
accounts/views.py
accounts/views.py
+2
-0
trans/views/basic.py
trans/views/basic.py
+16
-0
trans/views/edit.py
trans/views/edit.py
+17
-0
weblate/html/last-changes.html
weblate/html/last-changes.html
+7
-1
weblate/media/style.css
weblate/media/style.css
+5
-0
No files found.
accounts/views.py
View file @
32e8cece
...
...
@@ -30,6 +30,7 @@ from django.utils import translation
from
django.core.urlresolvers
import
reverse
from
django.contrib.auth.models
import
User
from
django.views.generic
import
TemplateView
from
urllib
import
urlencode
from
accounts.models
import
set_lang
from
trans.models
import
Change
,
Project
...
...
@@ -205,6 +206,7 @@ def user_page(request, user):
'page_profile'
:
profile
,
'page_user'
:
user
,
'last_changes'
:
last_changes
,
'last_changes_url'
:
urlencode
({
'user'
:
user
.
username
}),
'user_projects'
:
user_projects
,
}
)
...
...
trans/views/basic.py
View file @
32e8cece
...
...
@@ -46,6 +46,7 @@ from trans.views.helper import (
import
weblate
import
datetime
from
urllib
import
urlencode
def
home
(
request
):
...
...
@@ -90,6 +91,7 @@ def home(request):
'top_suggestions'
:
top_suggestions
,
'last_changes'
:
last_changes
,
'last_changes_rss'
:
reverse
(
'rss'
),
'last_changes_url'
:
''
,
'usertranslations'
:
usertranslations
,
}))
...
...
@@ -114,6 +116,7 @@ def show_language(request, lang):
'object'
:
obj
,
'last_changes'
:
last_changes
,
'last_changes_rss'
:
reverse
(
'rss-language'
,
kwargs
=
{
'lang'
:
obj
.
code
}),
'last_changes_url'
:
urlencode
({
'lang'
:
obj
.
code
}),
'dicts'
:
Project
.
objects
.
filter
(
id__in
=
dicts
),
}))
...
...
@@ -182,6 +185,9 @@ def show_project(request, project):
'rss-project'
,
kwargs
=
{
'project'
:
obj
.
slug
}
),
'last_changes_url'
:
urlencode
(
{
'project'
:
obj
.
slug
}
),
}))
...
...
@@ -199,6 +205,9 @@ def show_subproject(request, project, subproject):
'rss-subproject'
,
kwargs
=
{
'subproject'
:
obj
.
slug
,
'project'
:
obj
.
project
.
slug
}
),
'last_changes_url'
:
urlencode
(
{
'subproject'
:
obj
.
slug
,
'project'
:
obj
.
project
.
slug
}
),
}))
...
...
@@ -312,6 +321,13 @@ def show_translation(request, project, subproject, lang):
'project'
:
obj
.
subproject
.
project
.
slug
}
),
'last_changes_url'
:
urlencode
(
{
'lang'
:
obj
.
language
.
code
,
'subproject'
:
obj
.
subproject
.
slug
,
'project'
:
obj
.
subproject
.
project
.
slug
}
),
}))
...
...
trans/views/edit.py
View file @
32e8cece
...
...
@@ -24,9 +24,11 @@ from django.template import RequestContext
from
django.http
import
HttpResponseRedirect
,
HttpResponse
from
django.contrib
import
messages
from
django.contrib.auth.decorators
import
login_required
,
permission_required
from
django.core.urlresolvers
import
reverse
from
django.utils
import
formats
import
uuid
import
time
from
urllib
import
urlencode
from
trans.models
import
SubProject
,
Unit
,
Suggestion
,
Change
from
trans.forms
import
(
...
...
@@ -476,6 +478,21 @@ def translate(request, project, subproject, lang):
'object'
:
obj
,
'unit'
:
unit
,
'last_changes'
:
unit
.
change_set
.
all
()[:
10
],
'last_changes_rss'
:
reverse
(
'rss-translation'
,
kwargs
=
{
'lang'
:
obj
.
language
.
code
,
'subproject'
:
obj
.
subproject
.
slug
,
'project'
:
obj
.
subproject
.
project
.
slug
}
),
'last_changes_url'
:
urlencode
(
{
'lang'
:
obj
.
language
.
code
,
'subproject'
:
obj
.
subproject
.
slug
,
'project'
:
obj
.
subproject
.
project
.
slug
}
),
'total'
:
obj
.
unit_set
.
all
().
count
(),
'search_id'
:
search_result
[
'search_id'
],
'offset'
:
offset
,
...
...
weblate/html/last-changes.html
View file @
32e8cece
{% load i18n %}
{% load translations %}
{% load url from future %}
{% if last_changes_rss %}
<a
class=
"rss menu-float ui-state-default ui-corner-all"
href=
"{{ last_changes_rss }}"
>
...
...
@@ -24,7 +25,12 @@
<td><a
href=
"{{ c.translation.get_absolute_url }}"
>
{{ c.translation }}
</a></td>
</tr>
{% empty %}
<tr><td
colspan=
"4"
>
{% trans "No recent activity has been recorded." %}
</td></tr>
<tr><td
colspan=
"4"
class=
"tablenotice"
>
{% trans "No recent activity has been recorded." %}
</td></tr>
{% endfor %}
</tbody>
<tfoot><tr><td
colspan=
"4"
class=
"tablenotice"
>
<a
href=
"{% url 'changes' %}?{{ last_changes_url }}"
>
{% trans "Browse changes" %}
</a>
</td></tr></tfoot>
</table>
weblate/media/style.css
View file @
32e8cece
...
...
@@ -288,3 +288,8 @@ img.engage-icon {
.error
input
{
background-color
:
#F3D8D8
;
}
.tablenotice
{
text-align
:
center
;
padding
:
0.5em
;
font-style
:
italic
;
}
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