mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge remote-tracking branch 'upstream/main' into fix-broken-item-mapper-pagination_contribute-main
# Conflicts: # src/app/shared/object-list/object-list.component.html # src/app/shared/object-select/collection-select/collection-select.component.ts # src/app/shared/object-select/item-select/item-select.component.ts # src/app/shared/pagination/pagination.component.ts
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{"item.version.history.table.version" | translate}}</th>
|
||||
<th scope="col" *ngIf="(showSubmitter() | async)">{{"item.version.history.table.editor" | translate}}</th>
|
||||
<th scope="col" *ngIf="(showSubmitter$ | async)">{{"item.version.history.table.editor" | translate}}</th>
|
||||
<th scope="col">{{"item.version.history.table.date" | translate}}</th>
|
||||
<th scope="col">{{"item.version.history.table.summary" | translate}}</th>
|
||||
</tr>
|
||||
@@ -24,69 +24,15 @@
|
||||
<tbody>
|
||||
<tr *ngFor="let version of versions?.page" [id]="'version-row-' + version.id">
|
||||
<td class="version-row-element-version">
|
||||
<!-- Get the ID of the workspace/workflow item (`undefined` if they don't exist).
|
||||
Conditionals inside *ngVar are needed in order to avoid useless calls. -->
|
||||
<ng-container *ngVar="((hasDraftVersion$ | async) ? getWorkspaceId(version?.item) : undefined) as workspaceId$">
|
||||
<ng-container *ngVar=" ((workspaceId$ | async) ? undefined : getWorkflowId(version?.item)) as workflowId$">
|
||||
|
||||
<div class="left-column">
|
||||
|
||||
<span *ngIf="(workspaceId$ | async) || (workflowId$ | async); then versionNumberWithoutLink else versionNumberWithLink"></span>
|
||||
<ng-template #versionNumberWithLink>
|
||||
<a [routerLink]="getVersionRoute(version.id)">{{version.version}}</a>
|
||||
</ng-template>
|
||||
<ng-template #versionNumberWithoutLink>
|
||||
{{version.version}}
|
||||
</ng-template>
|
||||
<span *ngIf="version?.id === itemVersion?.id">*</span>
|
||||
|
||||
<span *ngIf="workspaceId$ | async" class="text-light badge badge-primary ml-3">
|
||||
{{ "item.version.history.table.workspaceItem" | translate }}
|
||||
</span>
|
||||
|
||||
<span *ngIf="workflowId$ | async" class="text-light badge badge-info ml-3">
|
||||
{{ "item.version.history.table.workflowItem" | translate }}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="right-column">
|
||||
|
||||
<div class="btn-group edit-field space-children-mr" *ngIf="displayActions">
|
||||
<!--EDIT WORKSPACE ITEM-->
|
||||
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
||||
*ngIf="workspaceId$ | async"
|
||||
(click)="editWorkspaceItem(workspaceId$)"
|
||||
title="{{'item.version.history.table.action.editWorkspaceItem' | translate }}">
|
||||
<i class="fas fa-pencil-alt fa-fw"></i>
|
||||
</button>
|
||||
<!--CREATE-->
|
||||
<ng-container *ngIf="canCreateVersion$ | async">
|
||||
<button class="btn btn-outline-primary btn-sm version-row-element-create"
|
||||
[disabled]="isAnyBeingEdited() || (hasDraftVersion$ | async)"
|
||||
(click)="createNewVersion(version)"
|
||||
title="{{createVersionTitle$ | async | translate }}">
|
||||
<i class="fas fa-code-branch fa-fw"></i>
|
||||
</button>
|
||||
</ng-container>
|
||||
<!--DELETE-->
|
||||
<ng-container *ngIf="canDeleteVersion$(version) | async">
|
||||
<button class="btn btn-sm version-row-element-delete"
|
||||
[ngClass]="isAnyBeingEdited() ? 'btn-outline-primary' : 'btn-outline-danger'"
|
||||
[disabled]="isAnyBeingEdited()"
|
||||
(click)="deleteVersion(version, version.id===itemVersion.id)"
|
||||
title="{{'item.version.history.table.action.deleteVersion' | translate}}">
|
||||
<i class="fas fa-trash fa-fw"></i>
|
||||
</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ds-item-versions-row-element-version [hasDraftVersion]="hasDraftVersion$ | async"
|
||||
[version]="version"
|
||||
[item]="item" [displayActions]="displayActions"
|
||||
[itemVersion]="itemVersion"
|
||||
[versionBeingEditedNumber]="versionBeingEditedNumber"
|
||||
(versionsHistoryChange)="getAllVersions($event)"
|
||||
></ds-item-versions-row-element-version>
|
||||
</td>
|
||||
<td class="version-row-element-editor" *ngIf="(showSubmitter() | async)">
|
||||
<td class="version-row-element-editor" *ngIf="(showSubmitter$ | async)">
|
||||
{{version?.submitterName}}
|
||||
</td>
|
||||
<td class="version-row-element-date">
|
||||
|
Reference in New Issue
Block a user