Commit 6d723503 authored by Michal Čihař's avatar Michal Čihař

Better name for git locking

parent db948905
......@@ -11,8 +11,8 @@
{% if perms.trans.reset_translation %}
<li><a href="{{ object.get_reset_url }}" title="{% trans "Reset all changes in local repository" %}" class="confirm-reset">{% trans "Reset" %}</a></li>
{% endif %}
{% if perms.trans.lock_translation and object.is_lockable %}
{% if object.is_locked %}
{% if perms.trans.lock_translation and object.is_git_lockable %}
{% if object.is_git_locked %}
<li><a href="{{ object.get_unlock_url }}" title="{% trans "Allow changes in the repository" %}">{% trans "Unlock" %}</a></li>
{% else %}
<li><a href="{{ object.get_lock_url }}" title="{% trans "Prevent any changes in the repository" %}">{% trans "Lock" %}</a></li>
......
......@@ -160,10 +160,10 @@ class Project(models.Model):
'project': self.slug
})
def is_lockable(self):
def is_git_lockable(self):
return True
def is_locked(self):
def is_git_locked(self):
return max([sp.locked for sp in self.subproject_set.all()])
@models.permalink
......@@ -366,10 +366,10 @@ class SubProject(models.Model):
'subproject': self.slug
})
def is_lockable(self):
def is_git_lockable(self):
return True
def is_locked(self):
def is_git_locked(self):
return self.locked
@models.permalink
......@@ -937,7 +937,7 @@ class Translation(models.Model):
'lang': self.language.code
})
def is_lockable(self):
def is_git_lockable(self):
return False
@models.permalink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment