Skip to content

Commit

Permalink
Merge pull request #6 from daniel-beck/JENKINS-20523
Browse files Browse the repository at this point in the history
[FIXED JENKINS-20523] Provide views list in breadcrumb bar
  • Loading branch information
jglick committed Feb 17, 2014
2 parents 2bbf9ee + 63b5a29 commit ac59f52
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java
Expand Up @@ -110,13 +110,14 @@
import java.util.concurrent.atomic.AtomicInteger;
import jenkins.model.DirectlyModifiableTopLevelItemGroup;
import jenkins.model.Jenkins;
import jenkins.model.ModelObjectWithChildren;
import org.kohsuke.stapler.interceptor.RequirePOST;

/**
* {@link Item} that contains other {@link Item}s, without modeling dependency.
*/
public class Folder extends AbstractItem
implements DirectlyModifiableTopLevelItemGroup, ViewGroup, TopLevelItem, StaplerOverridable, StaplerFallback {
implements DirectlyModifiableTopLevelItemGroup, ViewGroup, TopLevelItem, StaplerOverridable, StaplerFallback, ModelObjectWithChildren {

/**
* @see #getNewPronoun
Expand Down Expand Up @@ -641,6 +642,14 @@ public FormValidation doCheckJobName(@QueryParameter String value) {
}
}

public ContextMenu doChildrenContextMenu(StaplerRequest request, StaplerResponse response) {
ContextMenu menu = new ContextMenu();
for (View view : getViews()) {
menu.add(view.getAbsoluteUrl(),view.getDisplayName());
}
return menu;
}

/**
* Copies an existing {@link TopLevelItem} to into this folder with a new name.
*/
Expand Down

0 comments on commit ac59f52

Please sign in to comment.