Skip to content

Commit 4ade17f

Browse files
authored
chore(resource): hide file value in properties (DSP-1261) (#484)
1 parent 4d0703f commit 4ade17f

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ <h3 class="label mat-title">
7676
<!-- list of properties -->
7777
<div *ngFor="let prop of resource.resProps; let last = last">
7878
<!-- show property; all in case of showAll === true or only the ones with prop.values -->
79-
<div *ngIf="!prop.propDef['isLinkProperty'] && showAllProps || ( prop.values && prop.values.length > 0 )"
79+
<div *ngIf="(showAllProps || ( prop.values && prop.values.length > 0 )) &&
80+
(!prop.propDef['isLinkProperty'] &&
81+
prop.guiDef.propertyIndex !== representationConstants.stillImage &&
82+
prop.guiDef.propertyIndex !== representationConstants.movingImage &&
83+
prop.guiDef.propertyIndex !== representationConstants.audio &&
84+
prop.guiDef.propertyIndex !== representationConstants.document &&
85+
prop.guiDef.propertyIndex !== representationConstants.text)"
8086
[class.border-bottom]="prop.values && !last"
8187
class="property">
8288
<div class="property-label">

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

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

8383
valueOperationEventSubscriptions: Subscription[] = []; // array of ValueOperationEvent subscriptions
8484

85+
representationConstants = {
86+
'stillImage': Constants.HasStillImageFileValue,
87+
'movingImage': Constants.HasMovingImageFileValue,
88+
'audio': Constants.HasAudioFileValue,
89+
'document': Constants.HasDocumentFileValue,
90+
'text': Constants.HasTextFileValue
91+
};
92+
8593
project: ReadProject;
8694
user: ReadUser;
8795

0 commit comments

Comments
 (0)