Skip to content

Commit

Permalink
[FIXED JENKINS-32309] - Allow Actions to contribute summary items for…
Browse files Browse the repository at this point in the history
… 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 4324680
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Expand Up @@ -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.