Skip to content

Commit cbc39fe

Browse files
Merge pull request #1769 from TechnologyEnhancedLearning/Develop/Fixes/TD-7108-My-courses-and-elearning-Tray
Develop/fixes/td 7108 my courses and elearning tray
2 parents dc358b4 + bccb37c commit cbc39fe

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

LearningHub.Nhs.WebUI/Views/Home/_MyCoursesAndElearning.cshtml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<partial name="_LearningActivityCard" model="activityViewModel" />
9494
</li>
9595
}
96-
@if (isLastPage && pagingViewModel.TotalCount >=8)
96+
@if (isLastPage && pagingViewModel.TotalCount >= 8)
9797
{
9898
<li class="nhsuk-grid-column-one-third-small-desktop nhsuk-card-group__item">
9999
<div class="nhsuk-card dashboard-card">
@@ -190,16 +190,17 @@
190190
else
191191
{
192192
<div class="nhsuk-bg-white nhsuk-u-padding-5">
193-
@if (Model.MyLearnings.Type == "my-in-progress" && Model.MyLearnings.TotalCount <= 0)
194-
{
195-
<h3 class="nhsuk-card__heading nhsuk-heading-m">You have not accessed any learning yet.</h3>
196-
<p class="nhsuk-card__description dashboard-card-body">Accessed resources and courses will be displayed here. Browse from the list of resources below or search for a specific term using the search bar at the top of the screen.</p>
197-
}
198-
else if (Model.MyLearnings.Type == "my-certificates" && Model.MyLearnings.TotalCount <= 0)
193+
@if (Model.MyLearnings.Type == "my-certificates" && Model.MyLearnings.TotalCount <= 0)
199194
{
200195
<h3 nhsuk-card__heading nhsuk-heading-m>You have no certificates.</h3>
201196
<p class="nhsuk-card__description dashboard-card-body">Certificates when available will be displayed here.</p>
202197
}
198+
else if (Model.DashboardTrayLearningResourceType == "elearning" && Model.MyLearnings.TotalCount <= 0)
199+
{
200+
<h3 class="nhsuk-card__heading nhsuk-heading-m">You have not accessed any learning yet.</h3>
201+
<p class="nhsuk-card__description dashboard-card-body">Accessed resources and courses will be displayed here. Browse from the list of resources below or search for a specific term using the search bar at the top of the screen.</p>
202+
}
203+
203204
</div>
204205
}
205206
</div>

LearningHub.Nhs.WebUI/Views/Home/_ResourceTray.cshtml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,26 @@
6969

7070
<div class="nhsuk-grid-row">
7171
<div class="nhsuk-grid-column-full">
72-
<ul class="nhsuk-grid-row nhsuk-card-group nhsuk-card-group--centred nhsuk-u-margin-bottom-2">
73-
@if (@Model.Resources.Resources != null)
74-
{
72+
@if (@Model.Resources.Resources.Count() > 0)
73+
{
74+
<ul class="nhsuk-grid-row nhsuk-card-group nhsuk-card-group--centred nhsuk-u-margin-bottom-2">
7575
@foreach (var resource in Model.Resources.Resources)
7676
{
7777
var resourceViewModel = new Tuple<string, DashboardResourceViewModel>("resources", resource);
7878
<li class="nhsuk-grid-column-one-third-small-desktop nhsuk-card-group__item">
7979
<partial name="_ResourceCard" model="resourceViewModel" />
8080
</li>
8181
}
82+
</ul>
83+
}
84+
else
85+
{
86+
if (Model.Resources.Type == "my-recent-completed")
87+
{
88+
<h3 nhsuk-card__heading nhsuk-heading-m>You have not recently completed any learning.</h3>
89+
<p class="nhsuk-card__description dashboard-card-body">When available your completed learning will be displayed here.</p>
8290
}
83-
</ul>
91+
}
8492
</div>
8593
</div>
8694
<div class="nhsuk-grid-row">

0 commit comments

Comments
 (0)