Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manipulate large volumes of metadata (TDR-2677) #64

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
69cebc6
Redundant templates
garethfoote Sep 8, 2023
e1ae957
Initial work introducing Task List to TDR
garethfoote Sep 8, 2023
cc6b75f
Remove redundant
garethfoote Sep 11, 2023
ea92b0e
Changes to call to actions. Adding back links
garethfoote Sep 11, 2023
23c4357
Back button language consistent
garethfoote Sep 11, 2023
603e679
Correct us of header
garethfoote Sep 11, 2023
878098b
Swap out html for nunjucks macro
garethfoote Sep 11, 2023
2a939d0
Modified the alt journeys implementation
garethfoote Sep 11, 2023
36518a5
Corrected name
garethfoote Sep 11, 2023
629f6f5
Changed first page after clicking start
garethfoote Sep 11, 2023
530ff66
CTA copy
garethfoote Sep 11, 2023
f311f8a
CSV upload pages
garethfoote Sep 11, 2023
44d469a
Updated TDR Components and header
garethfoote Sep 11, 2023
c6159e3
Renamed template
garethfoote Sep 11, 2023
c824e4b
Added new page for file upload restrictions
garethfoote Sep 11, 2023
bd8afcc
Back links added/corrected
garethfoote Sep 11, 2023
1c16e74
Changed copy to use 'consignment'
garethfoote Sep 11, 2023
a889e02
Started metadata guidance page
garethfoote Sep 11, 2023
00b06f7
Redundant image removed
garethfoote Sep 11, 2023
60cbd01
Corrected typo
garethfoote Sep 11, 2023
cae973f
Copy change: Clarifying this is a template
garethfoote Sep 11, 2023
3dd2cb4
Moved and updated confirm transfer page
garethfoote Sep 11, 2023
adcd0e3
Added 'file name' as intrinsic metadata
garethfoote Sep 11, 2023
0304aaf
Corrected title
garethfoote Sep 11, 2023
20aefbd
Corrected back link
garethfoote Sep 11, 2023
d4cc535
Moved and amended transfer confirmation page
garethfoote Sep 11, 2023
589a0a8
Updated logic in transfer tasks
garethfoote Sep 11, 2023
ffb2e3e
Changes to prepare/upload logic.
garethfoote Sep 11, 2023
0783f1a
Adding scaffolding of a user testing 'hub'
garethfoote Sep 11, 2023
75ee35c
Updated copy and added 'related content' aside. Changed View transfer…
garethfoote Sep 13, 2023
34da37c
Made CTA more specific
garethfoote Sep 13, 2023
78da71b
Corrected mock consignment ref
garethfoote Sep 13, 2023
e251680
Adding alternate redirect option for Prepare records
garethfoote Sep 18, 2023
3beaf61
Adding an optional pagination
garethfoote Sep 18, 2023
d849205
Optional skip page (see routes)
garethfoote Sep 18, 2023
5b969ef
Copy changes
garethfoote Sep 18, 2023
002954d
Copy change
garethfoote Sep 18, 2023
049550f
Renaming templates
garethfoote Sep 18, 2023
e68acd5
Templates renamed
garethfoote Sep 18, 2023
ada9496
Redirects
garethfoote Sep 18, 2023
3b77d8c
Templating renaming
garethfoote Sep 18, 2023
92ff55a
Missing HTML end tags
garethfoote Sep 18, 2023
16954ac
Upload CSV error journey
garethfoote Sep 19, 2023
20baf53
CSV upload fail journey
garethfoote Sep 19, 2023
da9e4a1
Updates to failure journeys
garethfoote Sep 19, 2023
d7df5b9
Removing user testing work to put into separate branch
garethfoote Sep 19, 2023
f392b21
Removing clear data for now
garethfoote Sep 19, 2023
d820206
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 19, 2023
c5b0769
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 19, 2023
b2961d3
Keeping header consistent
garethfoote Sep 19, 2023
f0dc75d
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 19, 2023
fc352ea
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 19, 2023
aec3eff
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 20, 2023
dae23b7
Header latest
garethfoote Sep 20, 2023
2262f75
Missing closing div
garethfoote Sep 25, 2023
ad77d44
Adding 65/66 and updating dates for 64
garethfoote Sep 26, 2023
c51f806
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 26, 2023
b62bf61
Changed PR version
garethfoote Sep 26, 2023
4ead3ba
Making buttons generic for less editing
garethfoote Sep 26, 2023
24e0eec
Merge branch 'prototype-versions' into TDR-2677-manipulate-large-meta…
garethfoote Sep 26, 2023
7f11a64
Updated prototype management link
garethfoote Oct 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed app/assets/images/download-metadata.png
Binary file not shown.
2 changes: 1 addition & 1 deletion app/assets/javascripts/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/javascripts/main.js.map

