Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using DigitalLearningSolutions.Web.ViewModels.Common.ViewComponents;
using Microsoft.AspNetCore.Mvc;

namespace DigitalLearningSolutions.Web.ViewComponents
{
public class DlsFooterBannerTextViewComponent : ViewComponent
{
public IViewComponentResult Invoke(string centreName)
{
var model = new DlsFooterBannerTextViewModel(centreName);
return View(model);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace DigitalLearningSolutions.Web.ViewModels.Common.ViewComponents
{
public class DlsFooterBannerTextViewModel
{
public readonly string? CentreName;

public DlsFooterBannerTextViewModel(string centreName)
{
CentreName = centreName;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ViewData["CustomisationId"] = Model.Id;
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningMenu/{Model.Id}/Password";
ViewData["HeaderPathName"] = Model.Title;
ViewData["BannerText"] = Model.BannerText;
}
@section NavMenuItems {
<partial name="Shared/_NavMenuItems" />
Expand All @@ -36,7 +37,6 @@
<div class="nhsuk-grid-column-full">
<h1 id="page-heading" class="nhsuk-heading-xl">@Model.Title</h1>
<p class="nhsuk-u-font-size-24">@Model.Description</p>
<p class="nhsuk-u-secondary-text-color nhsuk-heading-s">@Model.BannerText</p>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ViewData["CustomisationId"] = Model.Id;
ViewData["HeaderPath"] = $"{Configuration["AppRootPath"]}/LearningMenu/{Model.Id}";
ViewData["HeaderPathName"] = Model.Title;
ViewData["BannerText"] = Model.BannerText;
}
@section NavMenuItems {
<partial name="Shared/_NavMenuItems" />
Expand Down Expand Up @@ -42,7 +43,6 @@
}

<p class="nhsuk-u-margin-bottom-0 nhsuk-heading-m">@Model.CentreName</p>
<p class="nhsuk-u-secondary-text-color nhsuk-heading-s">@Model.BannerText</p>
</div>
</div>

Expand Down
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>
}
}
Loading
Loading