|
4 | 4 | xmlns:sec="http://www.thymeleaf.org/extras/spring-security" |
5 | 5 | xmlns:sd="http://www.thymeleaf.org/spring-data"> |
6 | 6 |
|
7 | | - <section th:fragment="navigation-projects(rootProjects,thisProject)"> |
8 | | - <div class="border-top shadow-lg" id="projectNavigationWell" sec:authorize="isAuthenticated()"> |
9 | | - <div class="row col" id="tw-project-submenu-col"> |
10 | | - <nav> |
11 | | - <ul id="rootProject" style="list-style: none;"> |
12 | | - <li> |
13 | | - <span id="tw-project-submenu-root"> |
14 | | - <a th:href="@{/project/root}" id="project_0" |
15 | | - ondrop="drop2project(event)" ondragover="allowDrop2Project(event)" |
16 | | - class="m-2 btn btn-outline-dark btn-sm"> |
17 | | - <i class="fas fa-folder-open"></i> |
18 | | - <span th:text="#{right.nav.projects}">Projects</span> |
19 | | - </a> |
20 | | - </span> |
21 | | - <span th:if="${rootProjects != null and rootProjects.size() gt 0}"> |
22 | | - <ul th:include="this :: tw-project-submenu(projectList=${rootProjects},thisProject=${thisProject})" style="list-style: none;"></ul> |
23 | | - </span> |
24 | | - </li> |
25 | | - </ul> |
26 | | - </nav> |
27 | | - </div> |
28 | | - </div> |
29 | | - </section> |
30 | | - |
31 | | - <ul th:fragment="tw-project-submenu(projectList, thisProject)" style="list-style: none;"> |
32 | | - <li th:each="project : ${projectList}"> |
33 | | - <span th:if="${project == thisProject}" class="btn btn-dark btn-sm"> |
34 | | - <i class="fa-solid fa-diagram-project"></i> |
35 | | - <strong th:id="'project_' + ${project.id}" |
36 | | - th:text="${project.name}" |
37 | | - ondrop="drop2project(event)" ondragover="allowDrop2Project(event)" |
38 | | - draggable="true" ondragstart="dragProject(event)"> |
39 | | - </strong> |
40 | | - </span> |
41 | | - <span th:if="${project != thisProject}"> |
42 | | - <a th:id="'project_' + ${project.id}" |
43 | | - th:href="@{/project/{id}(id=${project.id})}" |
| 7 | +<section th:fragment="navigation-projects(rootProjects,thisProject)"> |
| 8 | + <div class="border-top shadow-lg" id="projectNavigationWell" sec:authorize="isAuthenticated()"> |
| 9 | + <div class="row col" id="tw-project-submenu-col"> |
| 10 | + <nav> |
| 11 | + <ul id="rootProject" style="list-style: none;"> |
| 12 | + <li> |
| 13 | + <span id="tw-project-submenu-root"> |
| 14 | + <a th:href="@{/project/root}" id="project_0" |
44 | 15 | ondrop="drop2project(event)" ondragover="allowDrop2Project(event)" |
45 | | - draggable="true" ondragstart="dragProject(event)" class="m-2 btn btn-outline-dark btn-sm"> |
46 | | - <i class="fa-solid fa-diagram-project"></i> |
47 | | - <span th:text="${project.name}"></span> |
| 16 | + class="m-2 btn btn-outline-dark btn-sm"> |
| 17 | + <i class="fas fa-folder-open"></i> |
| 18 | + <span th:text="#{right.nav.projects}">Projects</span> |
48 | 19 | </a> |
49 | 20 | </span> |
50 | | - <span th:if="${project.children.size() gt 0}"> |
51 | | - <ul th:include="this :: tw-project-submenu(projectList=${project.children},thisProject=${thisProject})" style="list-style: none;"></ul> |
| 21 | + <span th:if="${rootProjects != null and rootProjects.size() gt 0}"> |
| 22 | + <ul |
| 23 | + th:include="this :: tw-project-submenu(projectList=${rootProjects},thisProject=${thisProject})" |
| 24 | + style="list-style: none;"> |
| 25 | + </ul> |
52 | 26 | </span> |
53 | | - </li> |
54 | | - </ul> |
| 27 | + </li> |
| 28 | + </ul> |
| 29 | + </nav> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | +</section> |
| 33 | + |
| 34 | +<ul th:fragment="tw-project-submenu(projectList, thisProject)" style="list-style: none;"> |
| 35 | + <li th:each="project : ${projectList}"> |
| 36 | + <span th:if="${project == thisProject}" class="btn btn-dark btn-sm"> |
| 37 | + <i class="fa-solid fa-diagram-project"></i> |
| 38 | + <strong th:id="'project_' + ${project.id}" |
| 39 | + th:text="${project.name}" |
| 40 | + ondrop="drop2project(event)" ondragover="allowDrop2Project(event)" |
| 41 | + draggable="true" ondragstart="dragProject(event)"> |
| 42 | + </strong> |
| 43 | + </span> |
| 44 | + <span th:if="${project != thisProject}"> |
| 45 | + <a th:id="'project_' + ${project.id}" |
| 46 | + th:href="@{/project/{id}(id=${project.id})}" |
| 47 | + ondrop="drop2project(event)" ondragover="allowDrop2Project(event)" |
| 48 | + draggable="true" ondragstart="dragProject(event)" class="m-2 btn btn-outline-dark btn-sm"> |
| 49 | + <i class="fa-solid fa-diagram-project"></i> |
| 50 | + <span th:text="${project.name}"></span> |
| 51 | + </a> |
| 52 | + </span> |
| 53 | + <span th:if="${project.children.size() gt 0}"> |
| 54 | + <ul th:include="this :: tw-project-submenu(projectList=${project.children},thisProject=${thisProject})" |
| 55 | + style="list-style: none;"> |
| 56 | + </ul> |
| 57 | + </span> |
| 58 | + </li> |
| 59 | +</ul> |
55 | 60 |
|
56 | 61 | </html> |
0 commit comments