Large diffs are not rendered by default.

87 changes: 85 additions & 2 deletions app/assets/sass/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
@import './prototype-history.scss';
@import './folder-upload.scss';


.tna-tree__radios-directory__label {
background-image: url('/public/images/folder.png');
}
Expand Down Expand Up @@ -69,7 +68,7 @@
float: right;
}

//file-checks-results.html
//upload-records-checks-results.html
.govuk-success-summary {
@include govuk-text-colour;
@include govuk-responsive-padding(4);
Expand Down Expand Up @@ -490,3 +489,87 @@
text-align: center;
}

/**
* Task list
* - Cannot go into a seperate sass file because mixins are not recognised. :(
*/

$govuk-task-list-hover-colour: govuk-colour("light-grey");

.govuk-task-list {
@include govuk-font($size: 19);
margin-top: 0;
@include govuk-responsive-margin(6, "bottom");
padding: 0;
list-style-type: none;
}

// This uses table layout so that the task name and status always appear side-by-side, with the width of
// each 'column' being flexible depending upon the length of the task names and statuses.
//
// The position is set to 'relative' so than an absolutely-positioned transparent element box
// can be added within the link so that the whole row can be clickable.
.govuk-task-list__item {
display: table;
position: relative;
width: 100%;
margin-bottom: 0;
padding-top: govuk-spacing(2);
padding-bottom: govuk-spacing(2);
border-bottom: 1px solid $govuk-border-colour;
}

.govuk-task-list__item:first-child {
border-top: 1px solid $govuk-border-colour;
}

// This class is added to the <li> elements where the task name is a link.
// The background hover colour is added to help indicate that the whole row is clickable, rather
// than just the visible link text.
.govuk-task-list__item--with-link:hover {
background: $govuk-task-list-hover-colour;
}

.govuk-task-list__task-name-and-hint {
display: table-cell;
vertical-align: top;
@include govuk-text-colour;
}

.govuk-task-list__status {
display: table-cell;
padding-left: govuk-spacing(2);
text-align: right;
vertical-align: top;
@include govuk-text-colour;
}

.govuk-task-list__status--cannot-start-yet {
color: $govuk-secondary-text-colour;
}

// This adds an empty transparent box covering the whole row, including the task status and
// any hint text. Because this is generated within the link element, this allows the whole area
// to be clickable.
.govuk-task-list__link::after {
content: "";
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}

.govuk-task-list__task_hint {
margin-top: govuk-spacing(1);
color: $govuk-secondary-text-colour;
}

.govuk-task-list__link {
color: $govuk-link-colour;
}

.tdr-aside {
border-top: 2px solid $govuk-link-colour;
}
21 changes: 20 additions & 1 deletion app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,26 @@ router.get(
);

router.post(
"/prototype-versions/clear-data",
"/transfer-tasks",
function (req, res) {

if(req.session.data['redirect-to'] ){
const redirectTo = req.session.data['redirect-to'];
delete req.session.data['redirect-to'];
res.redirect(redirectTo);
} else {
res.render("transfer-tasks")
}

}
);

router.all('/*/j/:journeyid', (req, res, next) => {
req.session.data.journeyid = req.params.journeyid;
res.redirect("/"+req.params[0]+"?journey="+req.params['journeyid']);
})

