Skip to content

Commit 8b198f4

Browse files
committed
TD-5263 Hides View for Print button for empty frameworks
1 parent e3a8aec commit 8b198f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
<a class="nhsuk-button" asp-action="AddEditFrameworkCompetencyGroup" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add @Model.VocabSingular().ToLower() group</a>
1010
<a class="nhsuk-button nhsuk-button--secondary" asp-action="AddEditFrameworkCompetency" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">Add ungrouped @Model.VocabSingular().ToLower()</a>
1111
<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-
<a class="nhsuk-button nhsuk-button--secondary" asp-action="PrintLayout" asp-route-frameworkId="@(ViewContext.RouteData.Values["frameworkId"])">View for print</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+
}
1316
</div>
1417
</div>
1518
}

0 commit comments

Comments
 (0)