Update site (WIP) + renaming

This commit is contained in:
Nicolò P 2024-12-09 10:19:29 +01:00
parent 5fa894e56a
commit 82e397cbc2
21 changed files with 1130 additions and 800 deletions

View File

@ -17,8 +17,24 @@ use DateTimeImmutable;
class BibliographyController extends AbstractController
{
#[Route('/bibliography/{id<\d+>}', name: 'app_bibliography')]
public function index(Bibliography $bibliography, EntityManagerInterface $em): Response
#[Route('/bibliography', name: 'app_bibliography')]
public function index(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Bibliography::class);
$records = $repo->findBy([], ['id' => 'DESC']);
$count = count($records);
$records = array_slice($records, 0, 15);
return $this->render('bibliography/index.html.twig', [
'controller_name' => 'BibliographyController',
'records' => $records,
'count' => $count,
]);
}
#[Route('/bibliography/{id<\d+>}', name: 'app_bibliography_view')]
public function view(Bibliography $bibliography, EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Collection::class);
$collections = $repo->findAllByBibliography($bibliography->getId());
@ -33,28 +49,12 @@ class BibliographyController extends AbstractController
$bibliography->setEditableStatus($isEditable);
return $this->render('bibliography/index.html.twig', [
return $this->render('bibliography/view.html.twig', [
'controller_name' => 'BibliographyController',
'record' => $bibliography,
]);
}
#[Route('/bibliography', name: 'app_bibliography_landing')]
public function landing(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Bibliography::class);
$records = $repo->findBy([], ['id' => 'DESC']);
$count = count($records);
$records = array_slice($records, 0, 15);
return $this->render('bibliography/landing.html.twig', [
'controller_name' => 'BibliographyController',
'records' => $records,
'count' => $count,
]);
}
#[Route('/bibliography/search', name: 'app_bibliography_search')]
public function search(): Response
{
@ -96,7 +96,7 @@ class BibliographyController extends AbstractController
$this->addFlash('notice', 'Record deleted successfully');
}
return $this->redirectToRoute('app_bibliography_landing');
return $this->redirectToRoute('app_bibliography');
}
/**
@ -137,6 +137,6 @@ class BibliographyController extends AbstractController
$this->addFlash('notice', 'Record copied successfully');
return $this->redirectToRoute('app_bibliography', ['id' => $copy->getId()]);
return $this->redirectToRoute('app_bibliography_view', ['id' => $copy->getId()]);
}
}

View File

@ -15,8 +15,24 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
class CollectionController extends AbstractController
{
#[Route('/collection/{id<\d+>}', name: 'app_collection')]
public function index(Collection $collection, EntityManagerInterface $em): Response
#[Route('/collection', name: 'app_collection')]
public function index(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Collection::class);
$records = $repo->findBy([], ['modifiedAt' => 'DESC']);
$count = count($records);
$records = array_slice($records, 0, 15);
return $this->render('collection/index.html.twig', [
'controller_name' => 'CollectionController',
'records' => $records,
'count' => $count,
]);
}
#[Route('/collection/{id<\d+>}', name: 'app_collection_view')]
public function view(Collection $collection, EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Bibliography::class);
$bibliographies = $repo->findAllByCollection($collection->getId());
@ -26,28 +42,12 @@ class CollectionController extends AbstractController
$isEditable = $repo->hasCreatorEditor($collection->getCreator());
$collection->setEditableStatus($isEditable);
return $this->render('collection/index.html.twig', [
return $this->render('collection/view.html.twig', [
'controller_name' => 'CollectionController',
'record' => $collection,
]);
}
#[Route('/collection', name: 'app_collection_landing')]
public function landing(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Collection::class);
$records = $repo->findBy([], ['modifiedAt' => 'DESC']);
$count = count($records);
$records = array_slice($records, 0, 15);
return $this->render('collection/landing.html.twig', [
'controller_name' => 'CollectionController',
'records' => $records,
'count' => $count,
]);
}
#[Route('/collection/delete/{id<\d+>}', name: 'app_collection_del')]
public function delete(Collection $collection, EntityManagerInterface $em): Response
{
@ -66,7 +66,7 @@ class CollectionController extends AbstractController
$this->addFlash('notice', 'Record deleted successfully');
return $this->redirectToRoute('app_collection_landing');
return $this->redirectToRoute('app_collection');
}
/**
* @todo Move clone logic to __clone() in Entity or Repository
@ -108,6 +108,6 @@ class CollectionController extends AbstractController
$this->addFlash('notice', 'Record copied successfully');
return $this->redirectToRoute('app_collection', ['id' => $copy->getId()]);
return $this->redirectToRoute('app_collection_view', ['id' => $copy->getId()]);
}
}

View File

@ -15,8 +15,8 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
class CollectorController extends AbstractController
{
#[Route('/collector/{id<\d+>}', name: 'app_collector')]
public function index(Collector $collector, EntityManagerInterface $em): Response
#[Route('/collector/{id<\d+>}', name: 'app_collector_view')]
public function view(Collector $collector, EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Bibliography::class);
$bibliographies = $repo->findAllByCollector($collector->getId());
@ -26,14 +26,14 @@ class CollectorController extends AbstractController
$isEditable = $repo->hasCreatorEditor($collector->getCreator());
$collector->setEditableStatus($isEditable);
return $this->render('collector/index.html.twig', [
return $this->render('collector/view.html.twig', [
'controller_name' => 'CollectorController',
'record' => $collector,
]);
}
#[Route('/collector', name: 'app_collector_landing')]
public function landing(EntityManagerInterface $em): Response
#[Route('/collector', name: 'app_collector')]
public function index(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Collector::class);
$records = $repo->findBy([], ['modifiedAt' => 'DESC']);
@ -41,7 +41,7 @@ class CollectorController extends AbstractController
$records = array_slice($records, 0, 15);
return $this->render('collector/landing.html.twig', [
return $this->render('collector/index.html.twig', [
'controller_name' => 'CollectorController',
'records' => $records,
'count' => $count,
@ -64,7 +64,7 @@ class CollectorController extends AbstractController
$this->addFlash('notice', 'Record deleted successfully');
return $this->redirectToRoute('app_collector_landing');
return $this->redirectToRoute('app_collector');
}
/**
* @todo Move clone logic to __clone() in Entity or Repository
@ -100,6 +100,6 @@ class CollectorController extends AbstractController
$this->addFlash('notice', 'Record copied successfully');
return $this->redirectToRoute('app_collector', ['id' => $copy->getId()]);
return $this->redirectToRoute('app_collector_view', ['id' => $copy->getId()]);
}
}

View File

@ -14,8 +14,24 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
class ConservationPlaceController extends AbstractController
{
#[Route('/conservation_place/{id<\d+>}', name: 'app_conservation_place')]
public function index(ConservationPlace $conservationPlace, EntityManagerInterface $em): Response
#[Route('/conservation_place', name: 'app_conservation_place')]
public function index(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(ConservationPlace::class);
$records = $repo->findBy([], ['id' => 'DESC']);
$count = count($records);
$records = array_slice($records, 0, 15);
return $this->render('conservation_place/index.html.twig', [
'controller_name' => 'ConservationPlaceController',
'records' => $records,
'count' => $count,
]);
}
#[Route('/conservation_place/{id<\d+>}', name: 'app_conservation_place_view')]
public function view(ConservationPlace $conservationPlace, EntityManagerInterface $em): Response
{
$repo = $em->getRepository(ConservationPlace::class);
@ -24,28 +40,12 @@ class ConservationPlaceController extends AbstractController
$conservationPlace->setLat((float) $coords['lat']);
$conservationPlace->setLng((float) $coords['lng']);
return $this->render('conservation_place/index.html.twig', [
return $this->render('conservation_place/view.html.twig', [
'controller_name' => 'ConservationPlaceController',
'record' => $conservationPlace,
]);
}
#[Route('/conservation_place', name: 'app_conservation_place_landing')]
public function landing(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(ConservationPlace::class);
$records = $repo->findBy([], ['id' => 'DESC']);
$count = count($records);
$records = array_slice($records, 0, 15);
return $this->render('conservation_place/landing.html.twig', [
'controller_name' => 'ConservationPlaceController',
'records' => $records,
'count' => $count,
]);
}
#[Route('/conservation_place/delete/{id<\d+>}', name: 'app_conservation_place_del')]
public function delete(ConservationPlace $conservationPlace, EntityManagerInterface $em): Response
{
@ -64,7 +64,7 @@ class ConservationPlaceController extends AbstractController
$this->addFlash('notice', 'Record deleted successfully');
return $this->redirectToRoute('app_conservation_place_landing');
return $this->redirectToRoute('app_conservation_place');
}
/**
* @todo Move clone logic to __clone() in Entity or Repository
@ -106,6 +106,6 @@ class ConservationPlaceController extends AbstractController
$this->addFlash('notice', 'Record copied successfully');
return $this->redirectToRoute('app_conservation_place', ['id' => $copy->getId()]);
return $this->redirectToRoute('app_conservation_place_view', ['id' => $copy->getId()]);
}
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Controller;
use App\Entity\Site;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class SiteController extends AbstractController
{
#[Route('/site', name: 'app_site')]
public function index(EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Site::class);
$sites = $repo->findBy([], ['id' => 'DESC']);
$count = count($sites);
$sites = array_slice($sites, 0, 15);
return $this->render('site/index.html.twig', [
'controller_name' => 'SiteController',
'records' => $sites,
'count' => $count,
]);
}
#[Route('/site/{id<\d+>}', name: 'app_site_view')]
public function view(Site $site, EntityManagerInterface $em): Response
{
$repo = $em->getRepository(Site::class);
$coords = $repo->coordinates($site->getId());
$site->setLat($coords['lat']);
$site->setLng($coords['lng']);
return $this->render('site/view.html.twig', [
'controller_name' => 'SiteController',
'record' => $site,
]);
}
/**
* @todo Implement...
*/
#[Route('/site/copy/{id<\d+>}', name: 'app_site_copy')]
public function copy(Site $site, EntityManagerInterface $em): Response
{
return $this->render('site/index.html.twig', [
'controller_name' => 'SiteController',
'record' => $site,
]);
}
/**
* @todo Implement...
*/
#[Route('/site/delete/{id<\d+>}', name: 'app_site_del')]
public function delete(Site $site, EntityManagerInterface $em): Response
{
return $this->render('site/index.html.twig', [
'controller_name' => 'SiteController',
'record' => $site,
]);
}
}

View File

@ -11,7 +11,7 @@ use App\RecordStatus;
use Doctrine\Common\Collections\Collection as DoctrineCollection;
#[ORM\Entity(repositoryClass: SiteRepository::class)]
#[ORM\Table(name: 'conservation_place')]
#[ORM\Table(name: 'site')]
class Site implements RecordInterface
{
#[ORM\Id]

View File

@ -82,15 +82,14 @@ class SiteRepository extends ServiceEntityRepository
$sql = '
SELECT
ST_X(coord_cons) as lng,
ST_Y(coord_cons) as lat
FROM sito s
WHERE cp.id = :id
ST_X(coord_sito) as lng,
ST_Y(coord_sito) as lat
FROM site s
WHERE s.id = :id
';
$result = $conn->executeQuery($sql, ['id' => $id]);
return $result->fetchAssociative();
}
}

View File

@ -1,22 +1,11 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Bibliography - {{ record.citation }} | ArCOA{% endblock %}
{% block title %}Bibliography | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_bibliography_landing') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<h1 class="is-size-1 mt-0 has-text-centered">Bibliography</h1>
<h2 class="is-size-3 mt-3 has-text-centered">{{ record.citation }}</h2>
<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"
@ -27,71 +16,75 @@
</div>
{% endfor %}
<article class="message is-info mt-3">
<div class="message-body">
<p>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if not is_granted('ROLE_READER') %}
<div class="card p-5 mt-6 pt-6 pb-6">
<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">
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-search"></i>
</span>
</button>
</div>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="{{ path('app_bibliography_create') }}" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Citation</th>
<th>Status</th>
<th>Editor</th>
<th>Reference</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_bibliography_view', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_bibliography_view', {'id' : record.id}) }}">
{{ record.citation }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.reference }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
{% endif %}
<a href="{{ path('app_bibliography_copy', {'id' : record.id}) }}"
class="button is-link">
Copy
<span class="icon ml-2">
<i class="fa fa-copy"></i>
</span>
</a>
{% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %}
<button data-url="{{ path('app_bibliography_del', {'id' : record.id}) }}"
class="button is-danger"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
{% endif %}
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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 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>
</div>
<div class="data-tabs is-hidden" id="relations">
Some stuff...
</div>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
@ -114,4 +107,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -1,110 +0,0 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Bibliography | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<h1 class="is-size-1 mt-0 has-text-centered">Bibliography</h1>
<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"
data-controller="notification"
data-notification-target="notif">
<button class="delete" data-action="click->notification#close"></button>
{{ message }}
</div>
{% endfor %}
<div class="card p-5 mt-6 pt-6 pb-6">
<div class="columns">
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-search"></i>
</span>
</button>
</div>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="{{ path('app_bibliography_create') }}" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Citation</th>
<th>Status</th>
<th>Editor</th>
<th>Reference</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_bibliography', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_bibliography', {'id' : record.id}) }}">
{{ record.citation }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.reference }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
<button data-url="{{ path('app_bibliography_del', {'id' : record.id}) }}"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,117 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Bibliography - {{ record.citation }} | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_bibliography') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<h1 class="is-size-1 mt-0 has-text-centered">Bibliography</h1>
<h2 class="is-size-3 mt-3 has-text-centered">{{ record.citation }}</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>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% 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
<span class="icon ml-2">
<i class="fa fa-copy"></i>
</span>
</a>
{% 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#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
</span>
</button>
{% endif %}
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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 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>
</div>
<div class="data-tabs is-hidden" id="relations">
Some stuff...
</div>
</div>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,112 +1,89 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Collection - {{ record.title }} | ArCOA{% endblock %}
{% block title %}Collection | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_collection_landing') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<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>
<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"
<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 %}
<article class="message is-info mt-3">
<div class="message-body">
<p>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %}
<div class="card p-5 mt-6 pt-6 pb-6">
<div class="columns">
<div class="column is-half"></div>
<div class="column has-text-right">
<button class="button is-link">
Edit
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-edit"></i>
</span>
</button>
<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>
</a>
<button data-url="{{ path('app_collection_del', {'id' : record.id}) }}"
class="button is-danger"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
<i class="fa fa-search"></i>
</span>
</button>
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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 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>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/collection/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
{% if record.bibliographies %}
<p class="p-4 has-text-bold">Bibliographies</p>
<table class="table is-fullwidth is-hoverable has-text-centered">
<tr><th>ID</th><th>Status</th><th>Citation</th><th>Editor</th><th>Reference</th></tr>
{% for biblio in record.bibliographies %}
<tr>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.id }}</a></td>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.citation }}</a></td>
<td>{{ biblio.status }}</td>
<td>{{ biblio.editor }}</td>
<td>{{ biblio.reference }}</td>
</tr>
{% endfor %}
</table>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Title</th>
<th>Status</th>
<th>Editor</th>
<th>Chronology</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_collection_view', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_collection_view', {'id' : record.id}) }}">
{{ record.title }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.chronology }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
<button data-url="{{ path('app_collection_del', {'id' : record.id}) }}"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
@ -129,4 +106,4 @@
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -1,109 +0,0 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Collection | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<h1 class="is-size-1 mt-0 has-text-centered">Collection</h1>
<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"
data-controller="notification"
data-notification-target="notif">
<button class="delete" data-action="click->notification#close"></button>
{{ message }}
</div>
{% endfor %}
<div class="card p-5 mt-6 pt-6 pb-6">
<div class="columns">
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-search"></i>
</span>
</button>
</div>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Title</th>
<th>Status</th>
<th>Editor</th>
<th>Chronology</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_collection', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_collection', {'id' : record.id}) }}">
{{ record.title }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.chronology }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
<button data-url="{{ path('app_collection_del', {'id' : record.id}) }}"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,132 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Collection - {{ record.title }} | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_collection') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<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>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %}
<div class="columns">
<div class="column is-half"></div>
<div class="column has-text-right">
<button class="button is-link">
Edit
<span class="icon ml-2">
<i class="fa fa-edit"></i>
</span>
</button>
<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>
</a>
<button data-url="{{ path('app_collection_del', {'id' : record.id}) }}"
class="button is-danger"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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 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>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/collection/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
{% if record.bibliographies %}
<p class="p-4 has-text-bold">Bibliographies</p>
<table class="table is-fullwidth is-hoverable has-text-centered">
<tr><th>ID</th><th>Status</th><th>Citation</th><th>Editor</th><th>Reference</th></tr>
{% for biblio in record.bibliographies %}
<tr>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.id }}</a></td>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.citation }}</a></td>
<td>{{ biblio.status }}</td>
<td>{{ biblio.editor }}</td>
<td>{{ biblio.reference }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
</div>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,133 +1,109 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Collector - {{ record.name }} | ArCOA{% endblock %}
{% block title %}Collector | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_collector_landing') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<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>
<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"
<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 %}
<article class="message is-info mt-3">
<div class="message-body">
<p>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %}
<div class="card p-5 mt-6 pt-6 pb-6">
<div class="columns">
<div class="column is-half"></div>
<div class="column has-text-right">
<button class="button is-link">
Edit
<span class="icon ml-2">
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-search"></i>
</span>
</button>
</div>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Name</th>
<th>Status</th>
<th>Editor</th>
<th>Places / areas of activity</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_collector_view', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_collector_view', {'id' : record.id}) }}">
{{ record.name }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.places }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
<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>
</a>
<button data-url="{{ path('app_collector_del', {'id' : record.id}) }}"
class="button is-danger"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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 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>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/collector/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
{% if record.bibliographies %}
<p class="p-4 has-text-bold">Bibliographies</p>
<table class="table is-fullwidth is-hoverable has-text-centered">
<tr><th>ID</th><th>Status</th><th>Citation</th><th>Editor</th><th>Reference</th></tr>
{% for biblio in record.bibliographies %}
<tr>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.id }}</a></td>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.citation }}</a></td>
<td>{{ biblio.status }}</td>
<td>{{ biblio.editor }}</td>
<td>{{ biblio.reference }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
<script type="text/javascript" defer></script>
{% endblock %}
{% endblock %}

View File

@ -0,0 +1,133 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Collector - {{ record.name }} | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_collector') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<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>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %}
<div class="columns">
<div class="column is-half"></div>
<div class="column has-text-right">
<button class="button is-link">
Edit
<span class="icon ml-2">
<i class="fa fa-edit"></i>
</span>
</button>
<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>
</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#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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 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>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/collector/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
{% if record.bibliographies %}
<p class="p-4 has-text-bold">Bibliographies</p>
<table class="table is-fullwidth is-hoverable has-text-centered">
<tr><th>ID</th><th>Status</th><th>Citation</th><th>Editor</th><th>Reference</th></tr>
{% for biblio in record.bibliographies %}
<tr>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.id }}</a></td>
<td><a href="{{ path('app_bibliography', {'id' : biblio.id}) }}">{{ biblio.citation }}</a></td>
<td>{{ biblio.status }}</td>
<td>{{ biblio.editor }}</td>
<td>{{ biblio.reference }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
</div>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
<script type="text/javascript" defer></script>
{% endblock %}

View File

@ -1,119 +1,89 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Conservation place - {{ record.place }} | ArCOA{% endblock %}
{% block title %}Conservation place | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record map">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_conservation_place_landing') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<h1 class="is-size-1 mt-0 has-text-centered">Conservation place</h1>
<h2 class="is-size-3 mt-3 has-text-centered">{{ record.place }}</h2>
<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"
<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 %}
<article class="message is-info mt-3">
<div class="message-body">
<p>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if app.user and not is_granted('ROLE_READER') %}
<div class="card p-5 mt-6 pt-6 pb-6">
<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">
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-search"></i>
</span>
</button>
</div>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Place</th>
<th>Status</th>
<th>Editor</th>
<th>Municipality</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_conservation_place_view', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_conservation_place_view', {'id' : record.id}) }}">
{{ record.place }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.municipality }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
{% endif %}
<a href="{{ path('app_conservation_place_copy', {'id' : record.id}) }}"
class="button is-link">
Copy
<span class="icon ml-2">
<i class="fa fa-copy"></i>
</span>
</a>
{% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %}
<button data-url="{{ path('app_conservation_place_del', {'id' : record.id}) }}"
class="button is-danger"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
{% endif %}
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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>Conservation place</th>
<td data-delete-record-target="name" data-map-target="name">
{{ record.place }}
</td>
</tr>
<tr><th>Region</th><td>{{ record.region }}</td></tr>
<tr><th>Province</th><td>{{ record.province }}</td></tr>
<tr><th>Municipality</th><td>{{ record.municipality }}</td></tr>
<tr><th>Coordinates</th>
<td>
<span data-map-target="coords">{{ record.lat }}, {{ record.lng }}</span>
<button class="button is-link is-small ml-3" data-action="click->map#open">
<span class="icon is-small p-2">
<i class="fa fa-map"></i>
</span>
</button>
</td>
</tr>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/conservation_place/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
Some stuff...
</div>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
@ -135,26 +105,5 @@
</footer>
</div>
</div>
<div class="modal" data-map-target="modal">
<div class="modal-background" data-action="click->map#close"></div>
<div class="modal-card" style="min-width: 900px;">
<header class="modal-card-head">
<span class="icon is-large has-text-link">
<i class="fa fa-map fa-2x"></i>
</span>
<p class="modal-card-title pl-2 pt-1 pb-1"><strong>Interactive map</strong></p>
<button class="delete" aria-label="close" data-action="click->map#close"></button>
</header>
<section class="modal-card-body p-0">
<div data-map-target="map" id="map" style="min-height: 400px; max-width: 900px"></div>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-light" data-action="click->map#close">Close</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -1,109 +0,0 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Conservation place | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<h1 class="is-size-1 mt-0 has-text-centered">Conservation place</h1>
<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"
data-controller="notification"
data-notification-target="notif">
<button class="delete" data-action="click->notification#close"></button>
{{ message }}
</div>
{% endfor %}
<div class="card p-5 mt-6 pt-6 pb-6">
<div class="columns">
<div class="column is-half has-text-centered">
<button class="button is-medium">
Search
<span class="icon ml-2">
<i class="fa fa-search"></i>
</span>
</button>
</div>
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %}
<div class="column has-text-centered">
<a href="" class="button is-link is-medium">
Add new
<span class="icon ml-2">
<i class="fa fa-plus"></i>
</span>
</a>
</div>
{% endif %}
</div>
</div>
<h3 class="has-text-centered is-size-4 mt-6">Records</h3>
<p class="pt-4 pb-4"><strong>{{ count }} result(s) found</strong></p>
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Place</th>
<th>Status</th>
<th>Editor</th>
<th>Municipality</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_conservation_place', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_conservation_place', {'id' : record.id}) }}">
{{ record.place }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.municipality }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
</td>
<td style="min-width: 120px;">
<div class="buttons">
<button class="button is-small is-link" title="Edit record">
<span class="icon">
<i class="fa fa-edit"></i>
</span>
</button>
<button data-url="{{ path('app_conservation_place_del', {'id' : record.id}) }}"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
<span class="icon">
<i class="fa fa-trash"></i>
</span>
</button>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,160 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Conservation place - {{ record.place }} | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record map">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_conservation_place') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<h1 class="is-size-1 mt-0 has-text-centered">Conservation place</h1>
<h2 class="is-size-3 mt-3 has-text-centered">{{ record.place }}</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>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if app.user and 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_conservation_place_copy', {'id' : record.id}) }}"
class="button is-link">
Copy
<span class="icon ml-2">
<i class="fa fa-copy"></i>
</span>
</a>
{% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %}
<button data-url="{{ path('app_conservation_place_del', {'id' : record.id}) }}"
class="button is-danger"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
</span>
</button>
{% endif %}
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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>Conservation place</th>
<td data-delete-record-target="name" data-map-target="name">
{{ record.place }}
</td>
</tr>
<tr><th>Region</th><td>{{ record.region }}</td></tr>
<tr><th>Province</th><td>{{ record.province }}</td></tr>
<tr><th>Municipality</th><td>{{ record.municipality }}</td></tr>
<tr><th>Coordinates</th>
<td>
<span data-map-target="coords">{{ record.lat }}, {{ record.lng }}</span>
<button class="button is-link is-small ml-3" data-action="click->map#open">
<span class="icon is-small p-2">
<i class="fa fa-map"></i>
</span>
</button>
</td>
</tr>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/conservation_place/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
Some stuff...
</div>
</div>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
<div class="modal" data-map-target="modal">
<div class="modal-background" data-action="click->map#close"></div>
<div class="modal-card" style="min-width: 900px;">
<header class="modal-card-head">
<span class="icon is-large has-text-link">
<i class="fa fa-map fa-2x"></i>
</span>
<p class="modal-card-title pl-2 pt-1 pb-1"><strong>Interactive map</strong></p>
<button class="delete" aria-label="close" data-action="click->map#close"></button>
</header>
<section class="modal-card-body p-0">
<div data-map-target="map" id="map" style="min-height: 400px; max-width: 900px"></div>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-light" data-action="click->map#close">Close</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}

