|
8 | 8 | <link rel="stylesheet" href="@Url.Content("~/css/learningPortal/current.css")" asp-append-version="true"> |
9 | 9 |
|
10 | 10 | @{ |
11 | | - ViewData["Application"] = "Learning Portal"; |
12 | | - ViewData["Title"] = "My Current Activities"; |
13 | | - ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Current"; |
14 | | - ViewData["HeaderPathName"] = "Learning Portal"; |
| 11 | + ViewData["Application"] = "Learning Portal"; |
| 12 | + ViewData["Title"] = "My Current Activities"; |
| 13 | + ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Current"; |
| 14 | + ViewData["HeaderPathName"] = "Learning Portal"; |
15 | 15 | ViewData["BannerText"] = Model.BannerText; |
16 | 16 | } |
17 | 17 |
|
18 | 18 | @section NavMenuItems { |
19 | | - <partial name="Shared/_NavMenuItems" /> |
| 19 | + <partial name="Shared/_NavMenuItems" /> |
20 | 20 | } |
21 | 21 |
|
22 | | - @if (Model.JavascriptSearchSortFilterPaginateEnabled) |
| 22 | +@if (Model.JavascriptSearchSortFilterPaginateEnabled) |
23 | 23 | { |
24 | | - <vc:loading-spinner page-has-side-nav-menu="false" /> |
| 24 | + <vc:loading-spinner page-has-side-nav-menu="false" /> |
25 | 25 | } |
26 | 26 | <div class="nhsuk-grid-row" id="@(Model.JavascriptSearchSortFilterPaginateEnabled ? "js-styling-hidden-area-while-loading" : "no-js-styling")"> |
27 | | - <div class="nhsuk-grid-column-full"> |
28 | | - <h1 id="page-heading">My Current Activities</h1> |
29 | | - |
30 | | - @if (!Model.ApiIsAccessible) |
31 | | - { |
32 | | - <vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4" |
33 | | - text="@LearningHubWarningTextHelper.ResourceDetailsMayBeOutOfDate" /> |
34 | | - } |
| 27 | + <div class="nhsuk-grid-column-full"> |
| 28 | + <h1 id="page-heading">My Current Activities</h1> |
35 | 29 |
|
36 | | - <partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" /> |
| 30 | + @if (!Model.ApiIsAccessible) |
| 31 | + { |
| 32 | + <vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4" |
| 33 | + text="@LearningHubWarningTextHelper.ResourceDetailsMayBeOutOfDate" /> |
| 34 | + } |
37 | 35 |
|
38 | | - @if (Model.NoDataFound) |
39 | | - { |
40 | | - <p class="nhsuk-u-margin-top-4" role="alert"> |
41 | | - <b>You are not enrolled on anything.</b> View <a asp-action="Available">Available activities</a>. |
42 | | - </p> |
43 | | - } |
44 | | - else |
45 | | - { |
46 | | - <hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" /> |
47 | | - <partial name="SearchablePage/_SearchResultsCount" model="Model" /> |
48 | | - <partial name="SearchablePage/_TopPagination" model="Model" /> |
49 | | - <partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" /> |
| 36 | + <partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" /> |
50 | 37 |
|
51 | | - <div id="searchable-elements"> |
52 | | - @foreach (var currentLearningItem in Model.CurrentActivities) |
| 38 | + @if (Model.NoDataFound) |
53 | 39 | { |
54 | | - if (currentLearningItem is SelfAssessmentCardViewModel) |
55 | | - { |
56 | | - <partial name="SelfAssessments/_SelfAssessmentCard" model="currentLearningItem" /> |
57 | | - } |
58 | | - else if (currentLearningItem is CurrentLearningResourceViewModel) |
59 | | - { |
60 | | - <partial name="Current/_CurrentLearningResourceCard" model="currentLearningItem" /> |
61 | | - } |
62 | | - else |
63 | | - { |
64 | | - <partial name="Current/CurrentCourseCard/_CurrentCourseCard" model="currentLearningItem" /> |
65 | | - } |
| 40 | + <p class="nhsuk-u-margin-top-4" role="alert"> |
| 41 | + <b>You are not enrolled on anything.</b> View <a asp-action="Available">Available activities</a>. |
| 42 | + </p> |
| 43 | + } |
| 44 | + else |
| 45 | + { |
| 46 | + <hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" /> |
| 47 | + <partial name="SearchablePage/_SearchResultsCount" model="Model" /> |
| 48 | + <partial name="SearchablePage/_TopPagination" model="Model" /> |
| 49 | + <partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" /> |
| 50 | + |
| 51 | + <div id="searchable-elements"> |
| 52 | + @foreach (var currentLearningItem in Model.CurrentActivities) |
| 53 | + { |
| 54 | + if (currentLearningItem is SelfAssessmentCardViewModel) |
| 55 | + { |
| 56 | + <partial name="SelfAssessments/_SelfAssessmentCard" model="currentLearningItem" /> |
| 57 | + } |
| 58 | + else if (currentLearningItem is CurrentLearningResourceViewModel) |
| 59 | + { |
| 60 | + <partial name="Current/_CurrentLearningResourceCard" model="currentLearningItem" /> |
| 61 | + } |
| 62 | + else |
| 63 | + { |
| 64 | + <partial name="Current/CurrentCourseCard/_CurrentCourseCard" model="currentLearningItem" /> |
| 65 | + } |
| 66 | + } |
| 67 | + </div> |
66 | 68 | } |
67 | | - </div> |
68 | | - } |
69 | 69 |
|
70 | | - <partial name="SearchablePage/_BottomPagination" model="Model" /> |
71 | | - </div> |
| 70 | + <partial name="SearchablePage/_BottomPagination" model="Model" /> |
| 71 | + </div> |
72 | 72 | </div> |
73 | 73 |
|
74 | 74 | @if (Model.JavascriptSearchSortFilterPaginateEnabled) |
75 | 75 | { |
76 | | - @section scripts { |
77 | | - <script src="@Url.Content("~/js/learningPortal/current.js")" asp-append-version="true"></script> |
78 | | -} |
| 76 | + @section scripts { |
| 77 | + <script src="@Url.Content("~/js/learningPortal/current.js")" asp-append-version="true"></script> |
| 78 | + } |
79 | 79 | } |
0 commit comments