Skip to content

Commit 79b4d29

Browse files
authored
fix(resource): increase width of space between entries of incoming links (DSP-1908) (#538)
* style(resource): fix position of property action bubble * style(resource): display the incoming links inside the list of properties
1 parent 303ac3d commit 79b4d29

4 files changed

Lines changed: 25 additions & 41 deletions

File tree

‎src/app/workspace/resource/properties/properties.component.html‎

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ <h3 class="label mat-title">
1818
<!-- <span class="desktop-only">{{showAllProps ? 'Hide empty' : 'Show all'}} properties</span> -->
1919
</button>
2020

21-
<!-- TODO: activate delete action to delete the whole resource -->
22-
<!--
23-
<button mat-button class="delete-res">
24-
<mat-icon>delete</mat-icon>
25-
</button>
26-
-->
27-
2821
<!-- Share resource: copy ark url, add to favorites or open in new tab -->
2922
<button mat-icon-button class="share-res" matTooltip="Share resource: {{resource.res.versionArkUrl}}" matTooltipPosition="above"
3023
[disabled]="deletedResource"
@@ -144,34 +137,21 @@ <h3 class="label mat-title">
144137
<mat-icon>add_box</mat-icon>
145138
</button>
146139
</div>
147-
</div>
148-
</div>
149-
</div>
150140

151-
<div *ngIf="incomingLinkResources.length > 0">
152-
<div class="property border-top">
153-
<div class="property-label">
154-
<!-- label of the incoming links -->
155-
<h3 class="label mat-subheading-1">
156-
has incoming link
157-
</h3>
158-
</div>
159-
<div class="property-value">
160-
<div *ngIf="loading">
161-
...Loading
162-
</div>
163-
<div *ngIf="!loading">
164-
<!-- the value(s) of the incoming links -->
165-
<div *ngFor="let inRes of incomingLinkResources">
166-
<a [routerLink]="['/resource', inRes.id]" target="_blank">{{inRes.label}}</a>
141+
<!-- in case of incoming links we have to display them here -->
142+
<div *ngIf="prop.propDef.id === hasIncomingLinkIri && incomingLinkResources.length > 0">
143+
<app-progress-indicator *ngIf="loading"></app-progress-indicator>
144+
<div *ngIf="!loading">
145+
<!-- the value(s) of the incoming links -->
146+
<a class="link link-value" *ngFor="let inRes of incomingLinkResources" [routerLink]="['/resource', inRes.id]" target="_blank">{{inRes.label}}</a>
147+
<mat-paginator *ngIf="numberOffAllIncomingLinkRes > 25"
148+
[length]=numberOffAllIncomingLinkRes
149+
[pageSize]="25"
150+
[hidePageSize]="true"
151+
[pageIndex]="pageEvent.pageIndex"
152+
(page)="goToPage($event)">
153+
</mat-paginator>
167154
</div>
168-
<mat-paginator
169-
[length]=numberOffAllIncomingLinkRes
170-
[pageSize]="25"
171-
[hidePageSize]="true"
172-
[pageIndex]="pageEvent.pageIndex"
173-
(page)="goToPage($event)">
174-
</mat-paginator>
175155
</div>
176156
</div>
177157
</div>

‎src/app/workspace/resource/properties/properties.component.scss‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@
9999
.property-value {
100100
grid-column: 2 / span 3;
101101
}
102+
103+
.link-value {
104+
padding: 2px 0;
105+
display: block;
106+
}
102107
}
103108
}
104109

‎src/app/workspace/resource/properties/properties.component.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ export class PropertiesComponent implements OnInit, OnChanges, OnDestroy {
116116

117117
representationConstants = RepresentationConstants;
118118

119+
hasIncomingLinkIri = Constants.KnoraApiV2 + Constants.HashDelimiter + 'hasIncomingLinkValue';
120+
119121
project: ReadProject;
120122
user: ReadUser;
121123

‎src/assets/style/_elements.scss‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ $gc-small: $form-width - $gc-large - 4;
673673
.action-bubble {
674674
position: absolute;
675675
right: 8px;
676-
bottom: 16px;
676+
top: -20px;
677677
border: 1px solid #e4e4e4;
678678
border-radius: 14px;
679679
padding: 0;
@@ -689,18 +689,15 @@ $gc-small: $form-width - $gc-large - 4;
689689
outline: none;
690690
background-color: transparent;
691691
color: #000000;
692-
margin: 0 2px;
692+
margin: 0;
693693
border-radius: 50%;
694694
transition: background-color ease-out 0.5s;
695695
min-width: inherit;
696696
line-height: normal;
697697

698-
&:first-child {
699-
margin: 0 2px 0 -1px;
700-
}
701-
698+
&:first-child,
702699
&:last-child {
703-
margin: 0 -1px 0 2px;
700+
margin: 0 -1px;
704701
}
705702

706703
.material-icons {
@@ -716,7 +713,7 @@ $gc-small: $form-width - $gc-large - 4;
716713
}
717714

718715
button.info {
719-
cursor: default;
716+
cursor: help;
720717
}
721718

722719
button:hover {

0 commit comments

Comments
 (0)