diff --git a/core/src/main/resources/hudson/model/Computer/index-top.jelly b/core/src/main/resources/hudson/model/Computer/index-top.jelly index 95bab4bf8759..37fd8a2f1945 100644 --- a/core/src/main/resources/hudson/model/Computer/index-top.jelly +++ b/core/src/main/resources/hudson/model/Computer/index-top.jelly @@ -1,5 +1,5 @@ - + diff --git a/core/src/main/resources/hudson/model/Computer/index.jelly b/core/src/main/resources/hudson/model/Computer/index.jelly index 2b93c52fe3ee..fa4abce69296 100644 --- a/core/src/main/resources/hudson/model/Computer/index.jelly +++ b/core/src/main/resources/hudson/model/Computer/index.jelly @@ -29,6 +29,7 @@ THE SOFTWARE. + diff --git a/core/src/main/resources/hudson/model/Job/index.jelly b/core/src/main/resources/hudson/model/Job/index.jelly index 0fb537e267d7..7317218795a5 100644 --- a/core/src/main/resources/hudson/model/Job/index.jelly +++ b/core/src/main/resources/hudson/model/Job/index.jelly @@ -40,6 +40,9 @@ THE SOFTWARE. +
+ +
@@ -52,7 +55,7 @@ THE SOFTWARE. - + diff --git a/core/src/main/resources/hudson/model/Label/index.jelly b/core/src/main/resources/hudson/model/Label/index.jelly index 34ede2f6c8ee..ad75b1dbf4c7 100644 --- a/core/src/main/resources/hudson/model/Label/index.jelly +++ b/core/src/main/resources/hudson/model/Label/index.jelly @@ -28,12 +28,13 @@ THE SOFTWARE. -

- ${it.name} -

- + + + + + - + diff --git a/core/src/main/resources/hudson/model/Run/index.jelly b/core/src/main/resources/hudson/model/Run/index.jelly index 0acdb74fb01f..b164817a164f 100644 --- a/core/src/main/resources/hudson/model/Run/index.jelly +++ b/core/src/main/resources/hudson/model/Run/index.jelly @@ -30,10 +30,20 @@ THE SOFTWARE. -
+ + + + + ${it.displayName} () + +
+ +
+ +
${%startedAgo(it.timestampString)}
@@ -48,11 +58,6 @@ THE SOFTWARE.
- ${it.displayName} () - -
- -
-
+ diff --git a/core/src/main/resources/hudson/model/User/index.jelly b/core/src/main/resources/hudson/model/User/index.jelly index db5a8f83022e..a85c46b1a945 100644 --- a/core/src/main/resources/hudson/model/User/index.jelly +++ b/core/src/main/resources/hudson/model/User/index.jelly @@ -27,13 +27,21 @@ THE SOFTWARE. -

- - - - ${it.fullName} -

- +
+
+

+ + + + ${it.fullName} +

