Copy collection; Stimulus controller for vocabs (incomplete)
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
<h1 class="is-size-1 mt-0 has-text-centered">Collection</h1>
|
||||
<h2 class="is-size-3 mt-3 has-text-centered">{{ record.title }}</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,12 +36,13 @@
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</button>
|
||||
<button class="button is-link">
|
||||
<a href="{{ path('app_collection_copy', {'id' : record.id}) }}"
|
||||
class="button is-link">
|
||||
Copy
|
||||
<span class="icon ml-2">
|
||||
<i class="fa fa-copy"></i>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
<a href="{{ path('app_collection_del', {'id' : record.id}) }}"
|
||||
class="button is-danger"
|
||||
data-delete-record-target="path" data-action="click->delete-record#show">
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
<h2 class="is-size-3 mt-3 has-text-centered">Choose action</h2>
|
||||
|
||||
{% for message in app.flashes('notice') %}
|
||||
<div class=" mt-4 notification is-success">
|
||||
<button class="delete"></button>
|
||||
<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>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="card p-5 mt-6 pt-6 pb-6">
|
||||
<div class="columns">
|
||||
@@ -100,12 +102,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" defer>
|
||||
const delBtns = document.querySelectorAll('.delete');
|
||||
for (let btn of delBtns) {
|
||||
btn.addEventListener('click', function () {
|
||||
this.parentElement.classList.add('is-hidden');
|
||||
})
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user