Skip to content

Commit 0dec788

Browse files
'Switch application' navigation link should be removed from 'Give page feedback' screens for logged in user
1 parent 14b6583 commit 0dec788

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

DigitalLearningSolutions.Web/Controllers/UserFeedbackController.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ IMultiPageFormService multiPageFormService
3737
public IActionResult Index(string sourceUrl, string sourcePageTitle)
3838
{
3939
ViewData[LayoutViewDataKeys.DoNotDisplayUserFeedbackBar] = true;
40-
ViewBag.HideSwitchApplication = true;
4140
_multiPageFormService.ClearMultiPageFormData(MultiPageFormDataFeature.AddUserFeedback, TempData);
4241

4342
_userFeedbackViewModel = new()
@@ -129,7 +128,6 @@ private string DeriveUserRoles()
129128
public IActionResult StartUserFeedbackSession(UserFeedbackViewModel userFeedbackViewModel)
130129
{
131130
ViewData[LayoutViewDataKeys.DoNotDisplayUserFeedbackBar] = true;
132-
ViewBag.HideSwitchApplication = true;
133131

134132
var userFeedbackSessionData = new UserFeedbackTempData()
135133
{

DigitalLearningSolutions.Web/Views/Shared/_Layout.cshtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,16 @@
138138

139139
@if (User.IsAdminAccount())
140140
{
141-
if ((bool?)ViewBag.HideSwitchApplication == false)
141+
if ((bool?)ViewData[LayoutViewDataKeys.DoNotDisplayUserFeedbackBar] != true)
142142
{
143-
<li class="nhsuk-header__navigation-item @Html.GetSelectedCssClassIfTabSelected(NavMenuTab.SwitchApplication)">
143+
<li class="nhsuk-header__navigation-item @Html.GetSelectedCssClassIfTabSelected(NavMenuTab.SwitchApplication)">
144144
<a class="nhsuk-header__navigation-link" asp-controller="ApplicationSelector" asp-action="Index">
145145
Switch application
146146
<partial name="_NhsChevronRight" />
147147
</a>
148148
</li>
149149
}
150+
150151
}
151152
</ul>
152153
</div>

0 commit comments

Comments
 (0)