Skip to content

Commit

Permalink
Updated deletion templates
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondap committed Jan 26, 2024
1 parent c086737 commit 8ddcab3
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 33 deletions.
12 changes: 7 additions & 5 deletions views/deletions/approved_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
<div class="box">
<div class="box-header"><h1>Deletion Approved</h1></div>
<div class="box-content">
<p>You have approved deletion of the following file:</p>
<p>You have approved deletion of the following files:</p>

<ol class="mb-3 mt-3 ml-5" style="list-style: decimal">
{{ range $index, $gf := .deletionRequest.GenericFiles }}
<li class="mb-1"><a target="_blank" href="/files/show/{{ $gf.ID }}">{{ $gf.Identifier }}</a></li>
{{ end }}
</ol>

<p>
<b>{{ $gf.Identifier }}</b><br/>
Size: {{ humanSize $gf.Size }} <br/>
Created: {{ dateUS $gf.CreatedAt }} <br/>
Updated: {{ dateUS $gf.UpdatedAt }} <br/>
Requested: {{ .deletionRequest.RequestedBy.Name }} on {{ dateUS .deletionRequest.RequestedAt }} <br/>
Approved: {{ .deletionRequest.ConfirmedBy.Name }} on {{ dateUS .deletionRequest.ConfirmedAt }} <br/>
</p>
Expand Down
18 changes: 8 additions & 10 deletions views/deletions/approved_object.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

{{ template "shared/_header.html" .}}

{{ $obj := (index .deletionRequest.IntellectualObjects 0) }}

<div class="box">
<div class="box-header"><h1>Deletion Approved</h1></div>
<div class="box-content">
<p>You have approved deletion of the following object:</p>
<p>You have approved deletion of the following objects:</p>

<ol class="mb-3 mt-3 ml-5" style="list-style: decimal">
{{ range $index, $obj := .deletionRequest.IntellectualObjects }}
<li class="mb-1"><a target="_blank" href="/objects/show/{{ $obj.ID }}">{{ $obj.Identifier }}</a></li>
{{ end }}
</ol>


<p>
<b>{{ $obj.Identifier }}</b><br/>
Alt Identifier: {{ $obj.AltIdentifier }} <br/>
Internal Sender Identifier: {{ $obj.InternalSenderIdentifier }} <br/>
Bag Group: {{ $obj.BagGroupIdentifier }} <br/>
Storage Option: {{ $obj.StorageOption }} <br/>
Created: {{ dateUS $obj.CreatedAt }} <br/>
Updated: {{ dateUS $obj.UpdatedAt }} <br/>
Requested: {{ .deletionRequest.RequestedBy.Name }} on {{ dateUS .deletionRequest.RequestedAt }} <br/>
Approved: {{ .deletionRequest.ConfirmedBy.Name }} on {{ dateUS .deletionRequest.ConfirmedAt }} <br/>
</p>
Expand Down
13 changes: 8 additions & 5 deletions views/deletions/cancelled_file.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
<div class="box">
<div class="box-header"><h1>Deletion Cancelled</h1></div>
<div class="box-content">
<p>You have cancelled deletion of the following file:</p>
<p>You have cancelled deletion of the following files:</p>


<ol class="mb-3 mt-3 ml-5" style="list-style: decimal">
{{ range $index, $gf := .deletionRequest.GenericFiles }}
<li class="mb-1"><a target="_blank" href="/files/show/{{ $gf.ID }}">{{ $gf.Identifier }}</a></li>
{{ end }}
</ol>

