From 82e397cbc2ebc0135ff5a3f396480f4fc3bd0d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Mon, 9 Dec 2024 10:19:29 +0100 Subject: [PATCH] Update site (WIP) + renaming --- src/Controller/BibliographyController.php | 42 ++-- src/Controller/CollectionController.php | 42 ++-- src/Controller/CollectorController.php | 16 +- .../ConservationPlaceController.php | 42 ++-- src/Controller/SiteController.php | 63 ++++++ src/Entity/Site.php | 2 +- src/Repository/SiteRepository.php | 9 +- templates/bibliography/index.html.twig | 131 ++++++------ templates/bibliography/landing.html.twig | 110 ---------- templates/bibliography/view.html.twig | 117 +++++++++++ templates/collection/index.html.twig | 155 ++++++-------- templates/collection/landing.html.twig | 109 ---------- templates/collection/view.html.twig | 132 ++++++++++++ templates/collector/index.html.twig | 190 ++++++++---------- templates/collector/view.html.twig | 133 ++++++++++++ templates/conservation_place/index.html.twig | 181 ++++++----------- .../conservation_place/landing.html.twig | 109 ---------- templates/conservation_place/view.html.twig | 160 +++++++++++++++ templates/data_entry.html.twig | 10 +- .../index.html.twig} | 18 +- templates/site/view.html.twig | 159 +++++++++++++++ 21 files changed, 1130 insertions(+), 800 deletions(-) create mode 100644 src/Controller/SiteController.php delete mode 100644 templates/bibliography/landing.html.twig create mode 100644 templates/bibliography/view.html.twig delete mode 100644 templates/collection/landing.html.twig create mode 100644 templates/collection/view.html.twig create mode 100644 templates/collector/view.html.twig delete mode 100644 templates/conservation_place/landing.html.twig create mode 100644 templates/conservation_place/view.html.twig rename templates/{collector/landing.html.twig => site/index.html.twig} (89%) create mode 100644 templates/site/view.html.twig diff --git a/src/Controller/BibliographyController.php b/src/Controller/BibliographyController.php index 9bbb1a2..03793f9 100644 --- a/src/Controller/BibliographyController.php +++ b/src/Controller/BibliographyController.php @@ -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()]); } } diff --git a/src/Controller/CollectionController.php b/src/Controller/CollectionController.php index bf73644..3cb7c0a 100644 --- a/src/Controller/CollectionController.php +++ b/src/Controller/CollectionController.php @@ -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()]); } } diff --git a/src/Controller/CollectorController.php b/src/Controller/CollectorController.php index 1dd677e..a9d8449 100644 --- a/src/Controller/CollectorController.php +++ b/src/Controller/CollectorController.php @@ -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()]); } } diff --git a/src/Controller/ConservationPlaceController.php b/src/Controller/ConservationPlaceController.php index 0f077ab..f518404 100644 --- a/src/Controller/ConservationPlaceController.php +++ b/src/Controller/ConservationPlaceController.php @@ -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()]); } } diff --git a/src/Controller/SiteController.php b/src/Controller/SiteController.php new file mode 100644 index 0000000..091c2e7 --- /dev/null +++ b/src/Controller/SiteController.php @@ -0,0 +1,63 @@ +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, + ]); + } +} diff --git a/src/Entity/Site.php b/src/Entity/Site.php index 854301b..46b22b6 100644 --- a/src/Entity/Site.php +++ b/src/Entity/Site.php @@ -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] diff --git a/src/Repository/SiteRepository.php b/src/Repository/SiteRepository.php index b39b25a..10960b5 100644 --- a/src/Repository/SiteRepository.php +++ b/src/Repository/SiteRepository.php @@ -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(); } } diff --git a/templates/bibliography/index.html.twig b/templates/bibliography/index.html.twig index 039e6d7..381524b 100644 --- a/templates/bibliography/index.html.twig +++ b/templates/bibliography/index.html.twig @@ -1,22 +1,11 @@ {% extends 'data_entry.html.twig' %} -{% block title %}Bibliography - {{ record.citation }} | ArCOA{% endblock %} +{% block title %}Bibliography | ArCOA{% endblock %} {% block rightpanel %}
- -

