From 980ec60ac6fa7f198225508dced93ff72b5b4bfc Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 4 Aug 2022 18:44:55 +0300 Subject: [PATCH] Change header info in all pages. Add connect menu items in admin pages. --- src/app/app.component.ts | 44 ++++++++++++------- .../affiliations/affiliations.component.html | 6 +-- src/app/pages/claims/claims.component.ts | 6 +-- .../community-info.component.ts | 2 +- .../profile/profile.component.ts | 6 +-- .../remove-content-providers.component.html | 6 +-- .../manage-communities.component.ts | 8 ++-- .../projects/remove-projects.component.html | 6 +-- .../subjects-edit-form.component.html | 6 +-- .../manage-user-notifications.component.html | 6 +-- .../personal-info/personal-info.component.ts | 6 +-- .../users-managers.component.ts | 6 +-- .../users-subscribers.component.ts | 6 +-- src/app/pages/users/users-tabs.component.ts | 2 +- .../manage-zenodo-communities.component.html | 6 +-- src/assets/common-assets | 2 +- src/assets/openaire-theme | 2 +- 17 files changed, 69 insertions(+), 57 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 60c8b1c..a0f64d6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -41,8 +41,7 @@ export class AppComponent implements OnInit { logoUrl: null, logoSmallUrl: null, position: 'center', - badge: false, - stickyAnimation: false + badge: false }; userMenuItems: MenuItem[] = []; loading: boolean = true; @@ -178,12 +177,11 @@ export class AppComponent implements OnInit { } private buildMenu() { - this.menuItems = []; this.userMenuItems = []; this.sideBarItems = []; if (this.user) { if (this.isCurator()) { - this.userMenuItems.push(new MenuItem("", "Manage communities", + this.userMenuItems.push(new MenuItem("", "Manage Gateways", "", "/", false, [], [], {})); } if (Session.isPortalAdministrator(this.user)) { @@ -208,8 +206,7 @@ export class AppComponent implements OnInit { logoUrl: this.headerLogoUrl, logoSmallUrl: this.headerLogoUrl, position: 'left', - badge: false, - stickyAnimation: false + badge: false }; this.sideBarItems.push(new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info")); this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, {name: 'group'}, null, null, "/" + this.community.communityId + "/users")); @@ -218,7 +215,7 @@ export class AppComponent implements OnInit { if (this.community.type === 'ri') { this.sideBarItems.push(new MenuItem("mining", "Mining", "", "/" + this.community.communityId + "/mining/manage-profiles", false, [], [], {}, {svg: mining.data}, null, null, "/" + this.community.communityId + "/mining")); } - this.specialSideBarMenuItem = new MenuItem("back", "Manage communities", "", "/", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'}); + this.specialSideBarMenuItem = new MenuItem("back", "Manage Gateways", "", "/", false, [], null, {}, {name: 'west'}); this.menuItems = []; this.menuItems.push({ @@ -278,16 +275,31 @@ export class AppComponent implements OnInit { this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + 'connect.openaire.eu'; this.menuHeader = { route: null, - url: null, - title: 'Research Community Dashboard', - logoUrl: null, - logoSmallUrl: null, - position: 'center', - badge: false, - stickyAnimation: false + url: this.headerUrl, + title: "Monitor", + logoUrl: 'assets/common-assets/logo-services/connect/small.svg', + logoSmallUrl: "assets/common-assets/logo-services/connect/small.svg", + position: 'left', + badge: true, + menuPosition: "center" }; + this.menuItems = []; + this.menuItems.push({ + rootItem: new MenuItem("about", "About", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"), + items: [ + new MenuItem("", "Learn the process", this.headerUrl + "/about/learn-how", "", false, [], [], {}, null, null, null, null, "_self"), + new MenuItem("", "Publications", this.headerUrl + "/publications", "", false, [], [], {}, null, null, null, null, "_self"), + new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}), + new MenuItem("", "FAQs", this.headerUrl + "/about/faq", "", false, [], [], {}, null, null, null, null, "_self") + ] + + }); + this.menuItems.push({ + rootItem: new MenuItem("communities", "Communities", this.headerUrl + "/search/find/communities", "", false, [], [], {}, null, null, null, null, "_self"), + items: [] + }); if(this.isCurator()) { - this.sideBarItems.push(new MenuItem("communities", "Manage Communities", "", "/", false, [], [], {}, {name: 'settings'})); + this.sideBarItems.push(new MenuItem("communities", "Manage Gateways", "", "/", false, [], [], {}, {name: 'settings'})); } if (Session.isPortalAdministrator(this.user)) { this.sideBarItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, '/admin-tools')); @@ -296,7 +308,7 @@ export class AppComponent implements OnInit { } this.specialSideBarMenuItem = null; } - this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0; + this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 1; } private isCurator() { diff --git a/src/app/pages/affiliations/affiliations.component.html b/src/app/pages/affiliations/affiliations.component.html index 3670142..5144275 100644 --- a/src/app/pages/affiliations/affiliations.component.html +++ b/src/app/pages/affiliations/affiliations.component.html @@ -1,10 +1,10 @@
-
+
-
Admin Dashboard - Manage Organizations +
Admin Dashboard - Manage Organizations
-

{{community.shortTitle}}

+

{{community.shortTitle}}

diff --git a/src/app/pages/claims/claims.component.ts b/src/app/pages/claims/claims.component.ts index 4bed805..6fd18c1 100644 --- a/src/app/pages/claims/claims.component.ts +++ b/src/app/pages/claims/claims.component.ts @@ -11,11 +11,11 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit template: `
-
+
-
Admin Dashboard - Manage Links +
Admin Dashboard - Manage Links
-

{{community.shortTitle}}

+

{{community.shortTitle}}

diff --git a/src/app/pages/community-info/community-info.component.ts b/src/app/pages/community-info/community-info.component.ts index c809436..87d9c03 100644 --- a/src/app/pages/community-info/community-info.component.ts +++ b/src/app/pages/community-info/community-info.component.ts @@ -7,7 +7,7 @@ import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFie @Component({ selector: 'community-info', template: ` -
    +
    • Profile
    • Organizations
    • {{openAIREEntities.PROJECTS}}
    • diff --git a/src/app/pages/community-info/profile/profile.component.ts b/src/app/pages/community-info/profile/profile.component.ts index f3f225a..c455273 100644 --- a/src/app/pages/community-info/profile/profile.component.ts +++ b/src/app/pages/community-info/profile/profile.component.ts @@ -12,12 +12,12 @@ import {Subscription} from "rxjs"; template: `
      -
      +
      -
      Admin Dashboard - Manage Community +
      Admin Dashboard - Manage Community Profile
      -

      {{community.shortTitle}}

      +

      {{community.shortTitle}}

      diff --git a/src/app/pages/content-providers/remove-content-providers.component.html b/src/app/pages/content-providers/remove-content-providers.component.html index 08e3d7e..d921b24 100644 --- a/src/app/pages/content-providers/remove-content-providers.component.html +++ b/src/app/pages/content-providers/remove-content-providers.component.html @@ -1,10 +1,10 @@
      -
      +
      -
      Admin Dashboard - Manage {{openAIREEntities.DATASOURCES}} +
      Admin Dashboard - Manage {{openAIREEntities.DATASOURCES}}
      -

      {{community.shortTitle}}

      +

      {{community.shortTitle}}

      diff --git a/src/app/pages/manage-communities/manage-communities.component.ts b/src/app/pages/manage-communities/manage-communities.component.ts index f58d8a4..f31efd2 100644 --- a/src/app/pages/manage-communities/manage-communities.component.ts +++ b/src/app/pages/manage-communities/manage-communities.component.ts @@ -20,15 +20,15 @@ type Tab = 'all' | 'communities' | 'ris'; template: `
      -
      +
      -
      +
      Admin Dashboard - Manage Communities
      -

      Research Communities & Initiatives

      +

      Research Communities & Initiatives

      -