diff --git a/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/sidepanel.jelly b/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/sidepanel.jelly index 482ea4b5..914d78d7 100644 --- a/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/sidepanel.jelly +++ b/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/sidepanel.jelly @@ -23,8 +23,11 @@ THE SOFTWARE. --> - - + + + + + + - diff --git a/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/view-index-top.jelly b/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/view-index-top.jelly index ea9408ac..736c1c6d 100644 --- a/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/view-index-top.jelly +++ b/src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/view-index-top.jelly @@ -53,6 +53,9 @@ THE SOFTWARE. + +
${%disabled(it.pronoun)}
+
diff --git a/src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java b/src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java index 360b32ae..4adc81ac 100644 --- a/src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java +++ b/src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java @@ -33,6 +33,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -40,7 +41,6 @@ import com.cloudbees.hudson.plugins.folder.Folder; import com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder; import org.htmlunit.html.DomElement; -import org.htmlunit.html.HtmlForm; import org.htmlunit.html.HtmlPage; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; @@ -625,6 +625,21 @@ public void failAllDeletedOnes() throws Exception { d.assertItemNames(2, "A"); } + @Issue("JENKINS-73930") + @Test + public void disabledWarningFromUiViews() throws Exception { + LockedDownSampleComputedFolder folder = r.jenkins.createProject(LockedDownSampleComputedFolder.class, "d"); + assertFalse("by default, a folder is disabled", folder.isDisabled()); + for(View view : folder.getViews()){ + assertNull(r.createWebClient().goTo(view.getViewUrl()).getElementById("disabled-message")); + } + folder.setDisabled(true); + folder.save(); + for(View view : folder.getViews()){ + assertNotNull(r.createWebClient().goTo(view.getViewUrl()).getElementById("disabled-message")); + } + } + /** * Waits until Hudson finishes building everything, including those in the queue, or fail the test * if the specified timeout milliseconds is