- - Back to index - - - - -

-

Bibliography

-

{{ record.citation }}

+

Choose action

{% for message in app.flashes('notice') %}
{% endfor %} -
-
-

- Last modified: {{ record.modifiedAt.format('Y-m-d') }} - at {{ record.modifiedAt.format('H:i:s') }} -

-

Editor: {{ record.editor }}

-
-
- -
- {% if not is_granted('ROLE_READER') %} +
-
-
- {% if is_granted('ROLE_REVISOR') or - is_granted('ROLE_ADMIN') or - record.editableStatus %} - +
+ {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %} + + {% endif %} +
+
+ +

Records

+

{{ count }} result(s) found

+ + + + + + + + + + + {% for record in records %} + + + + + + + + + + {% endfor %} +
IDCitationStatusEditorReferenceLast modifiedActions
{{ record.id }} + + {{ record.citation }} + + {{ record.status }}{{ record.owner }}{{ record.reference }} + {{ record.modifiedAt.format('Y-m-d') }}
+ {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} +
+
+ - {% endif %} - - Copy - - - - - {% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %} - {% endif %}
- - {% endif %} -
-
    -
  • Record
  • -
  • Relations
  • -
-
-
- - - - - - - -
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Citation{{ record.citation }}
Reference{{ record.reference }}
Editorial notes{{ record.notes }}
-
- - +
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/bibliography/landing.html.twig b/templates/bibliography/landing.html.twig deleted file mode 100644 index c417ccb..0000000 --- a/templates/bibliography/landing.html.twig +++ /dev/null @@ -1,110 +0,0 @@ -{% extends 'data_entry.html.twig' %} - -{% block title %}Bibliography | ArCOA{% endblock %} - -{% block rightpanel %} -
-

Bibliography

-

Choose action

- - {% for message in app.flashes('notice') %} -
- - {{ message }} -
- {% endfor %} - -
-
-
- -
- {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %} - - {% endif %} -
-
- -

Records

-

{{ count }} result(s) found

- - - - - - - - - - - {% for record in records %} - - - - - - - - - - {% endfor %} -
IDCitationStatusEditorReferenceLast modifiedActions
{{ record.id }} - - {{ record.citation }} - - {{ record.status }}{{ record.owner }}{{ record.reference }} - {{ record.modifiedAt.format('Y-m-d') }}
- {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} -
-
- - -
-
- -
-{% endblock %} diff --git a/templates/bibliography/view.html.twig b/templates/bibliography/view.html.twig new file mode 100644 index 0000000..c038c2e --- /dev/null +++ b/templates/bibliography/view.html.twig @@ -0,0 +1,117 @@ +{% extends 'data_entry.html.twig' %} + +{% block title %}Bibliography - {{ record.citation }} | ArCOA{% endblock %} + +{% block rightpanel %} +
+ +

+ + Back to index + + + + +

+ +

Bibliography

+

{{ record.citation }}

+ + {% for message in app.flashes('notice') %} +
+ + {{ message }} +
+ {% endfor %} + +
+
+

+ Last modified: {{ record.modifiedAt.format('Y-m-d') }} + at {{ record.modifiedAt.format('H:i:s') }} +

+

Editor: {{ record.editor }}

+
+
+ +
+ {% if not is_granted('ROLE_READER') %} +
+
+
+ {% if is_granted('ROLE_REVISOR') or + is_granted('ROLE_ADMIN') or + record.editableStatus %} + + {% endif %} + + Copy + + + + + {% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %} + + {% endif %} +
+
+ {% endif %} +
+
    +
  • Record
  • +
  • Relations
  • +
