Change header info in all pages.

Add connect menu items in admin pages.
This commit is contained in:
Konstantinos Triantafyllou 2022-08-04 18:44:55 +03:00
parent ab2deefa15
commit 980ec60ac6
17 changed files with 69 additions and 57 deletions

View File

@ -41,8 +41,7 @@ export class AppComponent implements OnInit {
logoUrl: null, logoUrl: null,
logoSmallUrl: null, logoSmallUrl: null,
position: 'center', position: 'center',
badge: false, badge: false
stickyAnimation: false
}; };
userMenuItems: MenuItem[] = []; userMenuItems: MenuItem[] = [];
loading: boolean = true; loading: boolean = true;
@ -178,12 +177,11 @@ export class AppComponent implements OnInit {
} }
private buildMenu() { private buildMenu() {
this.menuItems = [];
this.userMenuItems = []; this.userMenuItems = [];
this.sideBarItems = []; this.sideBarItems = [];
if (this.user) { if (this.user) {
if (this.isCurator()) { if (this.isCurator()) {
this.userMenuItems.push(new MenuItem("", "Manage communities", this.userMenuItems.push(new MenuItem("", "Manage Gateways",
"", "/", false, [], [], {})); "", "/", false, [], [], {}));
} }
if (Session.isPortalAdministrator(this.user)) { if (Session.isPortalAdministrator(this.user)) {
@ -208,8 +206,7 @@ export class AppComponent implements OnInit {
logoUrl: this.headerLogoUrl, logoUrl: this.headerLogoUrl,
logoSmallUrl: this.headerLogoUrl, logoSmallUrl: this.headerLogoUrl,
position: 'left', position: 'left',
badge: false, badge: false
stickyAnimation: 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("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")); 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') { 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.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 = [];
this.menuItems.push({ this.menuItems.push({
@ -278,16 +275,31 @@ export class AppComponent implements OnInit {
this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + 'connect.openaire.eu'; this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + 'connect.openaire.eu';
this.menuHeader = { this.menuHeader = {
route: null, route: null,
url: null, url: this.headerUrl,
title: 'Research Community Dashboard', title: "Monitor",
logoUrl: null, logoUrl: 'assets/common-assets/logo-services/connect/small.svg',
logoSmallUrl: null, logoSmallUrl: "assets/common-assets/logo-services/connect/small.svg",
position: 'center', position: 'left',
badge: false, badge: true,
stickyAnimation: false 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()) { 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)) { 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')); 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.specialSideBarMenuItem = null;
} }
this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0; this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 1;
} }
private isCurator() { private isCurator() {

View File

@ -1,10 +1,10 @@
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Organizations <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Organizations
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<community-info tab="organizations"></community-info> <community-info tab="organizations"></community-info>

View File

@ -11,11 +11,11 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
template: ` template: `
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Links <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Links
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<users-tabs tab="claims"></users-tabs> <users-tabs tab="claims"></users-tabs>

View File

@ -7,7 +7,7 @@ import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFie
@Component({ @Component({
selector: 'community-info', selector: 'community-info',
template: ` template: `
<ul *ngIf="community" class="uk-tab uk-margin-top uk-flex uk-flex-center uk-flex-left@m" uk-tab> <ul *ngIf="community" class="uk-tab uk-margin-remove-bottom uk-margin-medium-top uk-flex uk-flex-center uk-flex-left@m" uk-tab>
<li [class.uk-active]="tab === 'profile'"><a routerLink="../profile">Profile</a></li> <li [class.uk-active]="tab === 'profile'"><a routerLink="../profile">Profile</a></li>
<li [class.uk-active]="tab === 'organizations'"><a routerLink="../organizations">Organizations</a></li> <li [class.uk-active]="tab === 'organizations'"><a routerLink="../organizations">Organizations</a></li>
<li [class.uk-active]="tab === 'projects'"><a routerLink="../projects">{{openAIREEntities.PROJECTS}}</a></li> <li [class.uk-active]="tab === 'projects'"><a routerLink="../projects">{{openAIREEntities.PROJECTS}}</a></li>

View File

@ -12,12 +12,12 @@ import {Subscription} from "rxjs";
template: ` template: `
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Community <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Community
Profile Profile
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<community-info tab="profile"></community-info> <community-info tab="profile"></community-info>

View File

@ -1,10 +1,10 @@
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage <span class="uk-text-capitalize">{{openAIREEntities.DATASOURCES}}</span> <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage <span class="uk-text-capitalize">{{openAIREEntities.DATASOURCES}}</span>
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<community-info tab="content-providers"></community-info> <community-info tab="content-providers"></community-info>

View File

@ -20,15 +20,15 @@ type Tab = 'all' | 'communities' | 'ris';
template: ` template: `
<div page-content [id]="tab"> <div page-content [id]="tab">
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6"> <div class="uk-text-background uk-text-bold uk-text-small">
Admin Dashboard - Manage Communities Admin Dashboard - Manage Communities
</div> </div>
<h1 class="uk-h4 uk-margin-remove">Research Communities & Initiatives</h1> <h1 class="uk-h6 uk-margin-remove">Research Communities & Initiatives</h1>
</div> </div>
</div> </div>
<ul class="uk-tab uk-margin-top" uk-tab> <ul class="uk-tab uk-margin-medium-top" uk-tab>
<li [class.uk-active]="tab === 'all'"><a (click)="tab = 'all'"><span class="title">All</span></a></li> <li [class.uk-active]="tab === 'all'"><a (click)="tab = 'all'"><span class="title">All</span></a></li>
<li [class.uk-active]="tab === 'communities'"><a (click)="tab = 'communities'"><span class="title">Research Communities</span></a> <li [class.uk-active]="tab === 'communities'"><a (click)="tab = 'communities'"><span class="title">Research Communities</span></a>
</li> </li>

View File

@ -1,10 +1,10 @@
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage {{openaireEntiites.PROJECTS}} <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage {{openaireEntiites.PROJECTS}}
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<community-info tab="projects"></community-info> <community-info tab="projects"></community-info>

View File

@ -1,10 +1,10 @@
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Subjects <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Subjects
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<community-info tab="subjects"></community-info> <community-info tab="subjects"></community-info>

View File

@ -1,9 +1,9 @@
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Notification Settings</div> <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Notification Settings</div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<users-tabs tab="notifications"></users-tabs> <users-tabs tab="notifications"></users-tabs>

View File

@ -24,12 +24,12 @@ declare var UIkit;
template: ` template: `
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Personal Info & <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Personal Info &
Affiliations Affiliations
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<users-tabs tab="personal"></users-tabs> <users-tabs tab="personal"></users-tabs>

View File

@ -13,10 +13,10 @@ import {CommunityInfo} from "../../../openaireLibrary/connect/community/communit
template: ` template: `
<role-users [id]="community.communityId" [type]="community.type" [name]="community.shortTitle" [inviteDisableMessage]="inviteDisableMessage" <role-users [id]="community.communityId" [type]="community.type" [name]="community.shortTitle" [inviteDisableMessage]="inviteDisableMessage"
[link]="link" [role]="'manager'" [message]="message" [emailComposer]="emailComposer"> [link]="link" [role]="'manager'" [message]="message" [emailComposer]="emailComposer">
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Managers</div> <div class="uk-margin-remove uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Users</div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<users-tabs tab="manager"></users-tabs> <users-tabs tab="manager"></users-tabs>

View File

@ -10,10 +10,10 @@ import {CommunityInfo} from "../../../openaireLibrary/connect/community/communit
template: ` template: `
<subscribers [id]="community.communityId" [type]="'community'" [name]="community.shortTitle" <subscribers [id]="community.communityId" [type]="'community'" [name]="community.shortTitle"
[inviteDisableMessage]="inviteDisableMessage"> [inviteDisableMessage]="inviteDisableMessage">
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Members</div> <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Users</div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<users-tabs tab="member"></users-tabs> <users-tabs tab="member"></users-tabs>

View File

@ -7,7 +7,7 @@ import {ActivatedRoute} from '@angular/router';
@Component({ @Component({
selector: 'users-tabs', selector: 'users-tabs',
template: ` template: `
<ul class="uk-tab uk-margin-top uk-flex uk-flex-center uk-flex-left@m" uk-tab> <ul class="uk-tab uk-margin-medium-top uk-margin-remove-bottom uk-flex uk-flex-center uk-flex-left@m" uk-tab>
<li [class.uk-active]="tab === 'manager'"><a routerLink="../manager">Managers</a></li> <li [class.uk-active]="tab === 'manager'"><a routerLink="../manager">Managers</a></li>
<li [class.uk-active]="tab === 'member'"><a routerLink="../member">Members</a></li> <li [class.uk-active]="tab === 'member'"><a routerLink="../member">Members</a></li>
<li *ngIf="canManageNotifications" [class.uk-active]="tab === 'notifications'"><a routerLink="../notifications">Notification <li *ngIf="canManageNotifications" [class.uk-active]="tab === 'notifications'"><a routerLink="../notifications">Notification

View File

@ -1,10 +1,10 @@
<div page-content> <div page-content>
<div header> <div header>
<div class="uk-flex uk-flex-middle uk-margin-top info"> <div class="uk-flex uk-flex-middle uk-margin-medium-top info">
<div> <div>
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Zenodo Communities <div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Zenodo Communities
</div> </div>
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1> <h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
</div> </div>
</div> </div>
<community-info tab="zenodo-communities"></community-info> <community-info tab="zenodo-communities"></community-info>

@ -1 +1 @@
Subproject commit d6befee58de8fcb89e27d0c3403fd937b2e1552c Subproject commit adf1b6d5f5e8fb1568615b0fc596a0f39beab3e6

@ -1 +1 @@
Subproject commit 0e650a002b6f77957fcbe06b3609c8985c96dd2a Subproject commit eb5739ab8271aa71c8e58998ab88c61878f8788d