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:
Konstantinos Triantafyllou 2022-07-02 21:27:29 +03:00
parent d67c19a913
commit fbec29e2ca
10 changed files with 39 additions and 51 deletions

View File

@ -117,18 +117,14 @@ export class AppComponent implements OnInit, OnDestroy {
this.subscriptions.push(this.params.subscribe(params => {
if (this.paramsResolved) {
this.loading = true;
let isSearch = this.router.url.includes('/search/');
if (params && params['stakeholder']) {
// this.stakeholder = this.stakeholderService.stakeholder;
if (!this.stakeholder || this.stakeholder.alias !== params['stakeholder']) {
this.subscriptions.push(this.stakeholderService.getStakeholder(params['stakeholder']).subscribe(stakeholder => {
if (stakeholder) {
this.stakeholder = stakeholder;
LinksResolver.setProperties(this.stakeholder.alias);
this.setProperties(this.stakeholder.alias, this.stakeholder.type);
if (isSearch) {
this.activeTopic = null;
} else if (params && params['topic'] && !this.activeTopic) {
if (params && params['topic'] && !this.activeTopic) {
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.visibility));
} else {
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.visibility));
@ -146,9 +142,7 @@ export class AppComponent implements OnInit, OnDestroy {
}));
} else {
this.buildMenu();
if (isSearch) {
this.activeTopic = null;
} else if (params && params['topic']) {
if (params && params['topic']) {
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.visibility));
} else {
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.visibility));
@ -156,11 +150,12 @@ export class AppComponent implements OnInit, OnDestroy {
this.loading = false;
}
} else {
if(this.stakeholder) {
LinksResolver.resetProperties();
this.stakeholderService.setStakeholder(null);
this.layoutService.setOpen(!(this.innerWidth && this.innerWidth <= 640));
this.stakeholder = null;
this.buildMenu();
}
this.loading = false;
}
}
@ -244,13 +239,25 @@ export class AppComponent implements OnInit, OnDestroy {
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.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0;
}
buildMenu() {
this.menuItems = [];
this.adminMenuItems = [];
this.userMenuItems = [];
if (this.user) {
if (this.isCurator()) {
@ -325,19 +332,6 @@ export class AppComponent implements OnInit, OnDestroy {
stickyAnimation: true,
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 {
if (this.isFrontPage || !this.hasAdminMenu) {

View File

@ -3,12 +3,9 @@ import {Component} from '@angular/core';
@Component({
selector: 'openaire-error',
template: `
<div class="uk-margin-large-top">
<div class="uk-section">
<error></error>
</div>
`
})
export class OpenaireErrorPageComponent {
constructor() {}
}
export class OpenaireErrorPageComponent {}

View File

@ -70,13 +70,13 @@ declare var UIkit;
<img class="uk-position-center uk-blend-multiply" [src]="photo">
</div>
<div class="uk-margin-left">
<button (click)="remove()" class="uk-button-default uk-icon-button">
<icon name="delete"></icon>
<button (click)="remove()" class="uk-button-danger uk-icon-button uk-icon-button-small">
<icon [flex]="true" ratio="0.8" name="delete"></icon>
</button>
</div>
<div class="uk-margin-small-left">
<button class="uk-button-default uk-icon-button" (click)="file.click()">
<icon name="edit"></icon>
<button class="uk-button-secondary uk-icon-button uk-icon-button-small" (click)="file.click()">
<icon [flex]="true" ratio="0.8" name="edit"></icon>
</button>
</div>
</div>

View File

@ -11,6 +11,4 @@ import {NotifyFormModule} from "../../openaireLibrary/notifications/notify-form/
declarations: [EditStakeholderComponent],
exports: [EditStakeholderComponent]
})
export class EditStakeholderModule {
constructor() {}
}
export class EditStakeholderModule {}

View File

@ -22,7 +22,7 @@
<div inner>
<div *ngIf="stakeholder" class="uk-section uk-container">
<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>
</div>
<div *ngIf="loading" class="uk-position-center">

View File

@ -63,7 +63,7 @@
</div>
</div>
<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">
<ng-template ngFor [ngForOf]="activeCategory.subCategories" let-subCategory let-i="index">
<li *ngIf="isPublicOrIsMember(subCategory.visibility)"

@ -1 +1 @@
Subproject commit 13ef1734063f5331eaad586cf874a5b0f3f30521
Subproject commit a738d3bb49d1af38f7eaf3ce34d519c76f075e4a

View File

@ -15,7 +15,6 @@
</ul>
</div>
<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>
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-i="index">
<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