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
254fefa8
Commit
254fefa8
authored
Oct 21, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify property access
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
c07e75fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
weblate/html/js/git-status.html
weblate/html/js/git-status.html
+1
-1
weblate/trans/models/project.py
weblate/trans/models/project.py
+2
-1
weblate/trans/models/subproject.py
weblate/trans/models/subproject.py
+0
-3
No files found.
weblate/html/js/git-status.html
View file @
254fefa8
...
...
@@ -115,7 +115,7 @@
{% if perms.trans.lock_subproject and object.is_lockable %}
{% if object.
is_git_
locked %}
{% if object.locked %}
<tr>
<td>
<a
href=
"{{ object.get_unlock_url }}"
class=
"btn btn-default"
>
{% trans "Unlock" %}
</a>
...
...
weblate/trans/models/project.py
View file @
254fefa8
...
...
@@ -284,7 +284,8 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
reverse
(
'engage'
,
kwargs
=
{
'project'
:
self
.
slug
})
)
def
is_git_locked
(
self
):
@
property
def
locked
(
self
):
subprojects
=
self
.
subproject_set
.
all
()
if
len
(
subprojects
)
==
0
:
return
False
...
...
weblate/trans/models/subproject.py
View file @
254fefa8
...
...
@@ -312,9 +312,6 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
reverse
(
'engage'
,
kwargs
=
{
'project'
:
self
.
project
.
slug
})
)
def
is_git_locked
(
self
):
return
self
.
locked
def
__unicode__
(
self
):
return
'%s/%s'
%
(
self
.
project
.
__unicode__
(),
self
.
name
)
...
...
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