Move community info options to sidebar and delete internal tabs
This commit is contained in:
parent
83acc14d3b
commit
39aad35c47
|
@ -2,12 +2,13 @@
|
|||
<loading [full]="true"></loading>
|
||||
</div>
|
||||
<div *ngIf="loading == false">
|
||||
<div class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar">
|
||||
<div class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar"
|
||||
[class.sidebar_hover]="hover">
|
||||
<div id="modal-container"></div>
|
||||
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
|
||||
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user" [offCanvasFlip]="true"></navbar>
|
||||
<div>
|
||||
<dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [specialMenuItem]="specialSideBarMenuItem"></dashboard-sidebar>
|
||||
<dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
|
||||
<main>
|
||||
<router-outlet></router-outlet>
|
||||
</main>
|
||||
|
|
|
@ -32,7 +32,7 @@ export class AppComponent implements OnInit {
|
|||
hasAdminMenu: boolean = false;
|
||||
isFrontPage: boolean = false;
|
||||
sideBarItems: MenuItem[] = [];
|
||||
specialSideBarMenuItem: MenuItem = null;
|
||||
backItem: MenuItem = null;
|
||||
menuItems: MenuItem[] = [];
|
||||
menuHeader: Header = {
|
||||
route: "/",
|
||||
|
@ -179,6 +179,10 @@ export class AppComponent implements OnInit {
|
|||
return this.layoutService.open;
|
||||
}
|
||||
|
||||
public get hover() {
|
||||
return this.layoutService.hover;
|
||||
}
|
||||
|
||||
private buildMenu() {
|
||||
this.userMenuItems = [];
|
||||
this.sideBarItems = [];
|
||||
|
@ -211,14 +215,23 @@ export class AppComponent implements OnInit {
|
|||
position: 'left',
|
||||
badge: true
|
||||
};
|
||||
this.sideBarItems.push(new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info"));
|
||||
let communityInfo = new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info");
|
||||
communityInfo.items = [
|
||||
new MenuItem("profile", "Profile", "", "/" + this.community.communityId + "/info/profile", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/profile"),
|
||||
new MenuItem("organizations", "Organizations", "", "/" + this.community.communityId + "/info/organizations", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/organizations"),
|
||||
new MenuItem("projects", OpenaireEntities.PROJECTS, "", "/" + this.community.communityId + "/info/projects", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/projects"),
|
||||
new MenuItem("content-providers", OpenaireEntities.DATASOURCES, "", "/" + this.community.communityId + "/info/content-providers", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/content-providers"),
|
||||
new MenuItem("subjects", "Subjects", "", "/" + this.community.communityId + "/info/subjects", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/subjects"),
|
||||
new MenuItem("zenodo-communities", "Zenodo Communities ", "", "/" + this.community.communityId + "/info/zenodo-communities", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/zenodo-communities"),
|
||||
]
|
||||
this.sideBarItems.push(communityInfo);
|
||||
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("admin-tools", "Pages & Menus", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/" + this.community.communityId + "/admin-tools"));
|
||||
this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}, {name: 'brush'}));
|
||||
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.backItem = new MenuItem("back", "Manage Communities", "", "/", false, [], null, {}, {name: 'west'});
|
||||
|
||||
this.menuItems = [];
|
||||
this.menuItems.push(new MenuItem("home", "Home",
|
||||
|
@ -306,7 +319,7 @@ export class AppComponent implements OnInit {
|
|||
this.sideBarItems.push(new MenuItem("connect", "Connect Options", "", "/connect/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/connect/admin-tools'));
|
||||
this.sideBarItems.push(new MenuItem("explore", "Explore Options", "", "/openaire/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/openaire/admin-tools'));
|
||||
}
|
||||
this.specialSideBarMenuItem = null;
|
||||
this.backItem = null;
|
||||
}
|
||||
this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 1;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c53806f5b33c2fc218b35b2ac8af30e1daa663d2
|
||||
Subproject commit 886b50a52c93163113ed6583faf8b054d9390731
|
|
@ -7,7 +7,6 @@
|
|||
<h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<community-info tab="organizations"></community-info>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
|
|
|
@ -11,7 +11,6 @@ import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.mod
|
|||
import {UtilitiesService} from '../../openaireLibrary/services/utilities.service';
|
||||
import {InputModule} from "../../openaireLibrary/sharedComponents/input/input.module";
|
||||
import {PageContentModule} from "../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
|
||||
import {CommunityInfoModule} from "../community-info/community-info.module";
|
||||
import {IconsModule} from "../../openaireLibrary/utils/icons/icons.module";
|
||||
import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module";
|
||||
import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module";
|
||||
|
@ -22,7 +21,7 @@ import {PagingModule} from "../../openaireLibrary/utils/paging.module";
|
|||
@NgModule({
|
||||
imports: [
|
||||
AffiliationsRoutingModule, CommonModule, FormsModule, RouterModule,
|
||||
AlertModalModule, ReactiveFormsModule, InputModule, PageContentModule, CommunityInfoModule, IconsModule, NoLoadPaging, LoadingModule, UrlPrefixModule, PagingModule
|
||||
AlertModalModule, ReactiveFormsModule, InputModule, PageContentModule, IconsModule, NoLoadPaging, LoadingModule, UrlPrefixModule, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
AffiliationsComponent
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
||||
|
||||
@Component({
|
||||
selector: 'community-info',
|
||||
template: `
|
||||
<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 === '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 === 'content-providers'"><a routerLink="../content-providers">{{openAIREEntities.DATASOURCES}}</a></li>
|
||||
<li *ngIf="community.type !='ri'" [class.uk-active]="tab === 'subjects'"><a routerLink="../subjects">Subjects</a></li>
|
||||
<li [class.uk-active]="tab === 'zenodo-communities'"><a routerLink="../zenodo-communities">Zenodo Communities</a></li>
|
||||
</ul>
|
||||
`
|
||||
})
|
||||
export class CommunityInfoComponent implements OnInit {
|
||||
@Input()
|
||||
public type: string;
|
||||
@Input()
|
||||
public tab: "profile"| "organizations" | "projects" | "content-providers" | "subjects" | "zenodo-communities" = 'profile';
|
||||
public community: CommunityInfo;
|
||||
public openAIREEntities = OpenaireEntities;
|
||||
private sub;
|
||||
|
||||
constructor(private communityService: CommunityService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.sub =this.communityService.getCommunityAsObservable().subscribe(community => {
|
||||
this.community = community;
|
||||
});
|
||||
}
|
||||
ngOnDestroy() {
|
||||
if (this.sub instanceof Subscription) {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {CommunityInfoComponent} from "./community-info.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule
|
||||
],
|
||||
declarations: [CommunityInfoComponent],
|
||||
exports: [CommunityInfoComponent]
|
||||
})
|
||||
export class CommunityInfoModule {
|
||||
}
|
|
@ -20,7 +20,6 @@ import {Subscription} from "rxjs";
|
|||
<h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<community-info tab="profile"></community-info>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-container uk-section-xsmall">
|
||||
|
|
|
@ -5,7 +5,6 @@ import {PageContentModule} from "../../../openaireLibrary/dashboard/sharedCompon
|
|||
import {ProfileComponent} from "./profile.component";
|
||||
import {EditCommunityModule} from "./edit-community/edit-community.module";
|
||||
import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.module";
|
||||
import {CommunityInfoModule} from "../community-info.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -17,8 +16,7 @@ import {CommunityInfoModule} from "../community-info.module";
|
|||
]),
|
||||
PageContentModule,
|
||||
EditCommunityModule,
|
||||
LoadingModule,
|
||||
CommunityInfoModule,
|
||||
LoadingModule
|
||||
],
|
||||
declarations: [ProfileComponent],
|
||||
exports: [ProfileComponent]
|
||||
|
|
|
@ -10,7 +10,6 @@ import {ErrorMessagesModule} from '../../openaireLibrary/utils/errorMessages.mod
|
|||
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {PageContentModule} from "../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
|
||||
import {CommunityInfoModule} from "../community-info/community-info.module";
|
||||
import {InputModule} from "../../openaireLibrary/sharedComponents/input/input.module";
|
||||
import {SearchInputModule} from "../../openaireLibrary/sharedComponents/search-input/search-input.module";
|
||||
import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module";
|
||||
|
@ -42,7 +41,6 @@ import {CriteriaModule} from "./criteria/criteria.module";
|
|||
AlertModalModule,
|
||||
SearchDataprovidersServiceModule,
|
||||
PageContentModule,
|
||||
CommunityInfoModule,
|
||||
InputModule,
|
||||
SearchInputModule,
|
||||
RouterModule.forChild([
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<community-info tab="content-providers"></community-info>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
<aside *ngIf="draftCustomizationOptions" id="sidebar_main">
|
||||
<div id="sidebar_content">
|
||||
<div class="menu_section uk-margin-large-top">
|
||||
<a (click)="close()" class="uk-button uk-button-link uk-margin-left">
|
||||
<h6 class="uk-margin-remove-bottom uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="uk-width-auto">
|
||||
<icon *ngIf="menuSelected.id != 'home'" class="menu-icon" name="west" ratio="1.5"
|
||||
[flex]="true"></icon>
|
||||
<icon *ngIf="menuSelected.id == 'home'" class="menu-icon" name="close" ratio="2"
|
||||
[flex]="true"></icon>
|
||||
</div>
|
||||
<span class="uk-width-expand uk-text-truncate uk-margin-small-left">{{menuSelected.name}}</span>
|
||||
</h6>
|
||||
<div class="back">
|
||||
<a (click)="close()" class="uk-flex uk-flex-middle uk-flex-center">
|
||||
<div class="uk-width-auto">
|
||||
<icon *ngIf="menuSelected.id != 'home'" name="west" ratio="1.3"
|
||||
[flex]="true"></icon>
|
||||
<icon *ngIf="menuSelected.id == 'home'" name="close" ratio="1.3"
|
||||
[flex]="true"></icon>
|
||||
</div>
|
||||
<span class="uk-width-expand uk-text-truncate uk-margin-left hide-on-close">{{menuSelected.name}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="menu_section uk-margin-large-top uk-overflow-auto" style="max-height: 75vh">
|
||||
|
@ -23,20 +21,15 @@
|
|||
<div *ngIf="item.icon" class="uk-width-auto">
|
||||
<icon class="menu-icon" [name]="item.icon" [flex]="true"></icon>
|
||||
</div>
|
||||
<span
|
||||
class="uk-width-expand uk-text-truncate uk-margin-small-left">
|
||||
<span class="uk-width-expand uk-text-truncate uk-margin-small-left hide-on-close">
|
||||
{{item.name}}
|
||||
</span>
|
||||
<span uk-icon="triangle-right"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-template>
|
||||
|
||||
</ul>
|
||||
|
||||
<ng-container *ngIf="menuSelected.id == 'identity'">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="identityOptions ; context: { }"></ng-container>
|
||||
|
|
|
@ -14,7 +14,6 @@ import {SearchPagingModule} from '../../openaireLibrary/searchPages/searchUtils/
|
|||
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {PageContentModule} from "../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
|
||||
import {CommunityInfoModule} from "../community-info/community-info.module";
|
||||
import {InputModule} from "../../openaireLibrary/sharedComponents/input/input.module";
|
||||
import {SearchInputModule} from "../../openaireLibrary/sharedComponents/search-input/search-input.module";
|
||||
import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module";
|
||||
|
@ -38,7 +37,6 @@ import {SearchFilterModule} from "../../openaireLibrary/searchPages/searchUtils/
|
|||
AlertModalModule,
|
||||
SearchProjectsServiceModule,
|
||||
PageContentModule,
|
||||
CommunityInfoModule,
|
||||
InputModule,
|
||||
SearchInputModule,
|
||||
RouterModule.forChild([
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<community-info tab="projects"></community-info>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<community-info tab="subjects"></community-info>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
|
|
|
@ -13,14 +13,15 @@ import {AlertModalModule} from '../../../openaireLibrary/utils/modal/alertModal.
|
|||
import {NoLoadPaging} from '../../../openaireLibrary/searchPages/searchUtils/no-load-paging.module';
|
||||
import {LoadingModule} from '../../../openaireLibrary/utils/loading/loading.module';
|
||||
import {InputModule} from '../../../openaireLibrary/sharedComponents/input/input.module';
|
||||
import {CommunityInfoModule} from '../../community-info/community-info.module';
|
||||
import {SearchInputModule} from '../../../openaireLibrary/sharedComponents/search-input/search-input.module';
|
||||
import {FullScreenModalModule} from 'src/app/openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.module';
|
||||
import {PagingModule} from "../../../openaireLibrary/utils/paging.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SubjectsEditFormRoutingModule, CommonModule, FormsModule, RouterModule, PageContentModule, IconsModule, AlertModalModule, NoLoadPaging, LoadingModule, InputModule, CommunityInfoModule, SearchInputModule, FullScreenModalModule, PagingModule
|
||||
SubjectsEditFormRoutingModule, CommonModule, FormsModule, RouterModule,
|
||||
PageContentModule, IconsModule, AlertModalModule, NoLoadPaging, LoadingModule, InputModule,
|
||||
SearchInputModule, FullScreenModalModule, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
SubjectsEditFormComponent
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<h1 class="uk-h6 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<community-info tab="zenodo-communities"></community-info>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
|
|
|
@ -10,7 +10,6 @@ import {ManageZenodoCommunitiesService} from '../../services/manageZenodoCommuni
|
|||
import {ZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
|
||||
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
|
||||
import {ZenodoCommunitiesRoutingModule} from './zenodo-communities-routing.module';
|
||||
import {CommunityInfoModule} from '../community-info/community-info.module';
|
||||
import {SearchInputModule} from '../../openaireLibrary/sharedComponents/search-input/search-input.module';
|
||||
import {IconsModule} from '../../openaireLibrary/utils/icons/icons.module';
|
||||
import {NoLoadPaging} from '../../openaireLibrary/searchPages/searchUtils/no-load-paging.module';
|
||||
|
@ -24,7 +23,7 @@ import {PagingModule} from "../../openaireLibrary/utils/paging.module";
|
|||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule,
|
||||
AlertModalModule, ZenodoCommunitiesRoutingModule, CommunityInfoModule, PageContentModule, SearchInputModule, IconsModule, NoLoadPaging, LoadingModule, FullScreenModalModule, HTMLToStringPipeModule, PagingModule
|
||||
AlertModalModule, ZenodoCommunitiesRoutingModule, PageContentModule, SearchInputModule, IconsModule, NoLoadPaging, LoadingModule, FullScreenModalModule, HTMLToStringPipeModule, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
ManageZenodoCommunitiesComponent, ZenodoCommunitiesComponent, AddZenodoCommunitiesComponent, PreviewZenodoCommunityComponent
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8c62240a403dd8a592eac78d565b185b3b1043c0
|
||||
Subproject commit 071385b36c9b9c65d6d081d6468aeea2bf01ffbf
|
|
@ -1 +1 @@
|
|||
Subproject commit 5b838cfc1c31fb2766a7cdd27734b8b78393e2e6
|
||||
Subproject commit a72ea0d0c9d0b490de6c77a238d501ee75216960
|
Loading…
Reference in New Issue