src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp

changeset 52
67a02e79b7a1
parent 51
dd0a45ae25d7
child 59
c759c60507a2
--- a/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp	Sat May 16 13:29:44 2020 +0200
+++ b/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp	Sat May 16 15:11:07 2020 +0200
@@ -26,10 +26,12 @@
 --%>
 <%@page pageEncoding="UTF-8" %>
 <%@page import="de.uapcore.lightpit.Constants" %>
+<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 
 <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/>
+<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/>
 
 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request"/>
 
@@ -44,7 +46,7 @@
 </div>
 
 <c:if test="${not empty projects}">
-<table class="datatable medskip">
+<table id="project-list" class="datatable medskip">
     <colgroup>
         <col>
         <col style="width: 10%">
@@ -63,9 +65,9 @@
     </thead>
     <tbody>
     <c:forEach var="project" items="${projects}">
-        <tr>
+        <tr class="nowrap" <c:if test="${project eq selectedProject}">data-selected</c:if> >
             <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/edit?id=${project.id}">&#x270e;</a></td>
-            <td><c:out value="${project.name}"/></td>
+            <td><a href="./${moduleInfo.modulePath}?select=${project.id}"><c:out value="${project.name}"/></a></td>
             <td><c:out value="${project.description}"/></td>
             <td>
                 <c:if test="${not empty project.repoUrl}">

mercurial