Commit 92029dbd authored by Michal Čihař's avatar Michal Čihař

Prepare infrastructure for flags editing

Issue #540
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent b565981e
......@@ -190,6 +190,8 @@ Can manage ACL rules for a project [Managers]
Can add users to ACL controlled projects (see :ref:`acl`)
Can edit priority [Managers]
Can adjust source string priority
Can edit check flags [Managers]
Can adjust source string check flags
.. _acl:
......
......@@ -676,6 +676,7 @@ def create_groups(update):
Permission.objects.get(codename='add_suggestion'),
Permission.objects.get(codename='use_mt'),
Permission.objects.get(codename='edit_priority'),
Permission.objects.get(codename='edit_flags'),
Permission.objects.get(codename='manage_acl'),
)
......
......@@ -386,7 +386,10 @@
<th>{% trans "Flags" %}</th>
</tr>
<tr>
<td>{{ unit.all_flags|join:", " }}</td>
<td>
{{ unit.all_flags|join:", " }}
{% if perms.trans.edit_flags %} <a class="button smallbutton" href="{% url 'review_source' project=unit.translation.subproject.project.slug subproject=unit.translation.subproject.slug %}?checksum={{ unit.checksum }}"><i class="fa fa-pencil"></i></a>{% endif %}
</td>
</tr>
{% endif %}
{% include "unit-details.html" %}
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('trans', '0014_auto_20141202_1101'),
]
operations = [
migrations.AlterModelOptions(
name='source',
options={'permissions': (('edit_priority', 'Can edit priority'), ('edit_flags', 'Can edit check flags'))},
),
]
......@@ -48,6 +48,7 @@ class Source(models.Model):
class Meta(object):
permissions = (
('edit_priority', "Can edit priority"),
('edit_flags', "Can edit check flags"),
)
app_label = 'trans'
unique_together = ('checksum', 'subproject')
......
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