From 0a60dd3202b814de660a16cb023e13a90e4febc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Tue, 7 Jan 2025 14:46:29 +0100 Subject: [PATCH] primeng: admin entities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- projects/admin/src/app/app.component.html | 88 +++++++-------- .../app/menu/menu-app/menu-app.component.html | 4 +- .../menu-dashboard.component.html | 16 ++- .../entities-local-detail-view.component.html | 34 +++--- .../local/entities-local-global.component.ts | 2 +- ...al-organisation-detail-view.component.html | 4 +- .../local-page-detail.component.html | 37 ++++--- .../local-person-detail-view.component.html | 2 +- .../local-place-detail-view.component.html | 2 +- .../local-topic-detail-view.component.html | 6 +- ...entities-remote-detail-view.component.html | 102 +++++++++--------- ...entities-remote-detail-view.component.scss | 5 + ...es-organisation-detail-view.component.html | 6 +- .../remote-page-detail.component.html | 28 ++--- ...entities-person-detail-view.component.html | 6 +- .../remote-topic-detail-view.component.html | 24 +++-- .../document-record-search.component.html | 1 - projects/admin/src/app/scss/styles.scss | 5 + .../core/brief-view/brief-view.component.html | 16 ++- .../entity-brief-view.component.ts | 4 +- 20 files changed, 207 insertions(+), 185 deletions(-) create mode 100644 projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss diff --git a/projects/admin/src/app/app.component.html b/projects/admin/src/app/app.component.html index 39310c5bd..5bd039d85 100644 --- a/projects/admin/src/app/app.component.html +++ b/projects/admin/src/app/app.component.html @@ -14,62 +14,52 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - +

Loading…

-@if (user) { -
-
+@if (user?.hasAdminUiAccess) { +
+ +
+
+ + +
+
+ {{ message.summary }}
- - - - -
- } @else { - -
-

Permission required

- {{ 'You do not have sufficient permissions to view this page' | translate }} -
- } - - +

+
+ + + + + +} @else { +
+

Permission required

+ {{ 'You do not have sufficient permissions to view this page' | translate }} +
} - - + diff --git a/projects/admin/src/app/menu/menu-app/menu-app.component.html b/projects/admin/src/app/menu/menu-app/menu-app.component.html index d28df2b90..325ca7539 100644 --- a/projects/admin/src/app/menu/menu-app/menu-app.component.html +++ b/projects/admin/src/app/menu/menu-app/menu-app.component.html @@ -27,11 +27,11 @@ @if (item.icon) { } - {{ item.label }} + {{ item.label }} @if (item.shortcut) { {{ item.shortcut }} - + } @if (item.items) { diff --git a/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html b/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html index 3e9cc7d19..94218d58e 100644 --- a/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html +++ b/projects/admin/src/app/menu/menu-dashboard/menu-dashboard.component.html @@ -14,20 +14,19 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
+ + + } diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts b/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts index 655dcdee0..1f31771b0 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/local/entities-local-global.component.ts @@ -20,7 +20,7 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'admin-entities-local-global', template: ` -
+
+ + } + } diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss new file mode 100644 index 000000000..5f03076b8 --- /dev/null +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/entities-remote-detail-view.component.scss @@ -0,0 +1,5 @@ +admin-remote-entities-remote-detail-view { + dl.metadata { + @extend .p-0; + } +} diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html index f10d16463..fd1f763dd 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-organisation-detail-view/remote-entities-organisation-detail-view.component.html @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> + diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html index bd01ebd25..b0acbe15a 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-page-detail/remote-page-detail.component.html @@ -14,9 +14,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> -
- @if (record) { - - + - } - @if (error) { - - } - -
+} + +@if (error) { + +} + + diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html index 69328a0bc..d59512e5f 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-person-detail-view/remote-entities-person-detail-view.component.html @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> + diff --git a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html index c03beb4c2..e31d7ede6 100644 --- a/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/entities-detail-view/remote/remote-topic-detail-view/remote-topic-detail-view.component.html @@ -15,6 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> +
{{ item.title }}
-
    +
      @if (item.match) { @for(match of item.match; track match) {
    • @@ -126,4 +128,4 @@ }
-
\ No newline at end of file +
diff --git a/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html b/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html index 06fdc2ec8..fd862cf66 100644 --- a/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html +++ b/projects/admin/src/app/record/search-view/document-record-search/document-record-search.component.html @@ -15,7 +15,6 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - @if (iconTemplate) {
- +
}
@if (titleTemplate) { - + } @else {
@if (link) { @@ -42,16 +45,19 @@
@if (contentTemplate) {
- +
}
@if (tagsTemplate) { - + } @else { @if (tags) { @for (tag of tags; track tag) { - + } } } diff --git a/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts b/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts index 87c9fb002..77afaa7ed 100644 --- a/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts +++ b/projects/shared/src/lib/component/entities/entity-brief-view/entity-brief-view.component.ts @@ -118,8 +118,10 @@ export class EntityBriefViewComponent implements ResultItem, OnInit, AfterViewIn this.routerLink = ['/records', 'local_entities', 'detail', this.record.metadata.pid]; this.tags = [ {label: this.record.metadata.resource_type, type: 'local'}, - {label: this.record.metadata?.source_catalog} ]; + if (this.record.metadata.source_catalog) { + this.tags.push({label: this.record.metadata.source_catalog}); + } } this.entityTitle = this.record.metadata.authorized_access_point; }