router.post("/prototype-versions/clear-data",
function (req, res) {
req.session.data = {};
res.redirect("/prototype-versions/data-cleared");
Expand Down
76 changes: 76 additions & 0 deletions app/views/confirm-transfer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Confirm transfer - MOCK-TDR-1294 - Transfer Digital Records
{% endblock %}

{% block beforeContent %}
<a href="./transfer-tasks" class="govuk-back-link">Consignment: MOCK-TDR-1294</a>
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">

<span class="govuk-caption-l">Consignment: MOCK-TDR-1294</span>
<h1 class="govuk-heading-l">Confirm your transfer</h1>

<p class="govuk-body">Here is a summary of your consignment.</p>


{{ govukSummaryList({
rows: [
{
key: { text: "Series reference" },
value: { text: data['series'] }
},
{
key: { text: "Consignment reference" },
value: { text: "MOCK-TDR-1294" }
},
{
key: { text: "Transferring body" },
value: { text: "Test Department" }
},
{
key: { text: "Records uploaded" },
value: { text: "1200" }
},
{
key: { text: "Closed records" },
value: { text: "20" }
},
{
key: { text: "Records with additional metadata" },
value: { text: "223" }
}
]
}) }}


<div class="govuk-form-group">
<fieldset class="govuk-fieldset" aria-describedby="waste-hint">
<div class="govuk-checkboxes">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="waste-2" name="waste" type="checkbox" value="mines">
<label class="govuk-label govuk-checkboxes__label" for="waste-2">
By proceeding with this transfer, I confirm that I am agreeing to transfer legal custody of these records to The National Archives.
</label>
</div>
</div>

</fieldset>
</div>

<form class="form" action="/transfer-confirmation" method="post">
<input type="hidden" name="transfer-status" value="confirmed" />
<div class="govuk-button-group">
<button type="submit" class="govuk-button" data-module="govuk-button">
Transfer your records
</button>
</div>
</form>

</div>
</div>
{% endblock %}
39 changes: 0 additions & 39 deletions app/views/file-checks-results-fail.html

This file was deleted.

70 changes: 0 additions & 70 deletions app/views/file-checks-results.html

This file was deleted.

48 changes: 48 additions & 0 deletions app/views/file-upload-restrictions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% extends "layouts/main.html" %}
{% from "govuk/components/warning-text/macro.njk" import govukWarningText %}
{% from "govuk/components/pagination/macro.njk" import govukPagination %}


{% block pageTitle %}
File upload restrictions - MOCK-TDR-1294 - Transfer Digital Records
{% endblock %}

{% block beforeContent %}
<a href="./transfer-tasks" class="govuk-back-link">Consignment: MOCK-TDR-1294</a>
{% endblock %}

{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">

<span class="govuk-caption-l">Consignment: MOCK-TDR-1294</span>
<h1 class="govuk-heading-l">File upload restrictions</h1>


<h2 class="govuk-heading-m">File size restrictions</h2>

<p class="govuk-body">There is a size limit of 2GB for an individual file and we ask that you upload no more than 500,000 files per consignment.</p>
<p class="govuk-body">If you need to transfer larger files, contact us at <a class="govuk-link" href="mailto:[email protected]">[email protected]</a>.</p>

<h2 class="govuk-heading-m">Files and folders we cannot accept</h2>

<p class="govuk-body">We cannot accept files and folders which are password protected, zipped or contain slashes (/ and \) in the name. You must remove all thumbnail images (thumbs.db) and executable files (.exe). Empty folders will not be transferred.</p>

{{ govukWarningText({
html: "If your folder contains files that we cannot accept, you may have to start the transfer again.",
iconFallbackText: "Warning"
}) }}

{{ govukPagination({
next: {
labelText: "Complete transfer agreement",
href: "/transfer-agreement"
}
}) }}


</div>
</div>

{% endblock %}
2 changes: 1 addition & 1 deletion app/views/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1 class="govuk-heading-l govuk-!-margin-bottom-9">
</h1>

<h2 class="govuk-heading-m">Upload your records to start a new transfer</h2>
<a href="series.html" role="button" draggable="false" class="govuk-button" data-module="govuk-button">
<a href="/transfer-tasks" role="button" draggable="false" class="govuk-button" data-module="govuk-button">
Start new transfer
</a>

Expand Down
Loading