-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
documents: refactoring action buttons
Co-Authored-by: Bertrand Zuchuat <[email protected]>
- Loading branch information
1 parent
4b2dc25
commit e8c4a67
Showing
7 changed files
with
242 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...pp/record/detail-view/document-detail-view/document-detail/document-detail.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!-- | ||
RERO angular core | ||
Copyright (C) 2020-2023 RERO | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<div class="main-content"> | ||
<ng-core-detail-button | ||
*ngIf="record" | ||
[record]="record" | ||
[type]="type" | ||
[adminMode]="adminMode" | ||
[useStatus]="useStatus" | ||
[updateStatus]="updateStatus" | ||
[deleteStatus]="deleteStatus" | ||
(recordEvent)="recordEvent($event)" | ||
(deleteMessageEvent)="showDeleteMessage($event)" | ||
> | ||
<ng-container beforeButton> | ||
<ng-container *ngIf="record"> | ||
<button | ||
*ngIf="!record.metadata.pid && source" | ||
class="btn btn-sm btn-outline-primary ml-1" | ||
[permissions]="permissions.DOC_CREATE" | ||
(click)="importDocument($event, record, { source: source, pid: pid })" | ||
translate>Import</button> | ||
<button | ||
*ngIf="record.metadata.pid" | ||
class="btn btn-sm btn-outline-primary ml-1" | ||
[permissions]="permissions.DOC_CREATE" | ||
[routerLink]="['/records', 'documents', 'duplicate']" | ||
[queryParams]="{type: 'documents', pid: record.metadata.pid}" | ||
translate>Duplicate</button> | ||
</ng-container> | ||
</ng-container> | ||
</ng-core-detail-button> | ||
<ng-core-error [error]="error" *ngIf="error"></ng-core-error> | ||
<ng-template ngCoreRecordDetail></ng-template> | ||
<ng-core-record-files [type]="type" [pid]="record.id" | ||
*ngIf="record && filesEnabled && updateStatus && updateStatus.can"></ng-core-record-files> | ||
</div> |
Oops, something went wrong.