<p>
<b>{{ $gf.Identifier }}</b><br/>
Size: {{ humanSize $gf.Size }} <br/>
Created: {{ dateUS $gf.CreatedAt }} <br/>
Updated: {{ dateUS $gf.UpdatedAt }} <br/>
Requested: {{ .deletionRequest.RequestedBy.Name }} on {{ dateUS .deletionRequest.RequestedAt }} <br/>
Cancelled: {{ .deletionRequest.CancelledBy.Name }} on {{ dateUS .deletionRequest.CancelledAt }} <br/>
</p>
Expand Down
15 changes: 7 additions & 8 deletions views/deletions/cancelled_object.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
<div class="box">
<div class="box-header"><h1>Deletion Cancelled</h1></div>
<div class="box-content">
<p>You have cancelled deletion of the following object:</p>
<p>You have cancelled deletion of the following objects:</p>

<ol class="mb-3 mt-3 ml-5" style="list-style: decimal">
{{ range $index, $obj := .deletionRequest.IntellectualObjects }}
<li class="mb-1"><a target="_blank" href="/objects/show/{{ $obj.ID }}">{{ $obj.Identifier }}</a></li>
{{ end }}
</ol>

<p>
<b>{{ $obj.Identifier }}</b><br/>
Alt Identifier: {{ $obj.AltIdentifier }} <br/>
Internal Sender Identifier: {{ $obj.InternalSenderIdentifier }} <br/>
Bag Group: {{ $obj.BagGroupIdentifier }} <br/>
Storage Option: {{ $obj.StorageOption }} <br/>
Created: {{ dateUS $obj.CreatedAt }} <br/>
Updated: {{ dateUS $obj.UpdatedAt }} <br/>
Requested: {{ .deletionRequest.RequestedBy.Name }} on {{ dateUS .deletionRequest.RequestedAt }} <br/>
Cancelled: {{ .deletionRequest.CancelledBy.Name }} on {{ dateUS .deletionRequest.CancelledAt }} <br/>
</p>
Expand Down
12 changes: 7 additions & 5 deletions views/deletions/review.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="box">
<div class="box-header"><h1>Review Deletion Request</h1></div>
<div class="box-content">
<p>User {{ .deletionRequest.RequestedBy.Name }} ({{ .deletionRequest.RequestedBy.Email }}) wants to delete the following items:</p>
<p class="mb-3">User {{ .deletionRequest.RequestedBy.Name }} ({{ .deletionRequest.RequestedBy.Email }}) wants to delete the following items:</p>

<!-- Single file deletion -->
{{ if (eq .itemType "file") }}
Expand All @@ -25,8 +25,8 @@ <h3>Generic File</h3>

<h3>Intellectual Object</h3>

<p>
<b>{{ .object.Identifier }}</b><br/>
<p class="mt-3">
<a target="_blank" href="/objects/show/{{ .object.ID }}">{{ .object.Identifier }}</a><br/>
Alt Identifier: {{ .object.AltIdentifier }} <br/>
Internal Sender Identifier: {{ .object.InternalSenderIdentifier }} <br/>
Bag Group: {{ .object.BagGroupIdentifier }} <br/>
Expand All @@ -41,13 +41,15 @@ <h3>Intellectual Object</h3>

<h3>Intellectual Objects</h3>

<ol class="mb-3 mt-3 ml-5" style="list-style: decimal">
{{ range $index, $obj := .objectList }}
<p><b>{{ $obj.Identifier }}</b></p>
<li class="mb-1"><a target="_blank" href="/objects/show/{{ $obj.ID }}">{{ $obj.Identifier }}</a></li>
{{ end }}
</ol>

{{ end }}

<p>Do you want to approve or cancel this request? If you approve, the items(s) will be deleted as soon as possible. Deletion cannot be undone. If you cancel, the file(s) will stay and no one else will be able to approve this request.</p>
<p class="mb-3">Do you want to approve or cancel this request? If you approve, the items(s) will be deleted as soon as possible. Deletion cannot be undone. If you cancel, the file(s) will stay and no one else will be able to approve this request.</p>

<div class="is-flex">
<button class="button mr-3" onclick="document.forms['deletionCancelForm'].submit()">Cancel</button>
Expand Down

0 comments on commit 8ddcab3

Please sign in to comment.