+
+
+ + + + + + + +
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Citation{{ record.citation }}
Reference{{ record.reference }}
Editorial notes{{ record.notes }}
+
+ +
+ +
+{% endblock %} \ No newline at end of file diff --git a/templates/collection/index.html.twig b/templates/collection/index.html.twig index 50a2b9b..c56d7f8 100644 --- a/templates/collection/index.html.twig +++ b/templates/collection/index.html.twig @@ -1,112 +1,89 @@ {% extends 'data_entry.html.twig' %} -{% block title %}Collection - {{ record.title }} | ArCOA{% endblock %} +{% block title %}Collection | ArCOA{% endblock %} {% block rightpanel %}
- -

- - Back to index - - - - -

-

Collection

-

{{ record.title }}

+

Choose action

{% for message in app.flashes('notice') %} -
{{ message }} -
+
{% endfor %} - -
-
-

- Last modified: {{ record.modifiedAt.format('Y-m-d') }} - at {{ record.modifiedAt.format('H:i:s') }} -

-

Editor: {{ record.editor }}

-
-
-
- {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %} +
-
-
- - - Copy - - - - -
-
- {% endif %} -
-
    -
  • Record
  • -
  • Relations
  • -
-
-
- - - - - - - - - - - - - - - -
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Collection name{{ record.title }}
Chronology{{ record.chronology }}
Start date{{ record.startDate }}
End date{{ record.endDate }}
Description{{ record.description }}
Short description{{ record.shortDescription }}
External identifier(s){{ record.externalIdentifier }}
External link(s){{ record.link }}
Subject headings{{ record.subjectHeadings }}
ArCOA URIarcoa.cnr.it/collection/{{ record.id }}
Editorial notes{{ record.notes }}
-
-
+ +

Records

+

{{ count }} result(s) found

+ + + + + + + + + + + {% for record in records %} + + + + + + + + + + {% endfor %} +
IDTitleStatusEditorChronologyLast modifiedActions
{{ record.id }} + + {{ record.title }} + + {{ record.status }}{{ record.owner }}{{ record.chronology }} + {{ record.modifiedAt.format('Y-m-d') }}
+ {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} +
+
+ + +
+
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/collection/landing.html.twig b/templates/collection/landing.html.twig deleted file mode 100644 index 3f8d452..0000000 --- a/templates/collection/landing.html.twig +++ /dev/null @@ -1,109 +0,0 @@ -{% extends 'data_entry.html.twig' %} - -{% block title %}Collection | ArCOA{% endblock %} - -{% block rightpanel %} -
-

Collection

-

Choose action

- - {% for message in app.flashes('notice') %} -
- - {{ message }} -
- {% endfor %} -
-
-
- -
- {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %} - - {% endif %} -
-
- -

Records

-

{{ count }} result(s) found

- - - - - - - - - - - {% for record in records %} - - - - - - - - - - {% endfor %} -
IDTitleStatusEditorChronologyLast modifiedActions
{{ record.id }} - - {{ record.title }} - - {{ record.status }}{{ record.owner }}{{ record.chronology }} - {{ record.modifiedAt.format('Y-m-d') }}
- {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} -
-
- - -
-
- -
-{% endblock %} diff --git a/templates/collection/view.html.twig b/templates/collection/view.html.twig new file mode 100644 index 0000000..5c86b12 --- /dev/null +++ b/templates/collection/view.html.twig @@ -0,0 +1,132 @@ +{% extends 'data_entry.html.twig' %} + +{% block title %}Collection - {{ record.title }} | ArCOA{% endblock %} + +{% block rightpanel %} +
+ +

+ + Back to index + + + + +

+ +

Collection

+

{{ record.title }}

+ + {% for message in app.flashes('notice') %} +
+ + {{ message }} +
+ {% endfor %} + +
+
+

+ Last modified: {{ record.modifiedAt.format('Y-m-d') }} + at {{ record.modifiedAt.format('H:i:s') }} +

+

Editor: {{ record.editor }}

+
+
+
+ {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %} +
+
+
+ + + Copy + + + + + +
+
+ {% endif %} +
+
    +
  • Record
  • +
  • Relations
  • +
