|
2 | 2 | @using LearningHub.Nhs.WebUI.Models.Bookmark |
3 | 3 | @model List<LearningHub.Nhs.Models.Bookmark.UserBookmarkViewModel> |
4 | 4 |
|
5 | | -@section styles{ |
| 5 | +@section styles { |
6 | 6 | <link rel="stylesheet" type="text/css" href="~/css/nhsuk/pages/bookmark.css" asp-append-version="true" /> |
7 | 7 | } |
8 | 8 |
|
|
25 | 25 | }; |
26 | 26 | } |
27 | 27 | } |
| 28 | +@section NavBreadcrumbs { |
28 | 29 |
|
29 | | -<div class="bg-white"> |
30 | | - <div class="nhsuk-width-container app-width-container nhsuk-u-padding-bottom-9"> |
31 | | - <vc:back-link asp-controller="Home" asp-action="Index" link-text="Back to: Learning Hub" /> |
32 | | - |
33 | | - <h1>@ViewData["Title"]</h1> |
34 | | - |
35 | | - <div class="nhsuk-grid-row"> |
36 | | - <div class="nhsuk-grid-column-full"> |
37 | | - <p class="nhsuk-body-l nhsuk-u-reading-width">Save and organise your learning resources as bookmarks.</p> |
38 | | - |
39 | | - <p class="nhsuk-u-reading-width">Bookmarks can be displayed individually or you can create folders to organise your learning resources.</p> |
40 | | - |
41 | | - <details class="nhsuk-details nhsuk-u-margin-bottom-6"> |
42 | | - <summary class="nhsuk-details__summary"> |
43 | | - <span class="nhsuk-details__summary-text"> |
44 | | - Learn how to manage your bookmarks |
45 | | - </span> |
46 | | - </summary> |
47 | | - <div class="nhsuk-details__text nhsuk-u-reading-width"> |
48 | | - <p>You can add as many learning resources as required to your bookmark manager, and have the option to rename, move or delete each one.</p> |
49 | | - <p>To move a bookmark into a folder, select the learning resource and select ‘Move’.</p> |
| 30 | + <section class="nhsuk-hero"> |
| 31 | + <div class="nhsuk-width-container app-width-container"> |
| 32 | + <div class="nhsuk-grid-row"> |
| 33 | + <div class="nhsuk-grid-column-full"> |
| 34 | + |
| 35 | + <div class="nhsuk-u-padding-top-3 nhsuk-u-padding-bottom-3"> |
| 36 | + <a href="/">Home</a> |
| 37 | + <i class="fa-solid fa-chevron-right nhsuk-u-padding-top-1 nhsuk-u-padding-bottom-1 nhsuk-u-padding-left-2 nhsuk-u-padding-right-2"></i> |
50 | 38 | </div> |
51 | | - </details> |
| 39 | + <div class="nhsuk-u-padding-top-4 nhsuk-u-padding-bottom-7"> |
| 40 | + <h1 class="nhsuk-heading-xl">My learning activity</h1> |
| 41 | + </div> |
| 42 | + </div> |
52 | 43 | </div> |
53 | 44 | </div> |
| 45 | + </section> |
| 46 | +} |
54 | 47 |
|
55 | | - <span id="bookmark-table"></span> |
56 | | - <a class="nhsuk-button" asp-controller="Bookmark" asp-action="BookmarkAddFolder" asp-route-returnUrl="/bookmark">Add a folder</a> |
57 | 48 |
|
58 | | - <div class="nhsuk-expander-group"> |
| 49 | +<div class="bg-white"> |
| 50 | + <div class="nhsuk-width-container app-width-container"> |
| 51 | + <div class="nhsuk-grid-row nhsuk-u-padding-top-7 nhsuk-u-padding-bottom-9"> |
59 | 52 |
|
60 | | - <table role="table" class="nhsuk-table-responsive tree-table-parent"> |
61 | | - <thead role="rowgroup" class="nhsuk-table__head"> |
62 | | - <tr role="row"> |
63 | | - <th role="columnheader" class="" scope="col">Learning resource</th> |
64 | | - <th role="columnheader" class="col-type" scope="col">Type</th> |
65 | | - <th role="columnheader" class="col-organise" scope="col">Organise your bookmarks</th> |
66 | | - </tr> |
67 | | - </thead> |
68 | | - <tbody role="rowgroup" class="nhsuk-table__body"> |
| 53 | + <!-- Left column: SideNav --> |
| 54 | + <div class="nhsuk-grid-column-one-quarter"> |
| 55 | + @await Component.InvokeAsync("SideNav", new { groupTitle = "Activity" }) |
| 56 | + </div> |
| 57 | + <div class="nhsuk-grid-column-three-quarters"> |
| 58 | + <div> |
| 59 | + <h2 class="nhsuk-heading-l">Bookmarks</h2> |
| 60 | + </div> |
69 | 61 |
|
70 | | - @{ |
71 | | - var topLevelBookmarks = Model.Where(m => m.ParentId == null).ToList(); |
| 62 | + <div> |
| 63 | + <p class="nhsuk-body-l nhsuk-u-reading-width">Save and organise your learning resources as bookmarks.</p> |
| 64 | + |
| 65 | + <details class="nhsuk-details nhsuk-u-margin-bottom-6"> |
| 66 | + <summary class="nhsuk-details__summary"> |
| 67 | + <span class="nhsuk-details__summary-text"> |
| 68 | + Learn how to manage your bookmarks |
| 69 | + </span> |
| 70 | + </summary> |
| 71 | + <div class="nhsuk-details__text nhsuk-u-reading-width"> |
| 72 | + <p>You can add as many learning resources as required to your bookmark manager, and have the option to rename, move or delete each one.</p> |
| 73 | + <p>To move a bookmark into a folder, select the learning resource and select ‘Move’.</p> |
| 74 | + </div> |
| 75 | + </details> |
| 76 | + </div> |
| 77 | + <div> |
72 | 78 |
|
73 | | - if (!topLevelBookmarks.Any()) |
74 | | - { |
75 | | - <tr role="row" class="nhsuk-table__row bookmark-item"> |
76 | | - <td role="cell" class="nhsuk-table__cell" colspan="3"> |
77 | | - Your bookmarks will appear here. |
78 | | - </td> |
| 79 | + <span id="bookmark-table"></span> |
| 80 | + <a class="nhsuk-button" asp-controller="Bookmark" asp-action="BookmarkAddFolder" asp-route-returnUrl="/bookmark">Add a folder</a> |
| 81 | + </div> |
| 82 | + |
| 83 | + <div class="nhsuk-expander-group"> |
| 84 | + |
| 85 | + <table role="table" class="nhsuk-table-responsive tree-table-parent"> |
| 86 | + <thead role="rowgroup" class="nhsuk-table__head"> |
| 87 | + <tr role="row"> |
| 88 | + <th role="columnheader" class="" scope="col">Learning resource</th> |
| 89 | + <th role="columnheader" class="col-type" scope="col">Type</th> |
| 90 | + <th role="columnheader" class="col-organise" scope="col">Organise your bookmarks</th> |
79 | 91 | </tr> |
80 | | - } |
81 | | - else |
82 | | - { |
83 | | - for (var i = 0; i < topLevelBookmarks.Count; i++) |
84 | | - { |
85 | | - var bookmark = topLevelBookmarks[i]; |
86 | | - var bookmarkAction = GetBookmarkAction(bookmark, i, topLevelBookmarks.Count); |
| 92 | + </thead> |
| 93 | + <tbody role="rowgroup" class="nhsuk-table__body"> |
87 | 94 |
|
88 | | - @if (bookmark.BookmarkTypeId == 1) // Folder. |
89 | | - { |
90 | | - var childBookmarks = Model.Where(m => m.ParentId == bookmark.Id).ToList(); |
91 | | - var bookmarkFolderViewModel = new BookmarkFolderViewModel() |
92 | | - { |
93 | | - FolderBookmark = new BookmarkItemViewModel { Bookmark = bookmark, Action = bookmarkAction }, |
94 | | - ChildBookmarkItems = childBookmarks.Select((item, j) => new BookmarkItemViewModel |
95 | | - { |
96 | | - Bookmark = item, |
97 | | - Action = GetBookmarkAction(item, j, childBookmarks.Count), |
98 | | - IsChild = true, |
99 | | - }).ToList() |
100 | | - }; |
| 95 | + @{ |
| 96 | + var topLevelBookmarks = Model.Where(m => m.ParentId == null).ToList(); |
101 | 97 |
|
102 | | - <partial name="_BookmarkFolder" model="bookmarkFolderViewModel" /> |
| 98 | + if (!topLevelBookmarks.Any()) |
| 99 | + { |
| 100 | + <tr role="row" class="nhsuk-table__row bookmark-item"> |
| 101 | + <td role="cell" class="nhsuk-table__cell" colspan="3"> |
| 102 | + Your bookmarks will appear here. |
| 103 | + </td> |
| 104 | + </tr> |
103 | 105 | } |
104 | 106 | else |
105 | 107 | { |
106 | | - <partial name="_BookmarkItem" model="new BookmarkItemViewModel{ Bookmark = bookmark, Action = bookmarkAction}" /> |
| 108 | + for (var i = 0; i < topLevelBookmarks.Count; i++) |
| 109 | + { |
| 110 | + var bookmark = topLevelBookmarks[i]; |
| 111 | + var bookmarkAction = GetBookmarkAction(bookmark, i, topLevelBookmarks.Count); |
| 112 | + |
| 113 | + @if (bookmark.BookmarkTypeId == 1) // Folder. |
| 114 | + { |
| 115 | + var childBookmarks = Model.Where(m => m.ParentId == bookmark.Id).ToList(); |
| 116 | + var bookmarkFolderViewModel = new BookmarkFolderViewModel() |
| 117 | + { |
| 118 | + FolderBookmark = new BookmarkItemViewModel { Bookmark = bookmark, Action = bookmarkAction }, |
| 119 | + ChildBookmarkItems = childBookmarks.Select((item, j) => new BookmarkItemViewModel |
| 120 | + { |
| 121 | + Bookmark = item, |
| 122 | + Action = GetBookmarkAction(item, j, childBookmarks.Count), |
| 123 | + IsChild = true, |
| 124 | + }).ToList() |
| 125 | + }; |
| 126 | + |
| 127 | + <partial name="_BookmarkFolder" model="bookmarkFolderViewModel" /> |
| 128 | + } |
| 129 | + else |
| 130 | + { |
| 131 | + <partial name="_BookmarkItem" model="new BookmarkItemViewModel{ Bookmark = bookmark, Action = bookmarkAction}" /> |
| 132 | + } |
| 133 | + } |
107 | 134 | } |
108 | 135 | } |
109 | | - } |
110 | | - } |
111 | 136 |
|
112 | | - </tbody> |
113 | | - </table> |
114 | | - </div> |
115 | | - |
116 | | - <div class="nhsuk-grid-row"> |
117 | | - <div class="nhsuk-grid-column-two-thirds"> |
118 | | - <div class="help-panel nhsuk-u-padding-5"> |
119 | | - <h3>Get help</h3> |
120 | | - <p> |
121 | | - Find further guidance and support on how to manage bookmarks at the <a href="@ViewBag.BookmarksHelpUrl" target="_blank">Learning Hub help centre</a>. |
122 | | - </p> |
| 137 | + </tbody> |
| 138 | + </table> |
123 | 139 | </div> |
| 140 | + |
| 141 | + @* <div class="nhsuk-grid-row"> |
| 142 | + <div class="nhsuk-grid-column-two-thirds"> |
| 143 | + <div class="help-panel nhsuk-u-padding-5"> |
| 144 | + <h3>Get help</h3> |
| 145 | + <p> |
| 146 | + Find further guidance and support on how to manage bookmarks at the <a href="@ViewBag.BookmarksHelpUrl" target="_blank">Learning Hub help centre</a>. |
| 147 | + </p> |
| 148 | + </div> |
| 149 | + </div> |
| 150 | + </div> *@ |
124 | 151 | </div> |
125 | 152 | </div> |
126 | 153 | </div> |
|
0 commit comments