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
007803de
Commit
007803de
authored
Oct 21, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use per resource license field
Issue #507 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
576dad54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
weblate/accounts/views.py
weblate/accounts/views.py
+3
-3
weblate/html/accounts/profile.html
weblate/html/accounts/profile.html
+6
-6
weblate/html/project_info.html
weblate/html/project_info.html
+0
-13
weblate/html/subproject_info.html
weblate/html/subproject_info.html
+13
-0
No files found.
weblate/accounts/views.py
View file @
007803de
...
...
@@ -44,7 +44,7 @@ from social.apps.django_app.views import complete
import
weblate
from
weblate.accounts.avatar
import
get_avatar_image
,
get_fallback_avatar_url
from
weblate.accounts.models
import
set_lang
,
remove_user
,
Profile
from
weblate.trans.models
import
Change
,
Project
from
weblate.trans.models
import
Change
,
Project
,
SubProject
from
weblate.accounts.forms
import
(
ProfileForm
,
SubscriptionForm
,
UserForm
,
ContactForm
,
SubscriptionSettingsForm
...
...
@@ -180,8 +180,8 @@ def user_profile(request):
x
for
x
in
all_backends
if
x
==
'email'
or
x
not
in
social_names
]
license_projects
=
Project
.
objects
.
all_acl
(
request
.
user
license_projects
=
SubProject
.
objects
.
filter
(
project__in
=
Project
.
objects
.
all_acl
(
request
.
user
)
).
exclude
(
license
=
''
)
...
...
weblate/html/accounts/profile.html
View file @
007803de
...
...
@@ -252,20 +252,20 @@
</p>
{% if licenses %}
<p>
{% trans "Following
project
s have explicitly specified their licensing and copyright conditions:" %}
</p>
<p>
{% trans "Following
translation
s have explicitly specified their licensing and copyright conditions:" %}
</p>
<table
class=
"table"
>
<thead>
<tr><th>
{% trans "Project" %}
</th><th>
{% trans "License" %}
</th></tr>
</thead>
<tbody>
{% for
project
in licenses %}
{% for
resource
in licenses %}
<tr>
<th><a
href=
"{{
project.get_absolute_url }}"
>
{{ project
.name }}
</a></th>
<th><a
href=
"{{
resource.get_absolute_url }}"
>
{{ resource
.name }}
</a></th>
<td>
{% if
project
.license_url %}
<a
href=
"{{
project.license_url }}"
>
{{ project
.license }}
</a></p>
{% if
resource
.license_url %}
<a
href=
"{{
resource.license_url }}"
>
{{ resource
.license }}
</a></p>
{% else %}
{{
project
.license }}
{{
resource
.license }}
{% endif %}
</td>
</tr>
...
...
weblate/html/project_info.html
View file @
007803de
...
...
@@ -17,16 +17,3 @@
<td
colspan=
"2"
><a
href=
"{{ object.instructions }}"
>
{{ object.instructions }}
</a></td>
</tr>
{% endif %}
{% if object.license %}
<tr>
<th>
{% trans "Translation license" %}
</th>
<td
colspan=
"2"
>
{% if object.license_url %}
<a
href=
"{{ object.license_url }}"
>
{{ object.license }}
</a>
{% else %}
{{ object.license }}
{% endif %}
</td>
</tr>
{% endif %}
weblate/html/subproject_info.html
View file @
007803de
...
...
@@ -4,6 +4,19 @@
{% include "project_info.html" %}
{% endwith %}
{% if object.license %}
<tr>
<th>
{% trans "Translation license" %}
</th>
<td
colspan=
"2"
>
{% if object.license_url %}
<a
href=
"{{ object.license_url }}"
>
{{ object.license }}
</a>
{% else %}
{{ object.license }}
{% endif %}
</td>
</tr>
{% endif %}
{% if perms.trans.can_see_git_repository %}
<tr>
<th>
{% trans "Git repository" %}
</th>
...
...
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