More delete record fixes...
This commit is contained in:
parent
55588c1f4c
commit
458fd3e562
@ -15,7 +15,13 @@ export default class extends Controller {
|
||||
event.preventDefault();
|
||||
const id = event.currentTarget.getAttribute('data-url').match(/\d+$/)[0];
|
||||
const modal = this.modalTarget;
|
||||
const name = this.nameTargets.find(a => a.href.includes(id)).textContent;
|
||||
let name = '';
|
||||
// For record list in landing pages
|
||||
if (this.nameTargets.length > 1) {
|
||||
name = this.nameTargets.find(a => a.href.includes(id)).textContent;
|
||||
} else {
|
||||
name = this.nameTarget.textContent;
|
||||
}
|
||||
|
||||
const message = `The record '<strong>${name.trim()}</strong>' will be permanently deleted. Proceed?`;
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
||||
<tr><th>Record ID</th><td>{{ record.id }}</td></tr>
|
||||
<tr><th>Status</th><td>{{ record.getStatus() }}</td></tr>
|
||||
<tr><th>Editor(s)</th><td>{{ record.editor }}</td></tr>
|
||||
<tr><th>Citation</th><td>{{ record.citation }}</td></tr>
|
||||
<tr><th>Citation</th><td data-delete-record-target="name">{{ record.citation }}</td></tr>
|
||||
<tr><th>Reference</th><td>{{ record.reference }}</td></tr>
|
||||
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
|
||||
</table>
|
||||
@ -92,7 +92,7 @@
|
||||
<button class="delete" aria-label="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
<p class="is-size-5">This record will be permanently deleted. Proceed?</p>
|
||||
<p class="is-size-5" data-delete-record-target="message"></p>
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<div class="buttons is-right">
|
||||
|
@ -65,7 +65,7 @@
|
||||
<tr><th>Record ID</th><td>{{ record.id }}</td></tr>
|
||||
<tr><th>Status</th><td>{{ record.getStatus() }}</td></tr>
|
||||
<tr><th>Editor(s)</th><td>{{ record.editor }}</td></tr>
|
||||
<tr><th>Collection name</th><td>{{ record.title }}</td></tr>
|
||||
<tr><th>Collection name</th><td data-delete-record-target="name">{{ record.title }}</td></tr>
|
||||
<tr><th>Chronology</th><td>{{ record.chronology }}</td></tr>
|
||||
<tr><th>Start date</th><td>{{ record.startDate }}</td></tr>
|
||||
<tr><th>End date</th><td>{{ record.endDate }}</td></tr>
|
||||
@ -107,7 +107,7 @@
|
||||
<button class="delete" aria-label="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
<p class="is-size-5">This record will be permanently deleted. Proceed?</p>
|
||||
<p class="is-size-5" data-delete-record-target="message"></p>
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<div class="buttons is-right">
|
||||
|
@ -65,7 +65,7 @@
|
||||
<tr><th>Record ID</th><td>{{ record.id }}</td></tr>
|
||||
<tr><th>Status</th><td>{{ record.getStatus() }}</td></tr>
|
||||
<tr><th>Editor(s)</th><td>{{ record.editor }}</td></tr>
|
||||
<tr><th>Name</th><td>{{ record.name }}</td></tr>
|
||||
<tr><th>Name</th><td data-delete-record-target="name">{{ record.name }}</td></tr>
|
||||
<tr><th>Date of birth</th><td>{{ record.birthDate }}</td></tr>
|
||||
<tr><th>Date of death</th><td>{{ record.deathDate }}</td></tr>
|
||||
<tr><th>Places / areas of activity</th><td>{{ record.places }}</td></tr>
|
||||
@ -107,7 +107,7 @@
|
||||
<button class="delete" aria-label="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
<p class="is-size-5">This record will be permanently deleted. Proceed?</p>
|
||||
<p class="is-size-5" data-delete-record-target="message"></p>
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<div class="buttons is-right">
|
||||
|
@ -61,6 +61,14 @@
|
||||
<div class="column is-one-fifth arcoa-menu mb-0">
|
||||
<aside class="menu" data-controller="menu"
|
||||
data-menu-state-value="0">
|
||||
{% if app.request.attributes.get('_route') != 'app_home' %}
|
||||
<p class="menu-label has-text-white mt-3 pt-5 pl-5 is-size-6">
|
||||
<span class="icon is-clickable">
|
||||
<i class="fa fa-home"></i>
|
||||
</span>
|
||||
<a href="{{ path('app_home') }}" class="has-text-white">ArCOA Home</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if 'ROLE_READER' not in app.user.roles %}
|
||||
<p class="menu-label has-text-white mt-3 pt-5 pl-5 is-size-6">
|
||||
Vocabularies
|
||||
|
Loading…
Reference in New Issue
Block a user