+
+
+ +
+
+ +
${%Jenkins User ID}: ${it.id}
diff --git a/core/src/main/resources/lib/hudson/buildCaption.jelly b/core/src/main/resources/lib/hudson/buildCaption.jelly index 338344bdfa6a..398050268107 100644 --- a/core/src/main/resources/lib/hudson/buildCaption.jelly +++ b/core/src/main/resources/lib/hudson/buildCaption.jelly @@ -27,6 +27,12 @@ THE SOFTWARE. --> + + + Optional field to set controls in the app bar + + +
+
diff --git a/core/src/main/resources/lib/hudson/editDescriptionButton.jelly b/core/src/main/resources/lib/hudson/editDescriptionButton.jelly new file mode 100644 index 000000000000..0f4f5ec7ffa4 --- /dev/null +++ b/core/src/main/resources/lib/hudson/editDescriptionButton.jelly @@ -0,0 +1,30 @@ + + + + + If the current user doesn't have this permission, the description + is not editable. + + + Optional value of the description. If not specified, will use '${it.description}'. + + + Optional submission URL. If not specified, will use 'submitDescription'. + + + + + + + + + + ${%add description} + + + ${%edit description} + + + + + \ No newline at end of file diff --git a/core/src/main/resources/lib/hudson/editableDescription.properties b/core/src/main/resources/lib/hudson/editDescriptionButton.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_bg.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_bg.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_bg.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_bg.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_ca.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_ca.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_ca.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_ca.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_cs.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_cs.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_cs.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_cs.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_da.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_da.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_da.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_da.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_de.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_de.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_de.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_de.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_el.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_el.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_el.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_el.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_es.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_es.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_es.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_es.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_es_AR.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_es_AR.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_es_AR.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_es_AR.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_et.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_et.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_et.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_et.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_fi.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_fi.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_fi.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_fi.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_fr.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_fr.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_fr.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_fr.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_he.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_he.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_he.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_he.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_hu.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_hu.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_hu.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_hu.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_it.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_it.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_it.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_it.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_ja.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_ja.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_ja.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_ja.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_ko.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_ko.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_ko.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_ko.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_lt.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_lt.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_lt.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_lt.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_lv.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_lv.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_lv.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_lv.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_nb_NO.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_nb_NO.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_nb_NO.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_nb_NO.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_nl.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_nl.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_nl.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_nl.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_pl.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_pl.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_pl.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_pl.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_pt_BR.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_pt_BR.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_pt_BR.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_pt_BR.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_pt_PT.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_pt_PT.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_pt_PT.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_pt_PT.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_ro.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_ro.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_ro.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_ro.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_ru.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_ru.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_ru.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_ru.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_sk.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_sk.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_sk.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_sk.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_sl.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_sl.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_sl.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_sl.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_sr.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_sr.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_sr.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_sr.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_sv_SE.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_sv_SE.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_sv_SE.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_sv_SE.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_tr.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_tr.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_tr.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_tr.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_uk.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_uk.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_uk.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_uk.properties diff --git a/core/src/main/resources/lib/hudson/editableDescription_zh_TW.properties b/core/src/main/resources/lib/hudson/editDescriptionButton_zh_TW.properties similarity index 100% rename from core/src/main/resources/lib/hudson/editableDescription_zh_TW.properties rename to core/src/main/resources/lib/hudson/editDescriptionButton_zh_TW.properties diff --git a/core/src/main/resources/lib/hudson/editable-description.js b/core/src/main/resources/lib/hudson/editable-description.js index e8d2b43c356e..e04462901ca9 100644 --- a/core/src/main/resources/lib/hudson/editable-description.js +++ b/core/src/main/resources/lib/hudson/editable-description.js @@ -4,6 +4,7 @@ let descriptionLink = document.querySelector("#description-link"); descriptionLink.addEventListener("click", function (e) { e.preventDefault(); + descriptionLink.classList.add("jenkins-hidden"); let url = descriptionLink.getAttribute("data-url"); let description = descriptionLink.getAttribute("data-description"); return replaceDescription(description, url); diff --git a/core/src/main/resources/lib/hudson/editableDescription.jelly b/core/src/main/resources/lib/hudson/editableDescription.jelly index d9c73be6f1c9..e67c77dfd900 100644 --- a/core/src/main/resources/lib/hudson/editableDescription.jelly +++ b/core/src/main/resources/lib/hudson/editableDescription.jelly @@ -38,30 +38,23 @@ THE SOFTWARE. Optional submission URL. If not specified, will use 'submitDescription'. + + Hide the add/edit description button. To be used when the button is provided via the app bar. + + -
+ diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 2d48f5fe78ed..a0b34d378fae 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -1901,8 +1901,11 @@ function xor(a, b) { // eslint-disable-next-line no-unused-vars function replaceDescription(initialDescription, submissionUrl) { var d = document.getElementById("description"); - d.firstElementChild.nextElementSibling.innerHTML = - "
"; + let button = d.firstElementChild.nextElementSibling; + if (button !== null) { + d.firstElementChild.nextElementSibling.innerHTML = + "
"; + } let parameters = {}; if (initialDescription !== null && initialDescription !== "") { parameters["description"] = initialDescription;