+
+
+ + + + + + + + + + + + + + + +
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Collection name{{ record.title }}
Chronology{{ record.chronology }}
Start date{{ record.startDate }}
End date{{ record.endDate }}
Description{{ record.description }}
Short description{{ record.shortDescription }}
External identifier(s){{ record.externalIdentifier }}
External link(s){{ record.link }}
Subject headings{{ record.subjectHeadings }}
ArCOA URIarcoa.cnr.it/collection/{{ record.id }}
Editorial notes{{ record.notes }}
+
+ +
+ +
+{% endblock %} \ No newline at end of file diff --git a/templates/collector/index.html.twig b/templates/collector/index.html.twig index f185538..bc65ca3 100644 --- a/templates/collector/index.html.twig +++ b/templates/collector/index.html.twig @@ -1,133 +1,109 @@ {% extends 'data_entry.html.twig' %} -{% block title %}Collector - {{ record.name }} | ArCOA{% endblock %} +{% block title %}Collector | ArCOA{% endblock %} {% block rightpanel %}
- -

- - Back to index - - - - -

-

Collector

-

{{ record.name }}

+

Choose action

{% for message in app.flashes('notice') %} -
{{ message }} -
+
{% endfor %} - -
-
-

- Last modified: {{ record.modifiedAt.format('Y-m-d') }} - at {{ record.modifiedAt.format('H:i:s') }} -

-

Editor: {{ record.editor }}

-
-
-
- {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %} +
-
-
- +
+ {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %} + + {% endif %} +
+
+ +

Records

+

{{ count }} result(s) found

+ + + + + + + + + + + {% for record in records %} + + + + + + + + + + {% endfor %} +
IDNameStatusEditorPlaces / areas of activityLast modifiedActions
{{ record.id }} + + {{ record.name }} + + {{ record.status }}{{ record.owner }}{{ record.places }} + {{ record.modifiedAt.format('Y-m-d') }}
+ {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} +
+
+ - - Copy - - - -
- - {% endif %} -
-
    -
  • Record
  • -
  • Relations
  • -
-
-
- - - - - - - - - - - - - - - -
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Name{{ record.name }}
Date of birth{{ record.birthDate }}
Date of death{{ record.deathDate }}
Places / areas of activity{{ record.places }}
Description{{ record.description }}
Short description{{ record.shortDescription }}
External identifier(s){{ record.externalIdentifier }}
External link(s){{ record.link }}
Subject headings{{ record.subjectHeadings }}
ArCOA URIarcoa.cnr.it/collector/{{ record.id }}
Editorial notes{{ record.notes }}
-
- - +
- -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/collector/view.html.twig b/templates/collector/view.html.twig new file mode 100644 index 0000000..8f2ec3f --- /dev/null +++ b/templates/collector/view.html.twig @@ -0,0 +1,133 @@ +{% extends 'data_entry.html.twig' %} + +{% block title %}Collector - {{ record.name }} | ArCOA{% endblock %} + +{% block rightpanel %} +
+ +

+ + Back to index + + + + +

+ +

Collector

+

{{ record.name }}

+ + {% for message in app.flashes('notice') %} +
+ + {{ message }} +
+ {% endfor %} + +
+
+

+ Last modified: {{ record.modifiedAt.format('Y-m-d') }} + at {{ record.modifiedAt.format('H:i:s') }} +

+

Editor: {{ record.editor }}

+
+
+
+ {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %} +
+
+
+ + + Copy + + + + + +
+
+ {% endif %} +
+
    +
  • Record
  • +
  • Relations
  • +
+
+
+ + + + + + + + + + + + + + + +
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Name{{ record.name }}
Date of birth{{ record.birthDate }}
Date of death{{ record.deathDate }}
Places / areas of activity{{ record.places }}
Description{{ record.description }}
Short description{{ record.shortDescription }}
External identifier(s){{ record.externalIdentifier }}
External link(s){{ record.link }}
Subject headings{{ record.subjectHeadings }}
ArCOA URIarcoa.cnr.it/collector/{{ record.id }}
Editorial notes{{ record.notes }}
+
+ +
+ +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/conservation_place/index.html.twig b/templates/conservation_place/index.html.twig index d981f11..1884d23 100644 --- a/templates/conservation_place/index.html.twig +++ b/templates/conservation_place/index.html.twig @@ -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 %} -
- -

