Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,55 @@
<link rel="stylesheet" href="@Url.Content("~/css/learningPortal/courses.css")" asp-append-version="true">

@{
ViewData["Application"] = "Learning Portal";
ViewData["Title"] = "Available Activities";
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Available";
ViewData["HeaderPathName"] = "Learning Portal";
ViewData["Application"] = "Learning Portal";
ViewData["Title"] = "Available Activities";
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Available";
ViewData["HeaderPathName"] = "Learning Portal";
ViewData["BannerText"] = Model.BannerText;
}

@section NavMenuItems {
<partial name="Shared/_NavMenuItems" />
<partial name="Shared/_NavMenuItems" />
}

@if (Model.JavascriptSearchSortFilterPaginateEnabled)
@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
<vc:loading-spinner page-has-side-nav-menu="false" />
<vc:loading-spinner page-has-side-nav-menu="false" />
}
<div class="nhsuk-grid-row" id="@(Model.JavascriptSearchSortFilterPaginateEnabled ? "js-styling-hidden-area-while-loading" : "no-js-styling")">

<div class="nhsuk-grid-column-full">
<h1 id="page-heading">Available Activities</h1>
@if (Model.BannerText != null)
{
<h2 class="page-subheading">@Model.BannerText</h2>
}
<div class="nhsuk-grid-column-full">
<h1 id="page-heading">Available Activities</h1>

<partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" />
<partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" />

<hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" />
@if (Model.NoDataFound)
{
<p class="nhsuk-u-margin-top-4" role="alert">
<b>No data to display</b>
</p>
}
else
{
<partial name="SearchablePage/_SearchResultsCount" model="Model" />
<partial name="SearchablePage/_TopPagination" model="Model" />
<partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" />

<div id="searchable-elements">
@foreach (var availableCourse in Model.AvailableCourses)
<hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" />
@if (Model.NoDataFound)
{
<partial name="Available/_AvailableCourseCard" model="availableCourse" />
<p class="nhsuk-u-margin-top-4" role="alert">
<b>No data to display</b>
</p>
}
</div>
}
<partial name="SearchablePage/_BottomPagination" model="Model" />
</div>
else
{
<partial name="SearchablePage/_SearchResultsCount" model="Model" />
<partial name="SearchablePage/_TopPagination" model="Model" />
<partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" />

<div id="searchable-elements">
@foreach (var availableCourse in Model.AvailableCourses)
{
<partial name="Available/_AvailableCourseCard" model="availableCourse" />
}
</div>
}
<partial name="SearchablePage/_BottomPagination" model="Model" />
</div>
</div>

@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
@section scripts {
<script src="@Url.Content("~/js/learningPortal/available.js")" asp-append-version="true"></script>
}
@section scripts {
<script src="@Url.Content("~/js/learningPortal/available.js")" asp-append-version="true"></script>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,64 @@
<link rel="stylesheet" href="@Url.Content("~/css/learningPortal/completed.css")" asp-append-version="true">

@{
ViewData["Application"] = "Learning Portal";
ViewData["Title"] = "My Completed Activities";
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Completed";
ViewData["HeaderPathName"] = "Learning Portal";
ViewData["Application"] = "Learning Portal";
ViewData["Title"] = "My Completed Activities";
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Completed";
ViewData["HeaderPathName"] = "Learning Portal";
ViewData["BannerText"] = Model.BannerText;
}

@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
<vc:loading-spinner page-has-side-nav-menu="false" />
<vc:loading-spinner page-has-side-nav-menu="false" />
}
<div class="nhsuk-grid-row" id="@(Model.JavascriptSearchSortFilterPaginateEnabled ? "js-styling-hidden-area-while-loading" : "no-js-styling")">
<div class="nhsuk-grid-column-full">
<h1 id="page-heading">My Completed Activities</h1>
@if (Model.BannerText != null)
{
<h2 class="page-subheading">@Model.BannerText</h2>
}

