mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-30 04:55:21 +00:00
Prevent 404 in .../contextMenu link when there's no context menu
This commit is contained in:
1 parent
31bda5786a
commit
e094b90e4c
5 files changed
+20
-2
No files matched your search
@@ -58,6 +58,7 @@ import hudson.views.ViewsTabBar;
|
||||
import hudson.widgets.RenderOnDemandClosure;
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.ModelObjectWithContextMenu;
|
||||
import org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken;
|
||||
import org.apache.commons.jelly.JellyContext;
|
||||
import org.apache.commons.jelly.JellyTagException;
|
||||
@@ -146,6 +147,10 @@ public class Functions {
|
||||
return o instanceof ModelObject;
|
||||
}
|
||||
|
||||
public static boolean isModelWithContextMenu(Object o) {
|
||||
return o instanceof ModelObjectWithContextMenu;
|
||||
}
|
||||
|
||||
public static String xsDate(Calendar cal) {
|
||||
return Util.XS_DATETIME_FORMATTER.format(cal.getTime());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user