Skip to content

Commit

Permalink
change the layout.
Browse files Browse the repository at this point in the history
TODO ngFor for document.modified
  • Loading branch information
the-last-pastafarian committed Jan 15, 2025
1 parent e96d173 commit 9e554a1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion desktop/src/app/components/docedit/docedit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class DoceditComponent {
ChangesHistoryModalComponent,
{ animation: false, backdrop: 'static', keyboard: false, windowClass : "history-modal-content" }
);

modalRef.componentInstance.document = this.documentHolder.clonedDocument;
}

Expand Down
1 change: 1 addition & 0 deletions desktop/src/app/components/docedit/docedit.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import { LiteratureEntryModalComponent } from './core/forms/array-field/literatu
WidgetsModule,
ImageGridModule,
ImageRowModule,
// CommonModule,
ChangesHistoryModalComponent
],
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export class ResourcesComponent implements OnDestroy {


public async editQRCode(document: Document) {

this.initModal(document, QrCodeEditorModalComponent, MenuContext.QR_CODE_EDITOR)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export class ChangesHistoryModalComponent {
if (event.key === 'Escape') this.escapeKeyPressed = false;
}

public async initialize() {
// this.category = this.projectConfiguration.getCategory(this.document.resource.category);
// this.printedFields = await this.getPrintedFields();
1
}

public formatDateTime( date: string | Date, locale: string = 'de-DE' ) {
return new Date(date).toLocaleString(locale);
Expand Down
17 changes: 6 additions & 11 deletions desktop/src/app/components/widgets/changes-history-modal.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
<div class="modal-header">
<h5 class="modal-title" i18n="@@widgets.historyModal.header">{{document.resource.identifier}} Änderunghistorie</h5>
<h5 class="modal-title" i18n="@@widgets.historyModal.header">Änderunghistorie</h5>
</div>

<div class="modal-body">
<h6>The resource <b>{{document.resource.identifier}}</b> has been created by the user {{document.created.user}} the {{formatDateTime(document.created.date)}}</h6>
<div id="changes-history-modal-body" class="modal-body">
<div *ngIf="document" id="ifdocument">
<div id="list">
<!-- {{document.modified[0].date}} -->
<div *ngIf="document.modified">
<div id="list">
<div id="list-header">
<div class="list-header-field" i18n="@@changes.list.colnames.date">Datum</div>
<div class="list-header-field" i18n="@@changes.list.colnames.action">Aktion</div>
<div class="list-header-field" i18n="@@changes.list.colnames.date">Änderungsdatum</div>
<div class="list-header-field" i18n="@@changes.list.colnames.user">Benutzer</div>
</div>
<div class="list-body">
<div *ngFor="let modification of document.modified.reverse()"
class = "list-row">
<div class= "list-body-field" [textContent]="formatDateTime(modification.date)"></div>
<div class= "list-body-field" i18n="@@changes.list.value.modified" > Geändert </div>
<div class= "list-body-field" [textContent]="modification.user"></div>
</div>
<div class = "list-row">
<div class= "list-body-field" [textContent]="formatDateTime(document.created.date)"></div>
<div class= "list-body-field" i18n="@@changes.list.value.created"> Erstellt </div>
<div class= "list-body-field" [textContent]="document.created.user"></div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 9e554a1

Please sign in to comment.