[Library | explore-redesign]: Fixes in direct linking - back button link | Added back button link to the landing page for projects.

1. linkingGeneric.component.html: [Bug fix] Updated checks for back to result landing page button link | Added back to project landing page button link.
2. directLinking.component.ts: In "createClaimEntity()" method, set value of entity.project.url.
3. ClaimEntityTitle.component.ts: Added "uk-flex" class to middle align icon to the name.
4. claimHelper.class.ts: Commented a console.log.
This commit is contained in:
Konstantina Galouni 2023-03-01 11:59:48 +02:00
parent 67714f6ac4
commit 2edeb788e3
4 changed files with 13 additions and 5 deletions

View File

@ -168,7 +168,7 @@ export class ShowOptions {
this.basketShowSources = false;
}
showLinkTo() {
console.log(this.linkTo, "showLinkTo")
// console.log(this.linkTo, "showLinkTo")
this.show = this.linkTo;
this.basketswitchToLinkTo();
HelperFunctions.scroll();

View File

@ -152,6 +152,7 @@ export class DirectLinkingComponent {
entity.type = "project";
entity.title = project.projectName;
entity.project = new ClaimProject();
entity.project.url = properties.searchLinkToProject + entity.id;
entity.project.acronym = project.projectAcronym;
entity.project.code = project.code;
entity.project.endDate = project.endDate;

View File

@ -30,9 +30,16 @@
<breadcrumbs *ngIf="!inlineEntity" [breadcrumbs]="breadcrumbs"></breadcrumbs>
<!-- [routerLink]="properties.searchLinkToResult.split('?')[0]"-->
<!-- [queryParams]="routerHelper.createQueryParam('id', inlineEntity.id)"-->
<a *ngIf="inlineEntity"
[routerLink]="inlineEntity.result.url.split('?')[0]"
[queryParams]="routerHelper.createQueryParam(inlineEntity.result.url.split('?')[1].split('=')[0], inlineEntity.id)"
<a *ngIf="inlineEntity && inlineEntity.result"
[routerLink]="inlineEntity.result?.url.split('?')[0]"
[queryParams]="routerHelper.createQueryParam(inlineEntity.result?.url.split('?')[1].split('=')[0], inlineEntity.id)"
class="uk-button uk-button-link uk-text-transform-none uk-flex uk-flex-middle">
<icon name="west" [flex]="true"></icon>
<span class="uk-margin-small-left">Back to {{getEntityName(inlineEntity.type, false)}}</span>
</a>
<a *ngIf="inlineEntity && inlineEntity.project"
[routerLink]="inlineEntity.project?.url?.split('?')[0]"
[queryParams]="routerHelper.createQueryParam(inlineEntity.project?.url.split('?')[1].split('=')[0], inlineEntity.id)"
class="uk-button uk-button-link uk-text-transform-none uk-flex uk-flex-middle">
<icon name="west" [flex]="true"></icon>
<span class="uk-margin-small-left">Back to {{getEntityName(inlineEntity.type, false)}}</span>

View File

@ -7,7 +7,7 @@ import {StringUtils} from "../../../utils/string-utils.class";
template:
`
<div class="uk-grid uk-flex uk-flex-middle">
<span *ngIf="showIcon" >
<span *ngIf="showIcon" class="uk-flex">
<span *ngIf=" entity.result" class="material-icons uk-text-small uk-text-meta" >insert_drive_file
</span>
<span *ngIf=" entity.project"