Skip to content

Commit

Permalink
[FIXED JENKINS-20523] Provide views list in breadcrumb bar
Browse files Browse the repository at this point in the history
Conflicts:
	src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java
  • Loading branch information
daniel-beck committed Mar 2, 2014
1 parent a24eb62 commit 4398ffb
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 @@ -114,13 +114,14 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
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 ModifiableTopLevelItemGroup, ViewGroup, TopLevelItem, StaplerOverridable, StaplerFallback {
implements ModifiableTopLevelItemGroup, ViewGroup, TopLevelItem, StaplerOverridable, StaplerFallback, ModelObjectWithChildren {

/**
* @see #getNewPronoun
Expand Down Expand Up @@ -653,6 +654,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 4398ffb

Please sign in to comment.