Remove active element from topics menu. Remove icons from edit-stakeholder and change buttons of file upload to small. Fix error page padding from top
This commit is contained in:
parent
d67c19a913
commit
fbec29e2ca
|
@ -117,18 +117,14 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
this.subscriptions.push(this.params.subscribe(params => {
|
this.subscriptions.push(this.params.subscribe(params => {
|
||||||
if (this.paramsResolved) {
|
if (this.paramsResolved) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let isSearch = this.router.url.includes('/search/');
|
|
||||||
if (params && params['stakeholder']) {
|
if (params && params['stakeholder']) {
|
||||||
// this.stakeholder = this.stakeholderService.stakeholder;
|
|
||||||
if (!this.stakeholder || this.stakeholder.alias !== params['stakeholder']) {
|
if (!this.stakeholder || this.stakeholder.alias !== params['stakeholder']) {
|
||||||
this.subscriptions.push(this.stakeholderService.getStakeholder(params['stakeholder']).subscribe(stakeholder => {
|
this.subscriptions.push(this.stakeholderService.getStakeholder(params['stakeholder']).subscribe(stakeholder => {
|
||||||
if (stakeholder) {
|
if (stakeholder) {
|
||||||
this.stakeholder = stakeholder;
|
this.stakeholder = stakeholder;
|
||||||
LinksResolver.setProperties(this.stakeholder.alias);
|
LinksResolver.setProperties(this.stakeholder.alias);
|
||||||
this.setProperties(this.stakeholder.alias, this.stakeholder.type);
|
this.setProperties(this.stakeholder.alias, this.stakeholder.type);
|
||||||
if (isSearch) {
|
if (params && params['topic'] && !this.activeTopic) {
|
||||||
this.activeTopic = null;
|
|
||||||
} else if (params && params['topic'] && !this.activeTopic) {
|
|
||||||
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.visibility));
|
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.visibility));
|
||||||
} else {
|
} else {
|
||||||
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.visibility));
|
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.visibility));
|
||||||
|
@ -146,9 +142,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
this.buildMenu();
|
this.buildMenu();
|
||||||
if (isSearch) {
|
if (params && params['topic']) {
|
||||||
this.activeTopic = null;
|
|
||||||
} else if (params && params['topic']) {
|
|
||||||
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.visibility));
|
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.visibility));
|
||||||
} else {
|
} else {
|
||||||
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.visibility));
|
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.visibility));
|
||||||
|
@ -156,11 +150,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LinksResolver.resetProperties();
|
if(this.stakeholder) {
|
||||||
this.stakeholderService.setStakeholder(null);
|
LinksResolver.resetProperties();
|
||||||
this.layoutService.setOpen(!(this.innerWidth && this.innerWidth <= 640));
|
this.stakeholderService.setStakeholder(null);
|
||||||
this.stakeholder = null;
|
this.stakeholder = null;
|
||||||
this.buildMenu();
|
this.buildMenu();
|
||||||
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,13 +239,25 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
items.push(new MenuItem('noTopics', 'No topics available yet', "", "", false, [], [], {}));
|
items.push(new MenuItem('noTopics', 'No topics available yet', "", "", false, [], [], {}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.adminMenuItems = [];
|
||||||
|
this.adminMenuItems.push(new MenuItem("general", "General", "", "/admin/" + this.stakeholder.alias, false, [], [], {}, {name: 'badge'}));
|
||||||
|
this.adminMenuItems.push(new MenuItem("indicators", "Indicators", "", "/admin/" + this.stakeholder.alias + '/indicators', false, [], [], {}, {name: 'bar_chart'}));
|
||||||
|
if (this.stakeholder.defaultId) {
|
||||||
|
this.adminMenuItems.push(new MenuItem("users", "Users", "", "/admin/" + this.stakeholder.alias + "/users", false, [], [], {}, {name: 'group'}, null, null, "/admin/" + this.stakeholder.alias + "/users"));
|
||||||
|
if (Session.isPortalAdministrator(this.user)) {
|
||||||
|
this.adminMenuItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/admin/" + this.stakeholder.alias + "/admin-tools"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.specialSideBarMenuItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}, {
|
||||||
|
name: 'search',
|
||||||
|
class: 'uk-text-secondary'
|
||||||
|
});
|
||||||
this.sideBarItems = items;
|
this.sideBarItems = items;
|
||||||
this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0;
|
this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildMenu() {
|
buildMenu() {
|
||||||
this.menuItems = [];
|
this.menuItems = [];
|
||||||
this.adminMenuItems = [];
|
|
||||||
this.userMenuItems = [];
|
this.userMenuItems = [];
|
||||||
if (this.user) {
|
if (this.user) {
|
||||||
if (this.isCurator()) {
|
if (this.isCurator()) {
|
||||||
|
@ -325,19 +332,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||||
stickyAnimation: true,
|
stickyAnimation: true,
|
||||||
menuPosition: "center"
|
menuPosition: "center"
|
||||||
};
|
};
|
||||||
// this.menuItems.push({
|
|
||||||
// rootItem: new MenuItem("", "Dashboard",
|
|
||||||
// "", '/' + this.stakeholder.alias + '/', false, [], null, {}), items: []
|
|
||||||
// });
|
|
||||||
this.adminMenuItems.push(new MenuItem("general", "General", "", "/admin/" + this.stakeholder.alias, false, [], [], {}, {name: 'badge'}));
|
|
||||||
this.adminMenuItems.push(new MenuItem("indicators", "Indicators", "", "/admin/" + this.stakeholder.alias + '/indicators', false, [], [], {}, {name: 'bar_chart'}));
|
|
||||||
if (this.stakeholder.defaultId) {
|
|
||||||
this.adminMenuItems.push(new MenuItem("users", "Users", "", "/admin/" + this.stakeholder.alias + "/users", false, [], [], {}, {name: 'group'}, null, null, "/admin/" + this.stakeholder.alias + "/users"));
|
|
||||||
if (Session.isPortalAdministrator(this.user)) {
|
|
||||||
this.adminMenuItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/admin/" + this.stakeholder.alias + "/admin-tools"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.specialSideBarMenuItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.isFrontPage || !this.hasAdminMenu) {
|
if (this.isFrontPage || !this.hasAdminMenu) {
|
||||||
|
|
|
@ -3,12 +3,9 @@ import {Component} from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openaire-error',
|
selector: 'openaire-error',
|
||||||
template: `
|
template: `
|
||||||
<div class="uk-margin-large-top">
|
<div class="uk-section">
|
||||||
<error></error>
|
<error></error>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class OpenaireErrorPageComponent {
|
export class OpenaireErrorPageComponent {}
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
}
|
|
||||||
|
|
|
@ -69,16 +69,16 @@ declare var UIkit;
|
||||||
<div class="uk-card uk-card-default uk-text-center uk-border-circle">
|
<div class="uk-card uk-card-default uk-text-center uk-border-circle">
|
||||||
<img class="uk-position-center uk-blend-multiply" [src]="photo">
|
<img class="uk-position-center uk-blend-multiply" [src]="photo">
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-left">
|
<div class="uk-margin-left">
|
||||||
<button (click)="remove()" class="uk-button-default uk-icon-button">
|
<button (click)="remove()" class="uk-button-danger uk-icon-button uk-icon-button-small">
|
||||||
<icon name="delete"></icon>
|
<icon [flex]="true" ratio="0.8" name="delete"></icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-small-left">
|
<div class="uk-margin-small-left">
|
||||||
<button class="uk-button-default uk-icon-button" (click)="file.click()">
|
<button class="uk-button-secondary uk-icon-button uk-icon-button-small" (click)="file.click()">
|
||||||
<icon name="edit"></icon>
|
<icon [flex]="true" ratio="0.8" name="edit"></icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Full width error message -->
|
<!-- Full width error message -->
|
||||||
<div *ngIf="uploadError" class="uk-text-danger uk-margin-small-top uk-width-1-1">{{uploadError}}</div>
|
<div *ngIf="uploadError" class="uk-text-danger uk-margin-small-top uk-width-1-1">{{uploadError}}</div>
|
||||||
|
|
|
@ -11,6 +11,4 @@ import {NotifyFormModule} from "../../openaireLibrary/notifications/notify-form/
|
||||||
declarations: [EditStakeholderComponent],
|
declarations: [EditStakeholderComponent],
|
||||||
exports: [EditStakeholderComponent]
|
exports: [EditStakeholderComponent]
|
||||||
})
|
})
|
||||||
export class EditStakeholderModule {
|
export class EditStakeholderModule {}
|
||||||
constructor() {}
|
|
||||||
}
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="stakeholder" class="uk-section uk-container">
|
<div *ngIf="stakeholder" class="uk-section uk-container">
|
||||||
<div class="uk-position-relative" style="min-height: 60vh">
|
<div class="uk-position-relative" style="min-height: 60vh">
|
||||||
<div [class.hidden]="loading">
|
<div [class.uk-hidden]="loading">
|
||||||
<edit-stakeholder #editStakeholderComponent [disableAlias]="true"></edit-stakeholder>
|
<edit-stakeholder #editStakeholderComponent [disableAlias]="true"></edit-stakeholder>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="loading" class="uk-position-center">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="activeCategory && countSubCategoriesToShow(activeCategory) > 1" class="uk-flex uk-flex-right">
|
<div *ngIf="activeCategory && countSubCategoriesToShow(activeCategory) > 1" class="uk-flex uk-flex-right uk-margin-top">
|
||||||
<ul class="uk-subnav uk-subnav-pill-alt">
|
<ul class="uk-subnav uk-subnav-pill-alt">
|
||||||
<ng-template ngFor [ngForOf]="activeCategory.subCategories" let-subCategory let-i="index">
|
<ng-template ngFor [ngForOf]="activeCategory.subCategories" let-subCategory let-i="index">
|
||||||
<li *ngIf="isPublicOrIsMember(subCategory.visibility)"
|
<li *ngIf="isPublicOrIsMember(subCategory.visibility)"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 13ef1734063f5331eaad586cf874a5b0f3f30521
|
Subproject commit a738d3bb49d1af38f7eaf3ce34d519c76f075e4a
|
|
@ -15,7 +15,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu_section uk-margin-large-top">
|
<div class="menu_section uk-margin-large-top">
|
||||||
<div *ngIf="stakeholder.topics[topicIndex]" class="active" [style]="'--index: ' + topicIndex + '; --size: ' + (stakeholder.topics[topicIndex].icon?'40px':0)"></div>
|
|
||||||
<ul class="uk-list uk-nav uk-nav-default" uk-nav>
|
<ul class="uk-list uk-nav uk-nav-default" uk-nav>
|
||||||
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-i="index">
|
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-i="index">
|
||||||
<li class="uk-visible-toggle" [class.uk-active]="topicIndex == i">
|
<li class="uk-visible-toggle" [class.uk-active]="topicIndex == i">
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8818983564cb9e9232979af27fa568c18fa4eba8
|
Subproject commit 318b3cdf42922d8b04400bb010733b78fcf1fe1c
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8c4585873a56165631bee6b9d33d11fe83fc897c
|
Subproject commit 25f7f7dd34fae80d1e2e25935c2f2772c5800e70
|
Loading…
Reference in New Issue