Skip to content

Commit 9d09543

Browse files
committed
Added a button to quickly go to all label profiles editor
Related to issue #806
1 parent a611639 commit 9d09543

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

templates/label_system/dialog.html.twig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<label class="col-sm-3 col-form-label">{% trans %}label_generator.selected_profile{% endtrans %}</label>
6060
<div class="col-sm-9">
6161
<span class="form-control-plaintext">{{ profile.name ?? '-' }}
62-
{% if profile %}
62+
{% if profile and is_granted("edit", profile) %}
6363
<a href="{{ entity_url(profile, 'edit') }}" title="{% trans %}label_generator.edit_profile{% endtrans %}"
6464
><i class="fas fa-edit"></i></a>
6565
{% endif %}
@@ -91,6 +91,14 @@
9191
</div>
9292
</div>
9393
</div>
94+
95+
{% if is_granted("@labels.read_profiles") %}
96+
<div class="form-group row">
97+
<div class="offset-sm-3 col-sm-9">
98+
<a class="btn btn-link" href="{{ path('label_profile_new') }}">{% trans %}label_generator.edit_profiles{% endtrans %}</a>
99+
</div>
100+
</div>
101+
{% endif %}
94102
</div>
95103
</div>
96104

translations/messages.en.xlf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12293,5 +12293,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g
1229312293
<target>Decoded information</target>
1229412294
</segment>
1229512295
</unit>
12296+
<unit id="nmXQWcS" name="label_generator.edit_profiles">
12297+
<segment>
12298+
<source>label_generator.edit_profiles</source>
12299+
<target>Edit profiles</target>
12300+
</segment>
12301+
</unit>
1229612302
</file>
1229712303
</xliff>

0 commit comments

Comments
 (0)