Skip to content

Commit 95f78c9

Browse files
authored
Merge pull request #2656 from TechnologyEnhancedLearning/Develop/feature/TD-4164-FeatureFlag-Login-with-LH-button
TD-4164-Feature flag the Login with Learning Hub button
2 parents 5e81f2f + 92c2313 commit 95f78c9

File tree

9 files changed

+49
-41
lines changed

9 files changed

+49
-41
lines changed

DigitalLearningSolutions.Web/Helpers/FeatureFlags.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ public static class FeatureFlags
1313
public const string RefactoredFindYourCentrePage = "RefactoredFindYourCentrePage";
1414
public const string UserFeedbackBar = "UserFeedbackBar";
1515
public const string ShowSelfAssessmentProgressButtons = "ShowSelfAssessmentProgressButtons";
16+
public const string LoginWithLearningHub = "LoginWithLearningHub";
1617
}
1718
}
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1+
@using DigitalLearningSolutions.Web.Helpers
12
@using DigitalLearningSolutions.Web.ViewModels.Home
23
@model LandingPageViewModel
34

45
@{
5-
ViewData["Title"] = "Welcome";
6+
ViewData["Title"] = "Welcome";
67
}
78

89
<link rel="stylesheet" href="@Url.Content("~/css/home/welcome.css")" asp-append-version="true" />
910

1011
<div class="nhsuk-grid-row">
11-
<div class="nhsuk-grid-column-full">
12-
<partial name="MiniHub/_MiniHubHeading" model="@Model.MiniHubNavigationModel" />
12+
<div class="nhsuk-grid-column-full">
13+
<partial name="MiniHub/_MiniHubHeading" model="@Model.MiniHubNavigationModel" />
1314

14-
<div class="welcome-page-button-container">
15-
@if (Model.UserIsLoggedIn)
16-
{
17-
@if (Model.UserIsLoggedInCentre)
18-
{
19-
<a class="nhsuk-button auth-button auth-button--left" role="button" asp-controller="ApplicationSelector" asp-action="Index">
20-
Switch application
21-
</a>
22-
}
23-
}
24-
else
25-
{
26-
<p class="nhsuk-body-m">If you have linked your account you can login through the Learning hub.</p>
27-
<a class="nhsuk-button auth-button--blue" role="button" asp-controller="Login" asp-action="SharedAuth">
28-
Log in with Learning hub
29-
</a>
30-
<p class="nhsuk-u-font-weight-bold">Or</p>
31-
<a class="nhsuk-button auth-button auth-button--left" role="button" asp-controller="Login" asp-action="Index">
32-
Log in
33-
</a>
34-
<a class="nhsuk-button nhsuk-button--secondary auth-button" role="button" asp-controller="Register" asp-action="Start">
35-
Register
36-
</a>
37-
}
15+
<div class="welcome-page-button-container">
16+
@if (Model.UserIsLoggedIn)
17+
{
18+
@if (Model.UserIsLoggedInCentre)
19+
{
20+
<a class="nhsuk-button auth-button auth-button--left" role="button" asp-controller="ApplicationSelector" asp-action="Index">
21+
Switch application
22+
</a>
23+
}
24+
}
25+
else
26+
{
27+
<feature name="@(FeatureFlags.LoginWithLearningHub)">
28+
<p class="nhsuk-body-m">If you have linked your account you can login through the Learning hub.</p>
29+
<a class="nhsuk-button auth-button--blue" role="button" asp-controller="Login" asp-action="SharedAuth">
30+
Log in with Learning hub
31+
</a>
32+
<p class="nhsuk-u-font-weight-bold">Or</p>
33+
</feature>
34+
<a class="nhsuk-button auth-button auth-button--left" role="button" asp-controller="Login" asp-action="Index">
35+
Log in
36+
</a>
37+
<a class="nhsuk-button nhsuk-button--secondary auth-button" role="button" asp-controller="Register" asp-action="Start">
38+
Register
39+
</a>
40+
}
41+
</div>
42+
<partial name="MiniHub/_ContentsList" model="@Model.MiniHubNavigationModel" />
43+
<p class="nhsuk-body-m">Our products and services can help you manage digital learning delivery for the benefit of the people in your organisation.</p>
44+
<partial name="MiniHub/_Pagination" model="@Model.MiniHubNavigationModel" />
3845
</div>
39-
@if (Model.UserIsLoggedIn)
40-
{
41-
<partial name="MiniHub/_ContentsList" model="@Model.MiniHubNavigationModel" />
42-
<p class="nhsuk-body-m">Our products and services can help you manage digital learning delivery for the benefit of the people in your organisation.</p>
43-
<partial name="MiniHub/_Pagination" model="@Model.MiniHubNavigationModel" />
44-
}
45-
</div>
4646
</div>

