Skip to content
Permalink
Browse files

[FIXED JENKINS-32309] - Allow Actions to contribute summary items for…

… folders (#30)

* [FIXED JENKINS-32309] - Allow Actions to contribute summary item for folders

https://issues.jenkins-ci.org/browse/JENKINS-32309

* [JENKINS-32309] - Remove the redundant file extension as it has been proposed by @jglick

* [JENKINS-32309] - Add documentation about AbstractFolder UI extensibility
  • Loading branch information...
oleg-nenashev committed Jun 13, 2016
1 parent 214079b commit 432468027a71c35b1b8f547eeb5ba328fbbd4cd5
@@ -86,6 +86,7 @@
import jenkins.model.Jenkins;
import jenkins.model.ModelObjectWithChildren;
import jenkins.model.ProjectNamingStrategy;
import jenkins.model.TransientActionFactory;
import net.sf.json.JSONObject;
import org.acegisecurity.AccessDeniedException;
import org.acegisecurity.context.SecurityContext;
@@ -105,6 +106,17 @@
/**
* A general-purpose {@link ItemGroup}.
* Base for {@link Folder} and {@link ComputedFolder}.
* <p/>
* <b>Extending Folders UI</b><br/>
* As any other {@link Item} type, folder types support extension of UI via {@link Action}s.
* These actions can be persisted or added via {@link TransientActionFactory}.
* See <a href="https://wiki.jenkins-ci.org/display/JENKINS/Action+and+its+family+of+subtypes">this page</a>
* for more details about actions.
* In folders actions provide the following features:
* <ul>
* <li>Left sidepanel hyperlink, which opens the page specified by action's {@code index.jelly}.</li>
* <li>Optional summary boxes on the main panel, which may be defined by {@code summary.jelly}.</li>
* </ul>
* @since 4.11-beta-1
*/
@SuppressWarnings({"unchecked", "rawtypes"}) // mistakes in various places
@@ -37,5 +37,9 @@ THE SOFTWARE.
</div>
<j:out value="${it.description!=null ? app.markupFormatter.translate(it.description) : ''}"/>
</div>
<!-- give actions a chance to contribute summary item -->
<j:forEach var="a" items="${it.allActions}">
<st:include page="summary" from="${a}" optional="true" it="${a}" />
</j:forEach>
<this:description />
</j:jelly>
</j:jelly>

0 comments on commit 4324680

Please sign in to comment.
You can’t perform that action at this time.