提交 47ba0470 编写于 作者: K kohsuke

don't show empty section.

There's a bit of hack to detect if the tag has a body

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17812 71c3de6d-444a-0410-be80-ed276b4c234a
上级 d3eaff4b
......@@ -55,24 +55,26 @@ THE SOFTWARE.
<j:set var="targetType" value="${attrs.targetType ?: it.class}"/>
<j:set var="instances" value="${attrs.instances ?: instance[field]}"/>
<f:section title="${attrs.title}" name="${attrs.field?:attrs.name}">
<j:if test="${attrs.field!=null}">
<tr>
<td>
<input type="hidden" name="stapler-class-bag" value="true" />
</td>
</tr>
</j:if>
<j:if test="${!empty(descriptors) or context['org.apache.commons.jelly.body']!=null}">
<f:section title="${attrs.title}" name="${attrs.field?:attrs.name}">
<j:if test="${attrs.field!=null}">
<tr>
<td>
<input type="hidden" name="stapler-class-bag" value="true" />
</td>
</tr>
</j:if>
<d:invokeBody />
<j:forEach var="d" items="${descriptors}">
<f:optionalBlock name="${d.jsonSafeClassName}" help="${d.helpFile}"
title="${d.displayName}" checked="${instances.get(d)!=null}">
<d:invokeBody />
<j:forEach var="d" items="${descriptors}">
<f:optionalBlock name="${d.jsonSafeClassName}" help="${d.helpFile}"
title="${d.displayName}" checked="${instances.get(d)!=null}">
<j:set var="descriptor" value="${d}" />
<j:set var="instance" value="${instances.get(d)}" />
<st:include from="${d}" page="${d.configPage}" optional="true" />
</f:optionalBlock>
</j:forEach>
</f:section>
<j:set var="descriptor" value="${d}" />
<j:set var="instance" value="${instances.get(d)}" />
<st:include from="${d}" page="${d.configPage}" optional="true" />
</f:optionalBlock>
</j:forEach>
</f:section>
</j:if>
</j:jelly>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册