Update of
/var/cvs/contributions/CMSContainer_Modules/subsite/src/webapp/editors/subsite
In directory
james.mmbase.org:/tmp/cvs-serv31839/subsite/src/webapp/editors/subsite
Modified Files:
personalpages.jsp
Log Message:
CMSC-815 - The subsites screen will throw a NPE if no subsites are present;
also disabled creating of pages while no subsite exists.
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/subsite/src/webapp/editors/subsite
See also: http://www.mmbase.org/jira/browse/CMSC-815
Index: personalpages.jsp
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Modules/subsite/src/webapp/editors/subsite/personalpages.jsp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- personalpages.jsp 8 Sep 2008 07:39:49 -0000 1.12
+++ personalpages.jsp 15 Dec 2008 14:01:12 -0000 1.13
@@ -56,7 +56,14 @@
<div class="editor">
<div class="body">
-<p><%...@include file="personalpages_newbuttons.jsp" %> </p>
+
+<mm:listnodes type="subsite" orderby="title">
+<mm:first>
+ <c:set var="subsiteExists" value="true"/>
+ <p><%...@include file="personalpages_newbuttons.jsp" %></p>
+</mm:first>
+</mm:listnodes>
+
<html:form action="/editors/subsite/SubSiteAction" method="post">
<html:hidden property="action" value="${action}"/>
<html:hidden property="search" value="true"/>
@@ -66,9 +73,7 @@
<mm:present referid="returnurl"><input type="hidden" name="returnurl"
value="<mm:write referid="returnurl"/>"/></mm:present>
<table>
- <tr>
-
- </tr>
+ <c:if test="${subsiteExists eq true}">
<tr>
<td style="width:105px"><fmt:message key="subsite.name" />:</td>
<td>
@@ -80,14 +85,18 @@
</cmsc:select>
</td>
</tr>
-
+ </c:if>
+ <c:if test="${subsiteExists ne true}">
+ <tr>
+ <td colspan="2"><b><fmt:message key="subsite.notfound" /></b></td>
+ </tr>
+ </c:if>
<tr>
<td style="width:105px"><fmt:message key="subsitedelete.subtitle"
/></td>
<td colspan="3"><html:text property="title"
style="width:200px"/></td>
<td style="width:20px">
</td>
-
</tr>
<tr>
<td></td>
@@ -100,8 +109,6 @@
</div>
</div>
-
-
<div class="editor">
<br />
@@ -123,8 +130,8 @@
<tr>
<th></th>
<th><a href="#" class="headerlink" onClick="orderBy('title');"
><fmt:message key="pp.title" /></a></th>
- <th><a href="#" class="headerlink" onclick="orderBy('creationdate');"
><fmt:message key="pp.creationdate" /></th>
- <th><a href="#" class="headerlink" onclick="orderBy('publishdate');"
><fmt:message key="pp.publishdate" /></th>
+ <th><a href="#" class="headerlink" onclick="orderBy('creationdate');"
><fmt:message key="pp.creationdate" /></a></th>
+ <th><a href="#" class="headerlink" onclick="orderBy('publishdate');"
><fmt:message key="pp.publishdate" /></a></th>
</tr>
</thead>
<tbody class="hover">
@@ -195,7 +202,6 @@
<br />
-
</div>
</div>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs