File tree Expand file tree Collapse file tree 5 files changed +65
-18
lines changed
war/src/main/resources/images/symbols Expand file tree Collapse file tree 5 files changed +65
-18
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,16 @@ THE SOFTWARE.
3333 <script src =" ${resURL}/jsbundles/pages/job.js" type =" text/javascript" defer =" true" />
3434
3535 <j : set var =" controls" >
36- <t : editDescriptionButton permission =" ${it.UPDATE}" />
3736 <l : hasPermission permission =" ${it.UPDATE}" >
3837 <st : include page =" logKeep.jelly" />
3938 </l : hasPermission >
4039 </j : set >
4140
4241 <t : buildCaption controls =" ${controls}" >${it.displayName}</t : buildCaption >
4342
44- <l : details-bar it =" ${it}" />
43+ <l : details-bar it =" ${it}" >
44+ <t : editDescriptionButton permission =" ${it.UPDATE}" compact =" true" />
45+ </l : details-bar >
4546
4647 <div >
4748 <t : editableDescription permission =" ${it.UPDATE}" hideButton =" true" />
Original file line number Diff line number Diff line change 1313 <st : attribute name =" submissionUrl" >
1414 Optional submission URL. If not specified, will use 'submitDescription'.
1515 </st : attribute >
16+ <st : attribute name =" compact" >
17+ If set, the button becomes compact and the button label hides.
18+ </st : attribute >
1619 </st : documentation >
17- <j : set var =" actualDescription" value =" ${description}" defaultValue =" ${it.description}" />
20+
21+ <j : set var =" actualDescription" value =" ${description}" defaultValue =" ${it.description}" />
22+
23+ <j : set var =" label" >
24+ <j : choose >
25+ <j : when test =" ${empty(actualDescription)}" >
26+ ${%add description}
27+ </j : when >
28+ <j : otherwise >
29+ ${%edit description}
30+ </j : otherwise >
31+ </j : choose >
32+ </j : set >
33+
1834 <l : hasPermission permission =" ${permission}" >
19- <st : adjunct includes =" lib.hudson.editable-description" />
20- <a class =" jenkins-button jenkins-hidden" id = " description-link " href = " editDescription " data-description = " ${actualDescription} " data-url = " ${submissionUrl} " >
21- < l : icon src = " symbol-edit " />
22- < j : choose >
23- < j : when test =" ${empty( actualDescription)} " >
24- ${%add description}
25- </ j : when >
26- < j : otherwise >
27- ${%edit description}
28- </ j : otherwise >
29- </j : choose >
35+ <st : adjunct includes =" lib.hudson.editable-description" />
36+ <a class =" jenkins-button jenkins-hidden ${attrs.compact ? 'jenkins-details__button' : ''} "
37+ id = " description-link "
38+ href = " editDescription "
39+ data-description =" ${actualDescription} "
40+ data-url = " ${submissionUrl} "
41+ tooltip = " ${attrs.compact ? label : null} " >
42+ < l : icon src = " symbol-description " / >
43+ < j : if test = " ${!attrs.compact} " >
44+ ${label}
45+ </j : if >
3046 </a >
3147 </l : hasPermission >
32- </j : jelly >
48+ </j : jelly >
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222THE SOFTWARE.
2323-->
2424<?jelly escape-by-default =' true' ?>
25- <j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : l =" /lib/layout" xmlns : x =" jelly:xml" >
25+ <j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : l =" /lib/layout" xmlns : x =" jelly:xml" xmlns : d = " jelly:define " >
2626 <st : documentation >
2727 A wrappable bar of details about the given object.
2828
@@ -51,5 +51,6 @@ THE SOFTWARE.
5151 </st : include >
5252 </j : forEach >
5353 </j : forEach >
54+ <d : invokeBody />
5455 </div >
5556</j : jelly >
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ $icon-size: 1.125rem;
55.jenkins-details {
66 display : flex ;
77 align-items : center ;
8- gap : 0.625 rem 1.25rem ;
8+ gap : 0.75 rem 1.25rem ;
99 flex-wrap : wrap ;
1010
1111 button .jenkins-details__item ,
@@ -42,7 +42,7 @@ $icon-size: 1.125rem;
4242 height : $icon-size ;
4343
4444 * {
45- stroke-width : 40 px ;
45+ stroke-width : 36 px ;
4646 }
4747 }
4848 }
@@ -53,4 +53,26 @@ $icon-size: 1.125rem;
5353 opacity : 0.5 ;
5454 margin-inline : -0.5rem ;
5555 }
56+
57+ & __button {
58+ --button-background : transparent !important ;
59+
60+ min-width : 51px ;
61+ min-height : 2rem ;
62+ padding-block : 0 ;
63+ color : var (--text-color-secondary ) !important ;
64+
65+ & :not (:hover , :active , :focus-visible ) {
66+ --jenkins-border--subtle : var (--jenkins-border );
67+ }
68+
69+ svg {
70+ width : $icon-size ;
71+ height : $icon-size ;
72+
73+ * {
74+ stroke-width : 36px ;
75+ }
76+ }
77+ }
5678}
You can’t perform that action at this time.
0 commit comments