Skip to content

Commit 870332f

Browse files
authored
Merge pull request #3208 from TechnologyEnhancedLearning/Develop/Fixes/TD-5263-FixVisibilityOfPrintButton
TD-5263 fix visibility of print button
2 parents 02c9d1e + 11342a4 commit 870332f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

DigitalLearningSolutions.Web/Views/Frameworks/Developer/_Structure.cshtml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
@model FrameworkViewModel;
33

44

5-
@if (Model.DetailFramework.UserRole > 1)
6-
{
7-
<div class="nhsuk-grid-row nhsuk-u-margin-top-3">
8-
<div class="nhsuk-grid-column-full">
5+
6+
<div class="nhsuk-grid-row nhsuk-u-margin-top-3">
7+
<div class="nhsuk-grid-column-full">
8+
@if (Model.DetailFramework.UserRole > 1)
9+
{
910
<a class="nhsuk-button" asp-action="AddEditFrameworkCompetencyGroup" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add @Model.VocabSingular().ToLower() group</a>
1011
<a class="nhsuk-button nhsuk-button--secondary" asp-action="AddEditFrameworkCompetency" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add ungrouped @Model.VocabSingular().ToLower()</a>
1112
<a class="nhsuk-button nhsuk-button--secondary" asp-action="ImportCompetencies" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])" asp-route-isNotBlank="@(Model.FrameworkCompetencies.Any()|Model.FrameworkCompetencyGroups.Any())" asp-route-tabname="@(ViewContext.RouteData.Values["tabname"])">Bulk upload/update @Model.VocabPlural().ToLower()</a>
12-
@if ((Model.FrameworkCompetencies?.Any() ?? false) || (Model.FrameworkCompetencyGroups?.Any(group => group.FrameworkCompetencies.Any()) ?? false) )
13-
{
14-
<a class="nhsuk-button nhsuk-button--secondary" asp-action="PrintLayout" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">View for print</a>
15-
}
16-
</div>
13+
}
14+
@if ((Model.FrameworkCompetencies?.Any() ?? false) || (Model.FrameworkCompetencyGroups?.Any(group => group.FrameworkCompetencies.Any()) ?? false))
15+
{
16+
<a class="nhsuk-button nhsuk-button--secondary" asp-action="PrintLayout" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">View for print</a>
17+
}
1718
</div>
18-
}
19+
</div>
20+
1921
<h2>Framework structure</h2>
2022
@if (Model.FrameworkCompetencyGroups.Any())
2123
{

0 commit comments

Comments
 (0)