DigitalLearningSolutions.Web/appSettings.UAT.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"RefactoredFindYourCentrePage": true,
2222
"UserFeedbackBar": true,
2323
"ExportQueryRowLimit": 250,
24-
"MaxBulkUploadRows": 200
24+
"MaxBulkUploadRows": 200,
25+
"LoginWithLearningHub": false
2526
},
2627
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
2728
"FreshdeskAPIConfig": {

DigitalLearningSolutions.Web/appsettings.Development.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"RefactoredFindYourCentrePage": true,
2222
"UserFeedbackBar": true,
2323
"ExportQueryRowLimit": 250,
24-
"MaxBulkUploadRows": 200
24+
"MaxBulkUploadRows": 200,
25+
"LoginWithLearningHub": false
2526
},
2627
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
2728
"LearningHubReportAPIConfig": {

DigitalLearningSolutions.Web/appsettings.Production.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"RefactoredFindYourCentrePage": true,
2222
"UserFeedbackBar": true,
2323
"ExportQueryRowLimit": 250,
24-
"MaxBulkUploadRows": 200
24+
"MaxBulkUploadRows": 200,
25+
"LoginWithLearningHub": false
2526
},
2627
"LearningHubOpenAPIBaseUrl": "https://learninghubnhsuk-openapi-prod.azurewebsites.net",
2728
"LearningHubReportAPIConfig": {

DigitalLearningSolutions.Web/appsettings.SIT.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"PricingPage": true,
1919
"UserFeedbackBar": true,
2020
"ExportQueryRowLimit": 250,
21-
"MaxBulkUploadRows": 200
21+
"MaxBulkUploadRows": 200,
22+
"LoginWithLearningHub": false
2223
},
2324
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-dev.azurewebsites.net",
2425
"LearningHubReportAPIConfig": {

DigitalLearningSolutions.Web/appsettings.Test.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"RefactoredFindYourCentrePage": true,
2121
"UserFeedbackBar": true,
2222
"ExportQueryRowLimit": 250,
23-
"MaxBulkUploadRows": 200
23+
"MaxBulkUploadRows": 200,
24+
"LoginWithLearningHub": false
2425
},
2526
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net"
2627
}

DigitalLearningSolutions.Web/appsettings.UarTest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"RefactoredFindYourCentrePage": true,
2222
"UserFeedbackBar": true,
2323
"ExportQueryRowLimit": 250,
24-
"MaxBulkUploadRows": 200
24+
"MaxBulkUploadRows": 200,
25+
"LoginWithLearningHub": false
2526
},
2627
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net"
2728
}

DigitalLearningSolutions.Web/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"RefactoredSuperAdminInterface": false,
1717
"UseSignposting": true,
1818
"PricingPage": true,
19-
"ShowSelfAssessmentProgressButtons": false
19+
"ShowSelfAssessmentProgressButtons": false,
20+
"LoginWithLearningHub": false
2021
},
2122
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
2223
"LearningHubOpenAPIKey": "",

0 commit comments

Comments
 (0)