|
2 | 2 | @using DigitalLearningSolutions.Web.ViewModels.Frameworks |
3 | 3 | @model ImportCompetenciesViewModel |
4 | 4 | @{ |
5 | | - ViewData["Title"] = "Framework - Import Competencies"; |
6 | | - ViewData["Application"] = "Framework Service"; |
7 | | - ViewData["HeaderPathName"] = "Framework Service"; |
8 | | - var errorHasOccurred = !ViewData.ModelState.IsValid; |
9 | | - var cancelLinkData = Html.GetRouteValues(); |
| 5 | + ViewData["Application"] = "Framework Service"; |
| 6 | + ViewData["HeaderPathName"] = "Framework Service"; |
| 7 | + var errorHasOccurred = !ViewData.ModelState.IsValid; |
| 8 | + ViewData["Title"] = errorHasOccurred ? "Error: Bulk upload competencies" : "Bulk upload competencies"; |
| 9 | + var cancelLinkData = Html.GetRouteValues(); |
10 | 10 | } |
11 | 11 | <link rel="stylesheet" href="@Url.Content("~/css/frameworks/frameworksShared.css")" asp-append-version="true"> |
12 | 12 | @section NavMenuItems { |
13 | | - <partial name="Shared/_NavMenuItems" /> |
| 13 | + <partial name="Shared/_NavMenuItems" /> |
14 | 14 | } |
15 | | - @section NavBreadcrumbs { |
16 | | - <nav class="nhsuk-breadcrumb" aria-label="Breadcrumb"> |
17 | | - <div class="nhsuk-width-container"> |
18 | | - <ol class="nhsuk-breadcrumb__list"> |
19 | | - <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link trigger-loader" asp-action="ViewFrameworks" asp-route-tabname="Mine">Frameworks</a></li> |
20 | | - <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link trigger-loader" asp-action="ViewFramework" asp-route-frameworkId="@ViewContext.RouteData.Values["frameworkId"]" asp-route-tabname="Structure">Framework Structure</a></li> |
21 | | - <li class="nhsuk-breadcrumb__item">Excel import</li> |
22 | | - </ol> |
23 | | - <p class="nhsuk-breadcrumb__back"><a class="nhsuk-breadcrumb__backlink" asp-action="ViewFramework" asp-route-frameworkId="@ViewContext.RouteData.Values["frameworkId"]" asp-route-tabname="Structure">Back to framework structure</a></p> |
24 | | - </div> |
25 | | - </nav> |
| 15 | +@section NavBreadcrumbs { |
| 16 | + <nav class="nhsuk-breadcrumb" aria-label="Breadcrumb"> |
| 17 | + <div class="nhsuk-width-container"> |
| 18 | + <ol class="nhsuk-breadcrumb__list"> |
| 19 | + <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link trigger-loader" asp-action="ViewFrameworks" asp-route-tabname="Mine">Frameworks</a></li> |
| 20 | + <li class="nhsuk-breadcrumb__item"><a class="nhsuk-breadcrumb__link trigger-loader" asp-action="ViewFramework" asp-route-frameworkId="@ViewContext.RouteData.Values["frameworkId"]" asp-route-tabname="Structure">Framework Structure</a></li> |
| 21 | + <li class="nhsuk-breadcrumb__item">Bulk upload</li> |
| 22 | + </ol> |
| 23 | + <p class="nhsuk-breadcrumb__back"><a class="nhsuk-breadcrumb__backlink" asp-action="ViewFramework" asp-route-frameworkId="@ViewContext.RouteData.Values["frameworkId"]" asp-route-tabname="Structure">Back to framework structure</a></p> |
| 24 | + </div> |
| 25 | + </nav> |
26 | 26 | } |
27 | | - <div class="nhsuk-grid-row"> |
| 27 | +<div class="nhsuk-grid-row"> |
28 | 28 | <div class="nhsuk-grid-column-full"> |
29 | | - @if (errorHasOccurred) |
30 | | - { |
31 | | - <vc:error-summary order-of-property-names="@(new[] { nameof(Model.ImportFile) })" /> |
32 | | - } |
33 | | - <h1 class="nhsuk-heading-xl">Import from Excel</h1> |
34 | | - <vc:inset-text css-class="" text="The building blocks for your framework will be referred to as 'competencies' for the purpose of importing. Once they have been imported, they will be referred to using your chosen vocabulary."></vc:inset-text> |
35 | | - <p class="nhsuk-body-m"> |
36 | | - To import competencies from Excel, you will need an .xlsx worksheet file saved to your computer that meets the following requirements: |
37 | | - <ul> |
38 | | - <li>Has import data formatted as a table on the first worksheet in the file</li> |
39 | | - <li> |
40 | | - Has the following column titles on the cells in the first row: |
41 | | - <ul> |
42 | | - <li><strong>Competency group</strong> (cell A1)</li> |
43 | | - <li><strong>Competency name</strong> (cell B1)</li> |
44 | | - <li><strong>Competency description</strong> (cell C1)</li> |
45 | | - </ul> |
46 | | - </li> |
47 | | - <li>Import data in subsequent rows with no blank rows (including hidden rows)</li> |
48 | | - <li>Import data must be formatted as a table (select all data and choose "Format as Table" in Excel</li> |
49 | | - <li>Import data rows must include a <strong>Competency name</strong></li> |
50 | | - <li>If <strong>Competency group</strong> is left blank, the competency will be imported without a group and listed after grouped competencies in the framework</li> |
51 | | - </ul> |
52 | | - </p> |
53 | | - <form class="nhsuk-u-margin-bottom-3" method="post" enctype="multipart/form-data"> |
54 | | - <input type="hidden" asp-for="@Model.FrameworkId" /> |
55 | | - <vc:file-input asp-for="@nameof(Model.ImportFile)" label="Excel file ready for import" hint-text="" css-class="nhsuk-u-width-one-half" /> |
56 | | - <button class="nhsuk-button" type="submit">Upload and import</button> |
57 | | - </form> |
58 | | - <vc:cancel-link asp-controller="Frameworks" asp-action="ViewFramework" asp-all-route-data="@cancelLinkData" link-text="Cancel" /> |
59 | | - </div> |
| 29 | + @if (errorHasOccurred) |
| 30 | + { |
| 31 | + <vc:error-summary order-of-property-names="@(new[] { nameof(Model.ImportFile) })" /> |
| 32 | + } |
| 33 | + <h1 class="nhsuk-heading-xl">Bulk upload or update competencies</h1> |
| 34 | + <vc:inset-text css-class="" text="The building blocks for your framework will be referred to as 'competencies' for the purpose of importing. Once they have been imported, they will be referred to using your chosen vocabulary."></vc:inset-text> |
| 35 | + <p class="nhsuk-body-m"> |
| 36 | + To bulk add and/or update competencies in your framework, download an Excel workbook using one of the options below. |
| 37 | + </p> |
| 38 | + <form> |
| 39 | + <div class="nhsuk-form-group"> |
| 40 | + |
| 41 | + <fieldset class="nhsuk-fieldset" aria-describedby="download-hint"> |
| 42 | + <legend class="nhsuk-fieldset__legend nhsuk-fieldset__legend--l"> |
| 43 | + <h1 class="nhsuk-fieldset__heading"> |
| 44 | + What would you like to download? |
| 45 | + </h1> |
| 46 | + </legend> |
| 47 | + <div class="nhsuk-hint" id="download-hint"> |
| 48 | + Select one option |
| 49 | + </div> |
| 50 | + <div class="nhsuk-radios nhsuk-radios--conditional"> |
| 51 | + <div class="nhsuk-radios__item"> |
| 52 | + <input class="nhsuk-radios__input" id="download-option-2" type="radio" name="download-option" value="1" aria-describedby="download-option-1-hint" aria-controls="conditional-download-1" aria-expanded="false"> |
| 53 | + <label class="nhsuk-label nhsuk-radios__label" for="download-option-1"> |
| 54 | + Download a blank template for bulk adding competencies to your framework |
| 55 | + </label> |
| 56 | + </div> |
| 57 | + <div class="nhsuk-radios__conditional nhsuk-radios__conditional--hidden" id="conditional-download-1"> |
| 58 | + <div class="nhsuk-hint nhsuk-radios__hint" id="download-option-1-hint"> |
| 59 | + This Excel file will be empty.<br /> |
| 60 | + New competencies can be added by including their details on a blank row. |
| 61 | + </div> |
| 62 | + <a class="nhsuk-button nhsuk-button--secondary" role="button" asp-route-DownloadOption="1" asp-controller="FrameworksController" asp-action="DownloadCompetencies" target="_blank"> |
| 63 | + Download template |
| 64 | + </a> |
| 65 | + </div> |
| 66 | + <div class="nhsuk-radios__item"> |
| 67 | + <input class="nhsuk-radios__input" id="download-option-2" type="radio" name="download-option" value="2" aria-describedby="download-option-2-hint" aria-controls="conditional-download-2" aria-expanded="false"> |
| 68 | + <label class="nhsuk-label nhsuk-radios__label" for="download-option-2"> |
| 69 | + Download existing competencies in your framework for bulk modification and addition. |
| 70 | + </label> |
| 71 | + </div> |
| 72 | + <div class="nhsuk-radios__conditional nhsuk-radios__conditional--hidden" id="conditional-download-2"> |
| 73 | + <div class="nhsuk-hint nhsuk-radios__hint" id="download-option-2-hint"> |
| 74 | + This Excel file will include all existing competencies whose details you can update.<br /> |
| 75 | + New competencies can be added by including their details on a blank row. |
| 76 | + </div> |
| 77 | + <a class="nhsuk-button nhsuk-button--secondary" role="button" asp-route-DownloadOption="2" asp-controller="FrameworksController" asp-action="DownloadCompetencies" target="_blank"> |
| 78 | + Download competencies |
| 79 | + </a> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </fieldset> |
| 83 | + |
| 84 | + </div> |
| 85 | + </form> |
| 86 | + <h2>Upload file</h2> |
| 87 | + <p class="nhsuk-body-m"> |
| 88 | + Once you have an Excel competencies workbook, add or update competencies to the worksheet, save and start the upload process. |
| 89 | + </p> |
| 90 | + <form class="nhsuk-u-margin-bottom-3" method="post" enctype="multipart/form-data"> |
| 91 | + <input type="hidden" asp-for="@Model.FrameworkId" /> |
| 92 | + <vc:file-input asp-for="@nameof(Model.ImportFile)" label="Excel file ready for import" hint-text="" css-class="nhsuk-u-width-one-half" /> |
| 93 | + <button class="nhsuk-button" type="submit">Start upload</button> |
| 94 | + </form> |
| 95 | + <vc:cancel-link asp-controller="Frameworks" asp-action="ViewFramework" asp-all-route-data="@cancelLinkData" link-text="Cancel" /> |
| 96 | + </div> |
60 | 97 | </div> |
0 commit comments