Commit 5dbbf3c9 authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Display tab without link in case of SSR

parent bd201319
...@@ -3,122 +3,145 @@ ...@@ -3,122 +3,145 @@
<app-page-header [pageInfo]="pageHeaderInfo" [customGoToPreviousPage]="goToPreviousPage"></app-page-header> <app-page-header [pageInfo]="pageHeaderInfo" [customGoToPreviousPage]="goToPreviousPage"></app-page-header>
</div> </div>
<div class="tabulations" *ngIf="!isRendertron"> <div class="tabulations" >
<ul class="navigation-tabs"> <ul class="navigation-tabs">
<li [routerLinkActive]="'is-active'"> <li [routerLinkActive]="'is-active'">
<a (click)="setPosition()" [routerLink]="[AppRoutes.info.uri]" class="tab-link"> <a (click)="setPosition()" [routerLink]="[AppRoutes.info.uri]" class="tab-link" *ngIf="!isRendertron; else infoTab">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 37" aria-hidden="true"> <ng-template *ngTemplateOutlet="infoTab"></ng-template>
<g id="picto_x5F_info">
<path d="M19 15.6c.3 0 .5.2.5.6V25c0 .3-.2.6-.5.6s-.5-.2-.5-.6v-8.9c0-.3.2-.5.5-.5z" class="secondary" />
<circle cx="19" cy="12" r=".5" class="secondary" />
<path
d="M19 2.5c8.5 0 15.5 7 15.5 15.5s-7 15.5-15.5 15.5S3.5 26.5 3.5 18 10.5 2.5 19 2.5m0-1C9.9 1.5 2.5 8.9 2.5 18S9.9 34.5 19 34.5 35.5 27.1 35.5 18 28.1 1.5 19 1.5z"
class="primary" />
</g>
</svg>
<div class="tab-text-wrapper"> <ng-template #infoTab>
<div> <svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 37" aria-hidden="true">
<span class="tab-title tab-title-long" i18n="@@dataset.detail.infoTab">Information</span> <g id="picto_x5F_info">
<span class="tab-title tab-title-short">Info</span> <path d="M19 15.6c.3 0 .5.2.5.6V25c0 .3-.2.6-.5.6s-.5-.2-.5-.6v-8.9c0-.3.2-.5.5-.5z" class="secondary" />
<circle cx="19" cy="12" r=".5" class="secondary" />
<path
d="M19 2.5c8.5 0 15.5 7 15.5 15.5s-7 15.5-15.5 15.5S3.5 26.5 3.5 18 10.5 2.5 19 2.5m0-1C9.9 1.5 2.5 8.9 2.5 18S9.9 34.5 19 34.5 35.5 27.1 35.5 18 28.1 1.5 19 1.5z"
class="primary" />
</g>
</svg>
<div class="tab-text-wrapper">
<div>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.infoTab">Information</span>
<span class="tab-title tab-title-short">Info</span>
</div>
<div>
<span class="tab-subtitle" [title]="datasetLicense">
{{ datasetLicense }}
</span>
</div>
</div> </div>
<div> </ng-template>
<span class="tab-subtitle" [title]="datasetLicense">
{{ datasetLicense }}
</span>
</div>
</div>
</a> </a>
</li> </li>
<li [routerLinkActive]="'is-active'" *ngIf="hasTable || hasMap"> <li [routerLinkActive]="'is-active'" *ngIf="hasTable || hasMap">
<a (click)="setPosition()" [routerLink]="[AppRoutes.data.uri]" class="tab-link"> <a (click)="setPosition()" [routerLink]="[AppRoutes.data.uri]" class="tab-link" *ngIf="!isRendertron; else dataTab">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 32" aria-hidden="true"> <ng-template *ngTemplateOutlet="dataTab"></ng-template>
<path class="primary"
d="M19 0L4.5 6.4v19.4L19 32l14.5-6.4V6.4L19 0zm13.5 24.9l-13 5.7-.5.3-13.5-5.8v-18l13.5-6 13.1 5.8L19 13l.5.2v.6l13-6.1v17.2z" /> <ng-template #dataTab>
<path class="secondary" d="M19 30.9l.5-.2V13.2L5.9 6.9l-.4.2v.7l13 6.1v16.8z" /> <svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 32" aria-hidden="true">
</svg> <path class="primary"
<div class="tab-text-wrapper"> d="M19 0L4.5 6.4v19.4L19 32l14.5-6.4V6.4L19 0zm13.5 24.9l-13 5.7-.5.3-13.5-5.8v-18l13.5-6 13.1 5.8L19 13l.5.2v.6l13-6.1v17.2z" />
<div> <path class="secondary" d="M19 30.9l.5-.2V13.2L5.9 6.9l-.4.2v.7l13 6.1v16.8z" />
<span class="tab-title" i18n="@@dataset.detail.data">Data</span> </svg>
</div> <div class="tab-text-wrapper">
<div> <div>
<span class="tab-subtitle" i18n="@@dataset.detail.lines">{{ datasetDataNumber }} lines</span> <span class="tab-title" i18n="@@dataset.detail.data">Data</span>
</div>
<div>
<span class="tab-subtitle" i18n="@@dataset.detail.lines">{{ datasetDataNumber }} lines</span>
</div>
</div> </div>
</div> </ng-template>
</a> </a>
</li> </li>
<li [routerLinkActive]="'is-active'" *ngIf="datasetFormatsList"> <li [routerLinkActive]="'is-active'" *ngIf="datasetFormatsList">
<a (click)="setPosition()" [routerLink]="[AppRoutes.downloads.uri]" class="tab-link"> <a (click)="setPosition()" [routerLink]="[AppRoutes.downloads.uri]" class="tab-link" *ngIf="!isRendertron; else dlTab">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true"> <ng-template *ngTemplateOutlet="dlTab"></ng-template>
<path class="primary"
d="M32.515 30H4.5a.5.5 0 01-.5-.5v-7.485a.5.5 0 011 0V29h27.015v-6.985a.5.5 0 011 0V29.5a.5.5 0 01-.5.5z" /> <ng-template #dlTab>
<path class="secondary" <svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
d="M26.771 14.024a.5.5 0 00-.708 0l-7.056 7.057V2.7a.5.5 0 00-1 0v18.381l-7.056-7.057a.5.5 0 00-.707.707l7.91 7.911a.5.5 0 00.707 0l7.91-7.911a.5.5 0 000-.707z" /> <path class="primary"
</svg> d="M32.515 30H4.5a.5.5 0 01-.5-.5v-7.485a.5.5 0 011 0V29h27.015v-6.985a.5.5 0 011 0V29.5a.5.5 0 01-.5.5z" />
<div class="tab-text-wrapper"> <path class="secondary"
<div> d="M26.771 14.024a.5.5 0 00-.708 0l-7.056 7.057V2.7a.5.5 0 00-1 0v18.381l-7.056-7.057a.5.5 0 00-.707.707l7.91 7.911a.5.5 0 00.707 0l7.91-7.911a.5.5 0 000-.707z" />
<span class="tab-title tab-title-long" i18n="@@dataset.detail.downloads">Downloads</span> </svg>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.downloads">Downloads</span> <div class="tab-text-wrapper">
</div> <div>
<div> <span class="tab-title tab-title-long" i18n="@@dataset.detail.downloads">Downloads</span>
<span class="tab-subtitle">{{ datasetFormatsList }}</span> <span class="tab-title tab-title-short" i18n="@@dataset.detail.downloads">Downloads</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetFormatsList }}</span>
</div>
</div> </div>
</div> </ng-template>
</a> </a>
</li> </li>
<li [routerLinkActive]="'is-active'" *ngIf="datasetServicesList.length > 0"> <li [routerLinkActive]="'is-active'" *ngIf="datasetServicesList.length > 0">
<a (click)="setPosition()" [routerLink]="[AppRoutes.resources.uri]" class="tab-link"> <a (click)="setPosition()" [routerLink]="[AppRoutes.resources.uri]" class="tab-link" *ngIf="!isRendertron; else apiTab">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true"> <ng-template *ngTemplateOutlet="apiTab"></ng-template>
<path class="secondary"
d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" /> <ng-template #apiTab>
<path class="primary" <svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" /> <path class="secondary"
</svg> d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" />
<div class="tab-text-wrapper"> <path class="primary"
<div> d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" />
<span class="tab-title tab-title-long" i18n="@@dataset.detail.api">API</span> </svg>
<span class="tab-title tab-title-short">API</span> <div class="tab-text-wrapper">
</div> <div>
<div> <span class="tab-title tab-title-long" i18n="@@dataset.detail.api">API</span>
<span class="tab-subtitle">{{ datasetServicesList }}</span> <span class="tab-title tab-title-short">API</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetServicesList }}</span>
</div>
</div> </div>
</div> </ng-template>
</a> </a>
</li> </li>
<li [routerLinkActive]="'is-active'" *ngIf="otherResourceList && !datasetFormatsList"> <li [routerLinkActive]="'is-active'" *ngIf="otherResourceList && !datasetFormatsList">
<a (click)="setPosition()" [routerLink]="[AppRoutes.otherResources.uri]" class="tab-link"> <a (click)="setPosition()" [routerLink]="[AppRoutes.otherResources.uri]" class="tab-link" *ngIf="!isRendertron; else resTab">
<svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true"> <ng-template *ngTemplateOutlet="resTab"></ng-template>
<path class="secondary"
d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" /> <ng-template #resTab>
<path class="primary" <svg class="tab-icon" xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" viewBox="0 0 38 32" aria-hidden="true">
d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" /> <path class="secondary"
</svg> d="M12.841 22.076l-8.889-5.484 8.889-5.485a.5.5 0 10-.526-.85l-9.578 5.91-.011.01a.616.616 0 00-.075.07.478.478 0 00-.065.07s-.009.007-.012.012a.489.489 0 00-.026.073.411.411 0 00-.035.094.466.466 0 000 .1.55.55 0 000 .091.456.456 0 00.038.1.412.412 0 00.024.067l.01.01a.5.5 0 00.153.154l9.578 5.91a.5.5 0 00.526-.852z" />
<div class="tab-text-wrapper"> <path class="primary"
<div> d="M35.491 16.594a.46.46 0 000-.1.418.418 0 00-.035-.095.477.477 0 00-.026-.072s-.009-.007-.012-.012a.478.478 0 00-.065-.07.546.546 0 00-.075-.07l-.011-.01-9.578-5.91a.5.5 0 10-.526.85l8.889 5.485-8.889 5.484a.5.5 0 00.526.852l9.578-5.91a.5.5 0 00.153-.154l.01-.01a.54.54 0 00.025-.067.509.509 0 00.037-.1.562.562 0 00-.001-.091zM15.53 28.907a.526.526 0 01-.14-.02.5.5 0 01-.339-.62L21.99 4.6a.5.5 0 01.959.281L16.01 28.548a.5.5 0 01-.48.359z" />
<span class="tab-title tab-title-long" i18n="@@dataset.detail.resources">Ressources</span> </svg>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.resources">Ressources</span> <div class="tab-text-wrapper">
</div> <div>
<div> <span class="tab-title tab-title-long" i18n="@@dataset.detail.resources">Ressources</span>
<span class="tab-subtitle">{{ datasetFormatsList }}</span> <span class="tab-title tab-title-short" i18n="@@dataset.detail.resources">Ressources</span>
</div>
<div>
<span class="tab-subtitle">{{ datasetFormatsList }}</span>
</div>
</div> </div>
</div> </ng-template>
</a> </a>
</li> </li>
<li [routerLinkActive]="'is-active'"> <li [routerLinkActive]="'is-active'">
<a (click)="setPosition()" [routerLink]="[AppRoutes.dataReuses.uri]" class="tab-link"> <a (click)="setPosition()" [routerLink]="[AppRoutes.dataReuses.uri]" class="tab-link" *ngIf="!isRendertron; else reuseTab">
<svg class="tab-icon" viewBox="0 0 38 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> <ng-template *ngTemplateOutlet="reuseTab"></ng-template>
<path class="primary" fill-rule="evenodd" clip-rule="evenodd" d="M5 6.286L19.455 0 33.91 6.285V25.14l-14.455 6.284L5 25.14V6.286zm27.59.516l-6.484-2.82.002.005-5.362 2.264-1.229-.567 5.328-2.25-5.39-2.344-5.423 2.358 5.4 2.218-1.24.572-5.33-2.189.046-.112-6.59 2.866 5.494 2.38-.527.244v.619L6 7.754v7.874l5.285 2.485v1.055l1 .423v7.626l6.541 2.844v-7.703l.63.267.37-.157v7.7h-.007l.006.005 6.543-2.845V19.7l1.257-.532v-1.086l5.285-2.46V7.753l-5.285 2.286v-.613l-.532-.246 5.497-2.378zm.32 9.923l-5.542 2.58v7.588l5.542-2.41v-7.758zM11.285 26.782v-7.564L6 16.733v7.752l5.285 2.297z" fill="#464A57"/>
<path class="secondary" fill-rule="evenodd" clip-rule="evenodd" d="M11.285 19.17V9.427l8.17-3.771 8.17 3.77v9.742l-8.17 3.457-8.17-3.457v.002zm1.75-9.45l6.42-2.962 6.45 2.976-6.274 2.836h-.349l-6.247-2.85zm-.75.758v8.029l6.541 2.767V13.46l-6.54-2.983zm7.541 10.905l6.8-2.877v-8l-6.8 3.073v7.804z" fill="#DA322F"/> <ng-template #reuseTab>
</svg> <svg class="tab-icon" viewBox="0 0 38 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<div class="tab-text-wrapper"> <path class="primary" fill-rule="evenodd" clip-rule="evenodd" d="M5 6.286L19.455 0 33.91 6.285V25.14l-14.455 6.284L5 25.14V6.286zm27.59.516l-6.484-2.82.002.005-5.362 2.264-1.229-.567 5.328-2.25-5.39-2.344-5.423 2.358 5.4 2.218-1.24.572-5.33-2.189.046-.112-6.59 2.866 5.494 2.38-.527.244v.619L6 7.754v7.874l5.285 2.485v1.055l1 .423v7.626l6.541 2.844v-7.703l.63.267.37-.157v7.7h-.007l.006.005 6.543-2.845V19.7l1.257-.532v-1.086l5.285-2.46V7.753l-5.285 2.286v-.613l-.532-.246 5.497-2.378zm.32 9.923l-5.542 2.58v7.588l5.542-2.41v-7.758zM11.285 26.782v-7.564L6 16.733v7.752l5.285 2.297z" fill="#464A57"/>
<div> <path class="secondary" fill-rule="evenodd" clip-rule="evenodd" d="M11.285 19.17V9.427l8.17-3.771 8.17 3.77v9.742l-8.17 3.457-8.17-3.457v.002zm1.75-9.45l6.42-2.962 6.45 2.976-6.274 2.836h-.349l-6.247-2.85zm-.75.758v8.029l6.541 2.767V13.46l-6.54-2.983zm7.541 10.905l6.8-2.877v-8l-6.8 3.073v7.804z" fill="#DA322F"/>
<span class="tab-title tab-title-long" i18n="@@dataset.detail.reuse">Reuse</span> </svg>
<span class="tab-title tab-title-short" i18n="@@dataset.detail.reuse">Reuse</span> <div class="tab-text-wrapper">
</div> <div>
<div> <span class="tab-title tab-title-long" i18n="@@dataset.detail.reuse">Reuse</span>
<span class="tab-subtitle">{{reusesTypes}}</span> <span class="tab-title tab-title-short" i18n="@@dataset.detail.reuse">Reuse</span>
</div>
<div>
<span class="tab-subtitle">{{reusesTypes}}</span>
</div>
</div> </div>
</div> </ng-template>
</a> </a>
</li> </li>
</ul> </ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment