Implement voting for editor permissions (draft)
This commit is contained in:
@@ -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 %}
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
<i class="fa fa-copy"></i>
|
||||
</span>
|
||||
</a>
|
||||
<a href="{{ path('app_collection_del', {'id' : record.id}) }}"
|
||||
<button data-url="{{ path('app_collection_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>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -74,7 +74,7 @@
|
||||
<tr><th>External identifier(s)</th><td>{{ record.externalIdentifier }}</td></tr>
|
||||
<tr><th>External link(s)</th><td>{{ record.link }}</td></tr>
|
||||
<tr><th>Subject headings</th><td>{{ record.subjectHeadings }}</td></tr>
|
||||
<tr><th>ArCOA URI</th><td>{{ record.uri }}</td></tr>
|
||||
<tr><th>ArCOA URI</th><td>arcoa.cnr.it/collection/{{ record.id }}</td></tr>
|
||||
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,15 @@
|
||||
<h1 class="is-size-1 mt-0 has-text-centered">Collector</h1>
|
||||
<h2 class="is-size-3 mt-3 has-text-centered">{{ record.name }}</h2>
|
||||
|
||||
{% for message in app.flashes('notice') %}
|
||||
<div class=" mt-4 notification is-success"
|
||||
data-controller="notification"
|
||||
data-notification-target="notif">
|
||||
<button class="delete" data-action="click->notification#close"></button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<article class="message is-info mt-3">
|
||||
<div class="message-body">
|
||||
<p>
|
||||
@@ -27,20 +36,21 @@
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</button>
|
||||
<button class="button is-link">
|
||||
<a href="{{ path('app_collector_copy', {'id' : record.id}) }}"
|
||||
class="button is-link">
|
||||
Copy
|
||||
<span class="icon ml-2">
|
||||
<i class="fa fa-copy"></i>
|
||||
</span>
|
||||
</button>
|
||||
<a href=""
|
||||
</a>
|
||||
<button data-url="{{ path('app_collector_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>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -64,7 +74,7 @@
|
||||
<tr><th>External identifier(s)</th><td>{{ record.externalIdentifier }}</td></tr>
|
||||
<tr><th>External link(s)</th><td>{{ record.link }}</td></tr>
|
||||
<tr><th>Subject headings</th><td>{{ record.subjectHeadings }}</td></tr>
|
||||
<tr><th>ArCOA URI</th><td>{{ record.uri }}</td></tr>
|
||||
<tr><th>ArCOA URI</th><td>arcoa.cnr.it/collector/{{ record.id }}</td></tr>
|
||||
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -4,10 +4,13 @@
|
||||
|
||||
{% block rightpanel %}
|
||||
{% for message in app.flashes('warning') %}
|
||||
<article class="message is-warning mb-6 mt-3 ml-auto mr-auto" style="max-width: 35vw">
|
||||
<article class="message is-warning mb-6 mt-3 ml-auto mr-auto" style="max-width: 35vw"
|
||||
data-controller="notification"
|
||||
data-notification-target="notif">
|
||||
<div class="message-header">
|
||||
<p>Warning</p>
|
||||
<button class="delete" aria-label="delete"></button>
|
||||
<button class="delete" aria-label="delete"
|
||||
data-action="click->notification#close"></button>
|
||||
</div>
|
||||
<div class="message-body">{{ message }}</div>
|
||||
</article>
|
||||
@@ -40,13 +43,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" defer>
|
||||
const warning = document.querySelector('.is-warning');
|
||||
|
||||
if (warning) {
|
||||
warning.querySelector('.delete').addEventListener('click', () => {
|
||||
warning.classList.add('is-hidden');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user