View File

@ -217,22 +217,22 @@
data-menu-target="records"
id="records">
<li class="pt-1 pb-1">
<a href="{{ path('app_bibliography_landing') }}">
<a href="{{ path('app_bibliography') }}">
Bibliography
</a>
</li>
<li class="pt-1 pb-1">
<a href="{{ path('app_collection_landing') }}">
<a href="{{ path('app_collection') }}">
Collection
</a>
</li>
<li class="pt-1 pb-1">
<a href="{{ path('app_collector_landing') }}">
<a href="{{ path('app_collector') }}">
Collector
</a>
</li>
<li class="pt-1 pb-1">
<a href="{{ path('app_conservation_place_landing') }}">
<a href="{{ path('app_conservation_place') }}">
Conservation place
</a>
</li>
@ -252,7 +252,7 @@
</a>
</li>
<li class="pt-1 pb-1">
<a href="">
<a href="{{ path('app_site') }}">
Site
</a>
</li>

View File

@ -1,10 +1,10 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Collector | ArCOA{% endblock %}
{% block title %}Site | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record">
<h1 class="is-size-1 mt-0 has-text-centered">Collector</h1>
<h1 class="is-size-1 mt-0 has-text-centered">Site</h1>
<h2 class="is-size-3 mt-3 has-text-centered">Choose action</h2>
{% for message in app.flashes('notice') %}
@ -43,24 +43,24 @@
<table class="table is-hoverable is-fullwidth mt-5 has-text-centered results">
<tr>
<th>ID</th>
<th>Name</th>
<th>Modern name</th>
<th>Status</th>
<th>Editor</th>
<th>Places / areas of activity</th>
<th>Country</th>
<th>Last modified</th>
<th>Actions</th>
</tr>
{% for record in records %}
<tr>
<td><a href="{{ path('app_collector', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td><a href="{{ path('app_site_view', {'id' : record.id}) }}">{{ record.id }}</a></td>
<td>
<a data-delete-record-target="name" href="{{ path('app_collector', {'id' : record.id}) }}">
{{ record.name }}
<a data-delete-record-target="name" href="{{ path('app_site_view', {'id' : record.id}) }}">
{{ record.name }}
</a>
</td>
<td>{{ record.status }}</td>
<td>{{ record.owner }}</td>
<td style="max-width: 350px;">{{ record.places }}</td>
<td style="max-width: 350px;">{{ record.country }}</td>
<td>
{{ record.modifiedAt.format('Y-m-d') }}<br>
{{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }}
@ -72,7 +72,7 @@
<i class="fa fa-edit"></i>
</span>
</button>
<button data-url="{{ path('app_collector_del', {'id' : record.id}) }}"
<button data-url="{{ path('app_site_del', {'id' : record.id}) }}"
class="button is-small is-danger" title="Delete record"
data-delete-record-target="path" data-action="click->delete-record#warn">
<span class="icon">