- - Back to index - - - - -

- +

Conservation place

-

{{ record.place }}

+

Choose action

{% for message in app.flashes('notice') %} -
{{ message }} -
+
{% endfor %} - -
-
-

- Last modified: {{ record.modifiedAt.format('Y-m-d') }} - at {{ record.modifiedAt.format('H:i:s') }} -

-

Editor: {{ record.editor }}

-
-
- -
- {% if app.user and not is_granted('ROLE_READER') %} +
-
-
- {% if is_granted('ROLE_REVISOR') or - is_granted('ROLE_ADMIN') or - record.editableStatus %} - +
+ {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %} + + {% endif %} +
+
+ +

Records

+

{{ count }} result(s) found

+ + + + + + + + + + + {% for record in records %} + + + + + + + + + + {% endfor %} +
IDPlaceStatusEditorMunicipalityLast modifiedActions
{{ record.id }} + + {{ record.place }} + + {{ record.status }}{{ record.owner }}{{ record.municipality }} + {{ record.modifiedAt.format('Y-m-d') }}
+ {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} +
+
+ - {% endif %} - - Copy - - - - - {% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %} - {% endif %}
- - {% endif %} -
-
    -
  • Record
  • -
  • Relations
  • -
-
-
- - - - - - - - - - - - - - - - - - - - -
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Conservation place - {{ record.place }} -
Region{{ record.region }}
Province{{ record.province }}
Municipality{{ record.municipality }}
Coordinates - {{ record.lat }}, {{ record.lng }} - -
Description{{ record.description }}
Short description{{ record.shortDescription }}
External identifier(s){{ record.externalIdentifier }}
External link(s){{ record.link }}
Subject headings{{ record.subjectHeadings }}
ArCOA URIarcoa.cnr.it/conservation_place/{{ record.id }}
Editorial notes{{ record.notes }}
-
- - +
-
- -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/conservation_place/landing.html.twig b/templates/conservation_place/landing.html.twig deleted file mode 100644 index 141b72a..0000000 --- a/templates/conservation_place/landing.html.twig +++ /dev/null @@ -1,109 +0,0 @@ -{% extends 'data_entry.html.twig' %} - -{% block title %}Conservation place | ArCOA{% endblock %} - -{% block rightpanel %} -
-

Conservation place

-

Choose action

