src/main/webapp/WEB-INF/jsp/issues-feed.jsp

changeset 311
bf67e0ff7131
parent 242
b7f3e972b13c
child 315
4fe3f61744cf
--- a/src/main/webapp/WEB-INF/jsp/issues-feed.jsp	Mon Aug 05 17:41:56 2024 +0200
+++ b/src/main/webapp/WEB-INF/jsp/issues-feed.jsp	Mon Aug 05 18:40:47 2024 +0200
@@ -27,11 +27,17 @@
 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueFeed" scope="request"/>
 <channel>
-    <title>
-        <c:out value="${viewmodel.project.name}"/>
-        |<fmt:message key="feed.issues.title"/></title>
+    <c:if test="${not empty viewmodel.project}">
+    <title><c:out value="${viewmodel.project.name}"/>|<fmt:message key="feed.issues.title"/></title>
+    <link>${baseHref}projects/${viewmodel.project.node}</link>
+    <c:set var="issueHref" value="${baseHref}projects/${viewmodel.project.node}/issues/-/-/"/>
+    </c:if>
+    <c:if test="${empty viewmodel.project}">
+    <title><fmt:message key="feed.issues.title"/></title>
+    <link>${baseHref}issues/</link>
+    <c:set var="issueHref" value="${baseHref}issues/"/>
+    </c:if>
     <description><fmt:message key="feed.issues.description"/></description>
-    <link>${baseHref}projects/${viewmodel.project.node}</link>
     <language>${pageContext.response.locale.language}</language>
     <pubDate><fmt:formatDate value="${viewmodel.lastModified}" pattern="EEE, dd MMM yyyy HH:mm:ss zzz"/></pubDate>
     <lastBuildDate><fmt:formatDate value="${viewmodel.lastModified}"
@@ -42,10 +48,13 @@
             <c:choose>
                 <c:when test="${not empty entry.issue}">
                     <c:set var="issue" value="${entry.issue}"/>
-                    <c:set var="link" value="${baseHref}projects/${viewmodel.project.node}/issues/-/-/${issue.id}"/>
+                    <c:set var="link" value="${issueHref}${issue.id}"/>
                     <title>[<fmt:message key="feed.issues.type.${entry.type}"/>] #${issue.id} - <c:out value="${issue.currentSubject}"/></title>
                     <description><![CDATA[
                         <h1>#${issue.id} - ${issue.subject}</h1>
+                        <c:if test="${empty viewmodel.project}">
+                        <div><b><fmt:message key="project"/></b>: ${issue.project}</div>
+                        </c:if>
                         <div><b><fmt:message key="component"/></b>: ${issue.component}</div>
                         <div><b><fmt:message key="issue.category"/></b>: ${issue.category}</div>
                         <div><b><fmt:message key="issue.status"/></b>: ${issue.status}</div>
@@ -60,7 +69,7 @@
                 </c:when>
                 <c:when test="${not empty entry.comment}">
                     <c:set var="comment" value="${entry.comment}"/>
-                    <c:set var="link" value="${baseHref}projects/${viewmodel.project.node}/issues/-/-/${comment.issueid}"/>
+                    <c:set var="link" value="${issueHref}${comment.issueid}"/>
                     <title>[<fmt:message key="feed.issues.type.${entry.type}"/>] #${comment.issueid} - <c:out value="${comment.currentSubject}"/></title>
                     <description><![CDATA[
                         <div style="white-space: pre-wrap;">${comment.comment}</div>

mercurial