Implement voting for editor permissions (draft)

This commit is contained in:
2024-11-11 17:21:36 +01:00
parent adee0f6d0f
commit 097bf6a272
14 changed files with 220 additions and 39 deletions

View File

@@ -27,16 +27,20 @@
</article>
<div class="card p-5">
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %}
{% if not is_granted('ROLE_READER') %}
<div class="columns">
<div class="column is-half"></div>
<div class="column has-text-right">
{% if is_granted('ROLE_REVISOR') or
is_granted('ROLE_ADMIN') or
record.editableStatus %}
<button class="button is-link">
Edit
<span class="icon ml-2">
<i class="fa fa-edit"></i>
</span>
</button>
{% endif %}
<a href="{{ path('app_bibliography_copy', {'id' : record.id}) }}"
class="button is-link">
Copy
@@ -44,14 +48,16 @@
<i class="fa fa-copy"></i>
</span>
</a>
<a href="{{ path('app_bibliography_del', {'id' : record.id}) }}"
{% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %}
<button data-url="{{ path('app_bibliography_del', {'id' : record.id}) }}"
class="button is-danger"
data-delete-record-target="path" data-action="click->delete-record#show">
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
</span>
</a>
</button>
{% endif %}
</div>
</div>
{% endif %}