- - {% for message in app.flashes('notice') %} -
- - {{ message }} -
- {% endfor %} -
-
-
- -
- {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') or is_granted('ROLE_EDITOR') %} - - {% endif %} -
-
- -

Records

-

{{ count }} result(s) found

- - - - - - - - - - - {% for record in records %} - - - - - - - - - - {% endfor %} -
IDPlaceStatusEditorMunicipalityLast modifiedActions
{{ record.id }} - - {{ record.place }} - - {{ record.status }}{{ record.owner }}{{ record.municipality }} - {{ record.modifiedAt.format('Y-m-d') }}
- {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} -
-
- - -
-
- -
-{% endblock %} diff --git a/templates/conservation_place/view.html.twig b/templates/conservation_place/view.html.twig new file mode 100644 index 0000000..ce8e830 --- /dev/null +++ b/templates/conservation_place/view.html.twig @@ -0,0 +1,160 @@ +{% extends 'data_entry.html.twig' %} + +{% block title %}Conservation place - {{ record.place }} | ArCOA{% endblock %} + +{% block rightpanel %} +
+ +

+ + Back to index + + + + +

+ +

Conservation place

+

{{ record.place }}

+ + {% for message in app.flashes('notice') %} +
+ + {{ message }} +
+ {% endfor %} + +
+
+

+ Last modified: {{ record.modifiedAt.format('Y-m-d') }} + at {{ record.modifiedAt.format('H:i:s') }} +

+

Editor: {{ record.editor }}

+
+
+ +
+ {% if app.user and not is_granted('ROLE_READER') %} +
+
+
+ {% if is_granted('ROLE_REVISOR') or + is_granted('ROLE_ADMIN') or + record.editableStatus %} + + {% endif %} + + Copy + + + + + {% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %} + + {% endif %} +
+
+ {% endif %} +
+
    +
  • Record
  • +
  • Relations
  • +
+
+
+ + + + + + + + + + + + + + + + + + + + +
Record ID{{ record.id }}
Status{{ record.getStatus() }}
Editor(s){{ record.editor }}
Conservation place + {{ record.place }} +
Region{{ record.region }}
Province{{ record.province }}
Municipality{{ record.municipality }}
Coordinates + {{ record.lat }}, {{ record.lng }} + +
Description{{ record.description }}
Short description{{ record.shortDescription }}
External identifier(s){{ record.externalIdentifier }}
External link(s){{ record.link }}
Subject headings{{ record.subjectHeadings }}
ArCOA URIarcoa.cnr.it/conservation_place/{{ record.id }}
Editorial notes{{ record.notes }}
+
+ +
+ + +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/data_entry.html.twig b/templates/data_entry.html.twig index 28ffc29..aa4f111 100644 --- a/templates/data_entry.html.twig +++ b/templates/data_entry.html.twig @@ -217,22 +217,22 @@ data-menu-target="records" id="records">
  • - + Bibliography
  • - + Collection
  • - + Collector
  • - + Conservation place
  • @@ -252,7 +252,7 @@
  • - + Site
  • diff --git a/templates/collector/landing.html.twig b/templates/site/index.html.twig similarity index 89% rename from templates/collector/landing.html.twig rename to templates/site/index.html.twig index 808cd98..8009377 100644 --- a/templates/collector/landing.html.twig +++ b/templates/site/index.html.twig @@ -1,10 +1,10 @@ {% extends 'data_entry.html.twig' %} -{% block title %}Collector | ArCOA{% endblock %} +{% block title %}Site | ArCOA{% endblock %} {% block rightpanel %}
    -

    Collector

    +

    Site

    Choose action

    {% for message in app.flashes('notice') %} @@ -43,24 +43,24 @@ - + - + {% for record in records %} - + - +
    IDNameModern name Status EditorPlaces / areas of activityCountry Last modified Actions
    {{ record.id }}{{ record.id }} - - {{ record.name }} + + {{ record.name }} {{ record.status }} {{ record.owner }}{{ record.places }}{{ record.country }} {{ record.modifiedAt.format('Y-m-d') }}
    {{ record.editor }} at {{ record.modifiedAt.format('H:i:s') }} @@ -72,7 +72,7 @@ - + {{ message }} + + {% endfor %} + +
    +
    +

    + Last modified: {{ record.modifiedAt.format('Y-m-d') }} + at {{ record.modifiedAt.format('H:i:s') }} +

    +

    Editor: {{ record.editor }}

    +
    +
    + +
    + {% if app.user and not is_granted('ROLE_READER') %} +
    +
    +
    + {% if is_granted('ROLE_REVISOR') or + is_granted('ROLE_ADMIN') or + record.editableStatus %} + + {% endif %} + + Copy + + + + + {% if is_granted('ROLE_REVISOR') or is_granted('ROLE_ADMIN') %} + + {% endif %} +
    +
    + {% endif %} +
    +
      +
    • Record
    • +
    • Relations
    • +
    +
    +
    + + + + + + + + + + + + + + + + + + + +
    Record ID{{ record.id }}
    Status{{ record.getStatus() }}
    Editor(s){{ record.editor }}
    Modern name + {{ record.name }} +
    Ancient name{{ record.ancientName }}
    Coordinates + {{ record.lat }}, {{ record.lng }} + +
    Country{{ record.country }}
    Description{{ record.description }}
    Short description{{ record.shortDescription }}
    External identifier(s){{ record.externalIdentifier }}
    External link(s){{ record.link }}
    Subject headings{{ record.subjectHeadings }}
    ArCOA URIarcoa.cnr.it/site/{{ record.id }}
    Editorial notes{{ record.notes }}
    +
    + +
    + + + + +{% endblock %} \ No newline at end of file