Skip to content
Permalink
Browse files

[FIXED JENKINS-20523] Provide views list in breadcrumb bar

  • Loading branch information...
daniel-beck committed Feb 16, 2014
1 parent 2bbf9ee commit 63b5a29800adcad92365d1d2e7945b52349f3394
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/main/java/com/cloudbees/hudson/plugins/folder/Folder.java
@@ -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
@@ -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.
*/

0 comments on commit 63b5a29

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