View File

@ -0,0 +1,159 @@
{% extends 'data_entry.html.twig' %}
{% block title %}Site - {{ record.name }} | ArCOA{% endblock %}
{% block rightpanel %}
<div class="container" style="max-width: 60vw" data-controller="delete-record map">
<p class="pb-3">
<a class="button is-link is-outlined"
href="{{ path('app_site') }}">
Back to index
<span class="icon ml-2">
<i class="fa fa-arrow-left"></i>
</span>
</a>
</p>
<h1 class="is-size-1 mt-0 has-text-centered">Site</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>
<strong>Last modified:</strong> {{ record.modifiedAt.format('Y-m-d') }}
at {{ record.modifiedAt.format('H:i:s') }}
</p>
<p><strong>Editor:</strong> {{ record.editor }}</p>
</div>
</article>
<div class="card p-5">
{% if app.user and 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_site_copy', {'id' : record.id}) }}"
class="button is-link">
Copy
<span class="icon ml-2">
<i class="fa fa-copy"></i>
</span>
</a>
{% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %}
<button data-url="{{ path('app_site_del', {'id' : record.id}) }}"
class="button is-danger"
data-delete-record-target="path" data-action="click->delete-record#warn">
Delete
<span class="icon ml-2">
<i class="fa fa-trash"></i>
</span>
</button>
{% endif %}
</div>
</div>
{% endif %}
<div class="tabs is-boxed is-fullwidth">
<ul>
<li class="is-active">Record</li>
<li>Relations</li>
</ul>
</div>
<div class="data-tabs" id="record">
<table class="table is-fullwidth pt-4 record">
<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>Modern name</th>
<td data-delete-record-target="name" data-map-target="name">
{{ record.name }}
</td>
</tr>
<tr><th>Ancient name</th><td>{{ record.ancientName }}</td></tr>
<tr><th>Coordinates</th>
<td>
<span data-map-target="coords">{{ record.lat }}, {{ record.lng }}</span>
<button class="button is-link is-small ml-3" data-action="click->map#open">
<span class="icon is-small p-2">
<i class="fa fa-map"></i>
</span>
</button>
</td>
</tr>
<tr><th>Country</th><td>{{ record.country }}</td></tr>
<tr><th>Description</th><td>{{ record.description }}</td></tr>
<tr><th>Short description</th><td>{{ record.shortDescription }}</td></tr>
<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>arcoa.cnr.it/site/{{ record.id }}</td></tr>
<tr><th>Editorial notes</th><td>{{ record.notes }}</td></tr>
</table>
</div>
<div class="data-tabs is-hidden" id="relations">
Some stuff...
</div>
</div>
<div class="modal" data-delete-record-target="modal">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<span class="icon is-large has-text-warning">
<i class="fa fa-warning fa-2x"></i>
</span>
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
<p class="is-size-5" data-delete-record-target="message"></p>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
<button class="button is-light" id="cancel">Cancel</button>
</div>
</footer>
</div>
</div>
<div class="modal" data-map-target="modal">
<div class="modal-background" data-action="click->map#close"></div>
<div class="modal-card" style="min-width: 900px;">
<header class="modal-card-head">
<span class="icon is-large has-text-link">
<i class="fa fa-map fa-2x"></i>
</span>
<p class="modal-card-title pl-2 pt-1 pb-1"><strong>Interactive map</strong></p>
<button class="delete" aria-label="close" data-action="click->map#close"></button>
</header>
<section class="modal-card-body p-0">
<div data-map-target="map" id="map" style="min-height: 400px; max-width: 900px"></div>
</section>
<footer class="modal-card-foot">
<div class="buttons is-right">
<button class="button is-light" data-action="click->map#close">Close</button>
</div>
</footer>
</div>
</div>
</div>
{% endblock %}