|  | 
| 28 | 28 |         <h1> | 
| 29 | 29 |             @Model.DetailFramework.FrameworkName | 
| 30 | 30 |         </h1> | 
| 31 |  | -            @if (!String.IsNullOrEmpty(Model.DetailFramework.Description)) | 
| 32 |  | -            { | 
| 33 |  | -                <div class="nhsuk-card"> | 
| 34 |  | -                    <div class="nhsuk-card__content"> | 
| 35 |  | -                        <h2 class="nhsuk-card__heading"> | 
| 36 |  | -                            Framework description | 
|  | 31 | +        @if (!String.IsNullOrEmpty(Model.DetailFramework.Description.Trim())) | 
|  | 32 | +        { | 
|  | 33 | +            <div class="nhsuk-card"> | 
|  | 34 | +                <div class="nhsuk-card__content"> | 
|  | 35 | +                    <h2 class="nhsuk-card__heading"> | 
|  | 36 | +                        Framework description | 
| 37 | 37 | 
 | 
| 38 |  | -                        </h2> | 
| 39 |  | -                        <p class="nhsuk-card__description"> | 
| 40 |  | -                            @(Html.Raw(Model.DetailFramework.Description)) | 
| 41 |  | -                        </p> | 
| 42 |  | -                    </div> | 
|  | 38 | +                    </h2> | 
|  | 39 | +                    <p class="nhsuk-card__description"> | 
|  | 40 | +                        @(Html.Raw(Model.DetailFramework.Description)) | 
|  | 41 | +                    </p> | 
| 43 | 42 |                 </div> | 
| 44 |  | -            } | 
| 45 |  | -            <h2>Framework @Model.VocabPlural().ToLower()</h2> | 
|  | 43 | +            </div> | 
|  | 44 | +        } | 
|  | 45 | +        <h2>Framework @Model.VocabPlural().ToLower()</h2> | 
| 46 | 46 | 
 | 