@if (!Model.ApiIsAccessible)
{
<vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4"
text="@LearningHubWarningTextHelper.ResourceDetailsMayBeOutOfDate" />
}
<div class="nhsuk-grid-column-full">
<h1 id="page-heading">My Completed Activities</h1>

<partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" />
@if (!Model.ApiIsAccessible)
{
<vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4"
text="@LearningHubWarningTextHelper.ResourceDetailsMayBeOutOfDate" />
}

<hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" />
@if (Model.NoDataFound)
{
<p class="nhsuk-u-margin-top-4" role="alert">
<b>No data to display</b>
</p>
}
else
{
<partial name="SearchablePage/_SearchResultsCount" model="Model" />
<partial name="SearchablePage/_TopPagination" model="Model" />
<partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" />
<partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" />

<div id="searchable-elements">
@foreach (var completedLearningItem in Model.CompletedActivities)
<hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" />
@if (Model.NoDataFound)
{
if (completedLearningItem is CompletedCourseViewModel)
{
<partial name="Completed/CompletedCourseCard/_CompletedCourseCard" model="completedLearningItem" />
}
else
{
<partial name="Completed/CompletedActionPlanResourceCard/_CompletedActionPlanResourceCard" model="completedLearningItem" />
}
<p class="nhsuk-u-margin-top-4" role="alert">
<b>No data to display</b>
</p>
}
else
{
<partial name="SearchablePage/_SearchResultsCount" model="Model" />
<partial name="SearchablePage/_TopPagination" model="Model" />
<partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" />

<div id="searchable-elements">
@foreach (var completedLearningItem in Model.CompletedActivities)
{
if (completedLearningItem is CompletedCourseViewModel)
{
<partial name="Completed/CompletedCourseCard/_CompletedCourseCard" model="completedLearningItem" />
}
else
{
<partial name="Completed/CompletedActionPlanResourceCard/_CompletedActionPlanResourceCard" model="completedLearningItem" />
}
}
</div>
}
</div>
}

<partial name="SearchablePage/_BottomPagination" model="Model" />
</div>
<partial name="SearchablePage/_BottomPagination" model="Model" />
</div>
</div>

@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
@section scripts {
<script src="@Url.Content("~/js/learningPortal/completed.js")" asp-append-version="true"></script>
}
@section scripts {
<script src="@Url.Content("~/js/learningPortal/completed.js")" asp-append-version="true"></script>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,72 @@
<link rel="stylesheet" href="@Url.Content("~/css/learningPortal/current.css")" asp-append-version="true">

@{
ViewData["Application"] = "Learning Portal";
ViewData["Title"] = "My Current Activities";
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Current";
ViewData["HeaderPathName"] = "Learning Portal";
ViewData["Application"] = "Learning Portal";
ViewData["Title"] = "My Current Activities";
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningPortal/Current";
ViewData["HeaderPathName"] = "Learning Portal";
ViewData["BannerText"] = Model.BannerText;
}

@section NavMenuItems {
<partial name="Shared/_NavMenuItems" />
<partial name="Shared/_NavMenuItems" />
}

@if (Model.JavascriptSearchSortFilterPaginateEnabled)
@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
<vc:loading-spinner page-has-side-nav-menu="false" />
<vc:loading-spinner page-has-side-nav-menu="false" />
}
<div class="nhsuk-grid-row" id="@(Model.JavascriptSearchSortFilterPaginateEnabled ? "js-styling-hidden-area-while-loading" : "no-js-styling")">
<div class="nhsuk-grid-column-full">
<h1 id="page-heading">My Current Activities</h1>
@if (Model.BannerText != null)
{
<h2 class="page-subheading word-break">@Model.BannerText</h2>
}

@if (!Model.ApiIsAccessible)
{
<vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4"
text="@LearningHubWarningTextHelper.ResourceDetailsMayBeOutOfDate" />
}
<div class="nhsuk-grid-column-full">
<h1 id="page-heading">My Current Activities</h1>

<partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" />
@if (!Model.ApiIsAccessible)
{
<vc:learning-resource-warning css-class="nhsuk-u-margin-bottom-4 nhsuk-u-margin-top-4"
text="@LearningHubWarningTextHelper.ResourceDetailsMayBeOutOfDate" />
}

@if (Model.NoDataFound)
{
<p class="nhsuk-u-margin-top-4" role="alert">
<b>You are not enrolled on anything.</b> View <a asp-action="Available">Available activities</a>.
</p>
}
else
{
<hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" />
<partial name="SearchablePage/_SearchResultsCount" model="Model" />
<partial name="SearchablePage/_TopPagination" model="Model" />
<partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" />
<partial name="SearchablePage/Configurations/_FullWidthSearchSortAndFilter" model="Model" />

<div id="searchable-elements">
@foreach (var currentLearningItem in Model.CurrentActivities)
@if (Model.NoDataFound)
{
if (currentLearningItem is SelfAssessmentCardViewModel)
{
<partial name="SelfAssessments/_SelfAssessmentCard" model="currentLearningItem" />
}
else if (currentLearningItem is CurrentLearningResourceViewModel)
{
<partial name="Current/_CurrentLearningResourceCard" model="currentLearningItem" />
}
else
{
<partial name="Current/CurrentCourseCard/_CurrentCourseCard" model="currentLearningItem" />
}
<p class="nhsuk-u-margin-top-4" role="alert">
<b>You are not enrolled on anything.</b> View <a asp-action="Available">Available activities</a>.
</p>
}
else
{
<hr class="nhsuk-u-margin-top-3 nhsuk-u-margin-bottom-4" />
<partial name="SearchablePage/_SearchResultsCount" model="Model" />
<partial name="SearchablePage/_TopPagination" model="Model" />
<partial name="SearchablePage/_ResultCountAndPageAlerts" model="Model" />

<div id="searchable-elements">
@foreach (var currentLearningItem in Model.CurrentActivities)
{
if (currentLearningItem is SelfAssessmentCardViewModel)
{
<partial name="SelfAssessments/_SelfAssessmentCard" model="currentLearningItem" />
}
else if (currentLearningItem is CurrentLearningResourceViewModel)
{
<partial name="Current/_CurrentLearningResourceCard" model="currentLearningItem" />
}
else
{
<partial name="Current/CurrentCourseCard/_CurrentCourseCard" model="currentLearningItem" />
}
}
</div>
}
</div>
}

<partial name="SearchablePage/_BottomPagination" model="Model" />
</div>
<partial name="SearchablePage/_BottomPagination" model="Model" />
</div>
</div>

@if (Model.JavascriptSearchSortFilterPaginateEnabled)
{
@section scripts {
<script src="@Url.Content("~/js/learningPortal/current.js")" asp-append-version="true"></script>
}
@section scripts {
<script src="@Url.Content("~/js/learningPortal/current.js")" asp-append-version="true"></script>
}
}
18 changes: 18 additions & 0 deletions DigitalLearningSolutions.Web/Views/Shared/_DlsFooter.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
@{
var currentPath = Context.Request.Path.ToString();
}
<footer role="contentinfo">
<div class="nhsuk-footer-container">
<div class="nhsuk-width-container">
@{
if (currentPath.Contains("/LearningPortal/Current") || currentPath.Contains("/LearningPortal/Completed") || currentPath.Contains("/LearningPortal/Available"))
{
<h2 class="nhsuk-heading-xs nhsuk-u-margin-bottom-2 nhsuk-u-secondary-text-color">Need help?</h2>
<div class="nhsuk-footer nhsuk-u-font-size-16 nhsuk-u-secondary-text-color">
<ul class="nhsuk-footer__list">
<li class="nhsuk-footer__list-item">
<span>Centre contact information:</span> <span>@ViewData["BannerText"]</span>
</li>
</ul>
</div>
}
}
</div>
<div class="nhsuk-width-container">
<h2 class="nhsuk-u-visually-hidden">Support links</h2>
<div class="nhsuk-footer">
Expand Down
Loading