Suzana Dirla 7b7e39d989 [ADF-2562] Download a previous version (#3141)
* [ADF-2562] Download a previous version

* [ADF-2562] add input property to enable/disable version downloads

* [ADF-2562] add example in demo-shell

* [ADF-2562] unit tests

* [ADF-2561] View comments on previous versions (#3137)

* [ADF-2561] View comments on previous versions

add input property to enable/disable viewing version comments

* [ADF-2561] add more tests

* remove name property

* test fixes
2018-04-05 21:24:05 +01:00

25 lines
1.2 KiB
HTML

<mat-list class="adf-version-list" *ngIf="!isLoading; else loading_template">
<mat-list-item *ngFor="let version of versions">
<mat-icon mat-list-icon>insert_drive_file</mat-icon>
<h4 mat-line class="adf-version-list-item-name">{{version.entry.name}}</h4>
<p mat-line>
<span class="adf-version-list-item-version">{{version.entry.id}}</span> -
<span class="adf-version-list-item-date">{{version.entry.modifiedAt | date}}</span>
</p>
<p mat-line class="adf-version-list-item-comment" *ngIf="showComments">{{version.entry.versionComment}}</p>
<mat-menu #versionMenu="matMenu" yPosition="below" xPosition="before">
<button mat-menu-item (click)="restore(version.entry.id)"> Restore </button>
<button mat-menu-item (click)="downloadVersion(version.entry.id)" title="Download" *ngIf="enableDownload"> Download </button>
</mat-menu>
<button mat-icon-button [matMenuTriggerFor]="versionMenu">
<mat-icon>more_vert</mat-icon>
</button>
</mat-list-item>
</mat-list>
<ng-template #loading_template>
<mat-progress-bar data-automation-id="version-history-loading-bar" mode="indeterminate" color="accent"></mat-progress-bar>
</ng-template>