| 47 |  | -            @if (Model.FrameworkCompetencyGroups != null) | 
|  | 47 | +        @if (Model.FrameworkCompetencyGroups != null) | 
|  | 48 | +        { | 
|  | 49 | +            if (Model.FrameworkCompetencyGroups.Any()) | 
| 48 | 50 |             { | 
| 49 |  | -                if (Model.FrameworkCompetencyGroups.Any()) | 
|  | 51 | +                @foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups) | 
| 50 | 52 |                 { | 
| 51 |  | -                    @foreach (var frameworkCompetencyGroup in Model.FrameworkCompetencyGroups) | 
|  | 53 | +                    if (frameworkCompetencyGroup.FrameworkCompetencies.Count() > 0) | 
| 52 | 54 |                     { | 
| 53 | 55 |                         groupNum++; | 
| 54 | 56 |                         <h3>@frameworkCompetencyGroup.Name</h3> | 
|  | 
| 58 | 60 |                                 @frameworkCompetencyGroup.Description | 
| 59 | 61 |                             </p> | 
| 60 | 62 |                         } | 
| 61 |  | -                         | 
|  | 63 | + | 
| 62 | 64 |                         int compNum = 0; | 
| 63 | 65 |                         if (frameworkCompetencyGroup.FrameworkCompetencies[0] != null) | 
| 64 | 66 |                         { | 
| 65 |  | -                          <table class="nhsuk-table"> | 
| 66 |  | -                            <thead role="rowgroup" class="nhsuk-table__head"> | 
| 67 |  | -                                <tr role="row"> | 
| 68 |  | -                                    <th role="columnheader" class="" scope="col"> | 
| 69 |  | -                                        @Model.VocabSingular() | 
| 70 |  | -                                    </th> | 
| 71 |  | -                                    <th role="columnheader" class="status-tag" scope="col"> | 
| 72 |  | -                                        Date and Signature | 
| 73 |  | -                                    </th> | 
| 74 |  | -                                </tr> | 
| 75 |  | -                            </thead> | 
| 76 |  | -                            <tbody class="nhsuk-table__body"> | 
| 77 |  | -                            @foreach (var frameworkCompetency in frameworkCompetencyGroup.FrameworkCompetencies) | 
| 78 |  | -                            { | 
| 79 |  | -                                compNum++; | 
| 80 |  | -                                    <tr role="row" class="nhsuk-table__row"> | 
| 81 |  | -                                <td> | 
| 82 |  | -                                    <strong>@frameworkCompetency.Name</strong> | 
| 83 |  | - | 
| 84 |  | -                                    <partial name="_CompetencyFlags" model="Model.CompetencyFlags.Where(c => c.CompetencyId == frameworkCompetency.CompetencyID)" /> | 
| 85 |  | -                                    @if (frameworkCompetency.Description != null) | 
|  | 67 | +                            <table class="nhsuk-table"> | 
|  | 68 | +                                <thead role="rowgroup" class="nhsuk-table__head"> | 
|  | 69 | +                                    <tr role="row"> | 
|  | 70 | +                                        <th role="columnheader" class="" scope="col"> | 
|  | 71 | +                                            @Model.VocabSingular() | 
|  | 72 | +                                        </th> | 
|  | 73 | +                                        <th role="columnheader" class="status-tag" scope="col"> | 
|  | 74 | +                                            Date and Signature | 
|  | 75 | +                                        </th> | 
|  | 76 | +                                    </tr> | 
|  | 77 | +                                </thead> | 
|  | 78 | +                                <tbody class="nhsuk-table__body"> | 
|  | 79 | +                                    @foreach (var frameworkCompetency in frameworkCompetencyGroup.FrameworkCompetencies) | 
| 86 | 80 |                                     { | 
| 87 |  | -                                        <p class="nhsuk-lede-text--small"> | 
| 88 |  | -                                            @Html.Raw(frameworkCompetency.Description) | 
| 89 |  | -                                        </p> | 
| 90 |  | -                                    } | 
| 91 |  | -                                    </td> | 
| 92 |  | -                                    <td> | 
|  | 81 | +                                        compNum++; | 
|  | 82 | +                                        <tr role="row" class="nhsuk-table__row"> | 
|  | 83 | +                                            <td> | 
|  | 84 | +                                                <strong>@frameworkCompetency.Name</strong> | 
| 93 | 85 | 
 | 
| 94 |  | -                                    </td> | 
|  | 86 | +                                                <partial name="_CompetencyFlags" model="Model.CompetencyFlags.Where(c => c.CompetencyId == frameworkCompetency.CompetencyID)" /> | 
|  | 87 | +                                                @if (frameworkCompetency.Description != null) | 
|  | 88 | +                                                { | 
|  | 89 | +                                                    <p class="nhsuk-lede-text--small"> | 
|  | 90 | +                                                        @Html.Raw(frameworkCompetency.Description) | 
|  | 91 | +                                                    </p> | 
|  | 92 | +                                                } | 
|  | 93 | +                                            </td> | 
|  | 94 | +                                            <td> | 
|  | 95 | +                                            </td> | 
| 95 | 96 |                                         </tr> | 
| 96 |  | -                            } | 
|  | 97 | +                                    } | 
| 97 | 98 |                                 </tbody> | 
| 98 | 99 |                             </table> | 
| 99 | 100 |                         } | 
| 100 | 101 |                     } | 
| 101 | 102 |                 } | 
| 102 | 103 |             } | 
| 103 |  | -            @if (Model.FrameworkCompetencies != null) | 
|  | 104 | +        } | 
|  | 105 | +        @if (Model.FrameworkCompetencies != null) | 
|  | 106 | +        { | 
|  | 107 | +            if (Model.FrameworkCompetencies.Any()) | 
| 104 | 108 |             { | 
| 105 |  | -                if (Model.FrameworkCompetencies.Any()) | 
|  | 109 | +                groupNum++; | 
|  | 110 | +                int compNum = 0; | 
|  | 111 | +                <h2>Ungrouped competencies</h2> | 
|  | 112 | +                foreach (var frameworkCompetency in Model.FrameworkCompetencies) | 
| 106 | 113 |                 { | 
| 107 |  | -                    groupNum++; | 
| 108 |  | -                    int compNum = 0; | 
| 109 |  | -                    <h2>Ungrouped competencies</h2> | 
| 110 |  | -                    foreach (var frameworkCompetency in Model.FrameworkCompetencies) | 
| 111 |  | -                    { | 
| 112 |  | -                        compNum++; | 
| 113 |  | -                        <div class="nhsuk-u-margin-left-8"> | 
| 114 |  | -                            <h3>@frameworkCompetency.Name</h3> | 
| 115 |  | -                            <partial name="_CompetencyFlags" model="Model.CompetencyFlags.Where(c => c.CompetencyId == frameworkCompetency.CompetencyID)" /> | 
| 116 |  | -                            @if (frameworkCompetency.Description != null) | 
| 117 |  | -                            { | 
| 118 |  | -                                <p class="nhsuk-lede-text--small"> | 
| 119 |  | -                                    @frameworkCompetency.Description | 
| 120 |  | -                                </p> | 
| 121 |  | -                            } | 
| 122 |  | -                        </div> | 
| 123 |  | -                    } | 
|  | 114 | +                    compNum++; | 
|  | 115 | +                    <div class="nhsuk-u-margin-left-8"> | 
|  | 116 | +                        <h3>@frameworkCompetency.Name</h3> | 
|  | 117 | +                        <partial name="_CompetencyFlags" model="Model.CompetencyFlags.Where(c => c.CompetencyId == frameworkCompetency.CompetencyID)" /> | 
|  | 118 | +                        @if (frameworkCompetency.Description != null) | 
|  | 119 | +                        { | 
|  | 120 | +                            <p class="nhsuk-lede-text--small"> | 
|  | 121 | +                                @Html.Raw(frameworkCompetency.Description) | 
|  | 122 | +                            </p> | 
|  | 123 | +                        } | 
|  | 124 | +                    </div> | 
| 124 | 125 |                 } | 
| 125 | 126 |             } | 
| 126 |  | -        </div> | 
|  | 127 | +        } | 
|  | 128 | +    </div> | 
| 127 | 129 | </div> | 
0 commit comments