Reorders option on sidebar bottom and adds static urls (to be tested)
This commit is contained in:
parent
b33c49ce4c
commit
292c758a41
|
@ -4,11 +4,9 @@
|
|||
<p class="option" (click)="navigate()" [ngClass]="{'option-active': this.router.url === '/about'}">
|
||||
{{'FOOTER.ABOUT' | translate}}</p>
|
||||
</div>
|
||||
<div *ngIf="isAuthenticated()" class="col-auto">
|
||||
<p class="option" [routerLink]="['/contact-support']" [routerLinkActive]="['option-active']">
|
||||
{{'FOOTER.CONTACT-SUPPORT' | translate}}</p>
|
||||
<!-- <p class="option" (click)="openContactDialog()" [ngClass]="{'option-active': this.router.url === '/contact-support'}">
|
||||
{{'FOOTER.CONTACT-SUPPORT' | translate}}</p> -->
|
||||
<div class="col-auto ml-3">
|
||||
<p class="option" [routerLink]="['/terms-and-conditions']" [routerLinkActive]="['option-active']">
|
||||
{{'FOOTER.TERMS-OF-SERVICE' | translate}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -20,20 +18,23 @@
|
|||
{{'FOOTER.GLOSSARY' | translate}}</p> -->
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<p class="option" [routerLink]="['/terms-and-conditions']" [routerLinkActive]="['option-active']">
|
||||
{{'FOOTER.TERMS-OF-SERVICE' | translate}}</p>
|
||||
<p class="option" [routerLink]="['/user-guide']" [routerLinkActive]="['option-active']">
|
||||
{{'FOOTER.GUIDE' | translate}}</p>
|
||||
<!-- <p class="option" (click)="openUserGuideDialog()" [ngClass]="{'option-active': this.router.url === '/user-guide'}">
|
||||
{{'FOOTER.GUIDE' | translate}}</p> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-6 text-center">
|
||||
<p class="option" (click)="openFaqDialog()" [ngClass]="{'option-active': this.router.url === '/faq'}">
|
||||
{{'FOOTER.FAQ' | translate}}</p>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="row ml-2">
|
||||
<div class="col-auto">
|
||||
<p class="option" [routerLink]="['/user-guide']" [routerLinkActive]="['option-active']">
|
||||
{{'FOOTER.GUIDE' | translate}}</p>
|
||||
<!-- <p class="option" (click)="openUserGuideDialog()" [ngClass]="{'option-active': this.router.url === '/user-guide'}">
|
||||
{{'FOOTER.GUIDE' | translate}}</p> -->
|
||||
<div *ngIf="isAuthenticated()" class="col-auto">
|
||||
<p class="option" [routerLink]="['/contact-support']" [routerLinkActive]="['option-active']">
|
||||
{{'FOOTER.CONTACT-SUPPORT' | translate}}</p>
|
||||
<!-- <p class="option" (click)="openContactDialog()" [ngClass]="{'option-active': this.router.url === '/contact-support'}">
|
||||
{{'FOOTER.CONTACT-SUPPORT' | translate}}</p> -->
|
||||
</div>
|
||||
<!-- <div class="col-auto text-center">
|
||||
<a class="option" [routerLink]="['/privacy-policy']" [routerLinkActive]="['option-active']">
|
||||
|
|
|
@ -3,13 +3,20 @@
|
|||
<mat-list class="nav mat-list" *ngFor="let groupMenuItem of groupMenuItems; let firstGroup = first; let i = index" [class.nav-list-item]="showItem(groupMenuItem)" [ngClass]="{'flex-grow-1': i == groupMenuItems.length - 2}">
|
||||
<div *ngIf="showItem(groupMenuItem);">
|
||||
<hr *ngIf="!firstGroup">
|
||||
<mat-list-item routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}" *ngFor="let groupMenuRoute of groupMenuItem.routes; let first = first" class="nav-item"
|
||||
[ngClass]="{'mt-4': first && firstGroup}">
|
||||
<a class="nav-link nav-row" (click)="groupMenuRoute.path === '/feedback' ? sendFeedback(groupMenuRoute) : ''" [routerLink]="[groupMenuRoute.path]" [ngClass]="{'dmp-tour': groupMenuRoute.path == '/plans', 'dataset-tour' : groupMenuRoute.path == '/datasets'}">
|
||||
<mat-list-item routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}" *ngFor="let groupMenuRoute of groupMenuItem.routes; let first = first" class="nav-item" [ngClass]="{'mt-4': first && firstGroup}">
|
||||
<a class="nav-link nav-row" *ngIf="groupMenuRoute.path !== '/feedback' && groupMenuRoute.path !== '/co-branding'" [routerLink]="[groupMenuRoute.path]" [ngClass]="{'dmp-tour': groupMenuRoute.path == '/plans', 'dataset-tour' : groupMenuRoute.path == '/datasets'}">
|
||||
<i class="material-icons icon">{{ groupMenuRoute.icon }}</i>
|
||||
<i *ngIf="groupMenuRoute.path == '/plans' || groupMenuRoute.path == '/datasets'" class="material-icons icon-mask">person</i>
|
||||
<span [ngClass]="{'pl-0': groupMenuRoute.path == '/plans' || groupMenuRoute.path == '/datasets'}">{{groupMenuRoute.title | translate}}</span>
|
||||
</a>
|
||||
<a class="nav-link nav-row" *ngIf="groupMenuRoute.path === '/feedback'" (click)="openContactSupport(groupMenuRoute)">
|
||||
<i class="material-icons icon">{{ groupMenuRoute.icon }}</i>
|
||||
<span>{{groupMenuRoute.title | translate}}</span>
|
||||
</a>
|
||||
<a class="nav-link nav-row" *ngIf="groupMenuRoute.path === '/co-branding'" href="/splash/resources/co-branding.html">
|
||||
<i class="material-icons icon">{{ groupMenuRoute.icon }}</i>
|
||||
<span>{{groupMenuRoute.title | translate}}</span>
|
||||
</a>
|
||||
</mat-list-item>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
|
|
@ -56,7 +56,7 @@ export const ADMIN_ROUTES: RouteInfo[] = [
|
|||
];
|
||||
|
||||
export const INFO_ROUTES: RouteInfo[] = [
|
||||
{ path: '/splash/resources/co-branding.html', title: 'SIDE-BAR.CO-BRANDING', icon: 'toll' },
|
||||
{ path: '/co-branding', title: 'SIDE-BAR.CO-BRANDING', icon: 'toll' },
|
||||
{ path: '/contact-support', title: 'SIDE-BAR.SUPPORT', icon: 'help' },
|
||||
{ path: '/feedback', title: 'SIDE-BAR.FEEDBACK', icon: 'feedback', url: 'https://docs.google.com/forms/d/1KNhgjQyGrA6lYjOOUUL5cqU2BVquS0qdfwzOGxokgAw/viewform?edit_requested=true' }
|
||||
];
|
||||
|
@ -90,7 +90,6 @@ export class SidebarComponent implements OnInit {
|
|||
private dialog: MatDialog,
|
||||
public router: Router,
|
||||
private location: Location) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -240,7 +239,7 @@ export class SidebarComponent implements OnInit {
|
|||
return this.currentRoute === '/language-editor' || this.currentRoute === '/profile';
|
||||
}
|
||||
|
||||
openLanguageDialog() {
|
||||
public openLanguageDialog() {
|
||||
if (this.dialog.openDialogs.length > 0) {
|
||||
this.dialog.closeAll();
|
||||
}
|
||||
|
@ -254,7 +253,12 @@ export class SidebarComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
sendFeedback(groupMenuRoute: RouteInfo) {
|
||||
window.open(groupMenuRoute.url, '_blank');
|
||||
public openContactSupport(groupMenuRoute: RouteInfo) {
|
||||
if (this.isAuthenticated()) {
|
||||
window.open(groupMenuRoute.url, '_blank');
|
||||
} else {
|
||||
window.open('/splash/contact.html', '_self');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue