Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Oct 8, 2021
1 parent e434ecb commit 1d3a03d
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 29 deletions.
6 changes: 3 additions & 3 deletions core/src/main/resources/jenkins/model/Jenkins/configure.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ THE SOFTWARE.
<j:set var="instance" value="${it}" />
<j:set var="descriptor" value="${instance.descriptor}" />

<f:entry title="${%Home directory}" help="/help/system-config/homeDirectory.html">
${it.rootDir}
<f:entry title="${%Home directory}" description="By default, Jenkins stores all of its data in this directory on the file system" help="/help/system-config/homeDirectory.html">
<div class="jenkins-quote jenkins-quote--monospace">${it.rootDir}</div>
</f:entry>
<f:entry title="${%System Message}" help="/help/system-config/systemMessage.html">
<f:entry title="${%System Message}" description="This message will be displayed at the top of the Jenkins main page. This can be useful for posting notifications to your users">
<j:set var="readOnlyMode" value="${!h.hasPermission(app.MANAGE)}" />
<f:textarea name="system_message" value="${it.systemMessage}" disabled="${readOnlyMode?'true':null}" readonly="${readOnlyMode?'true':null}"
codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package jenkins.mvn.GlobalMavenConfig
def f = namespace(lib.FormTagLib)

f.section(title:_("Maven Configuration")) {
f.dropdownDescriptorSelector(title:_("Default settings provider"), field:"settingsProvider")
f.dropdownDescriptorSelector(title:_("Default global settings provider"), field:"globalSettingsProvider")
div(class: "jenkins-form-item") {
f.dropdownDescriptorSelector(title:_("Default settings provider"), field:"settingsProvider")
}
div(class: "jenkins-form-item") {
f.dropdownDescriptorSelector(title:_("Default global settings provider"), field:"globalSettingsProvider")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName) {
}
set("readOnlyMode", !app.hasPermission(app.ADMINISTER))
l.main_panel {
h1 {
l.icon(class: 'icon-setting icon-xlg')
// TODO more appropriate icon
text(my.displayName)
div(class:"jenkins-app-bar") {
div(class: "jenkins-app-bar__content") {
h1 {
text(my.displayName)
}
}
}

p()
Expand All @@ -29,6 +31,7 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName) {
Functions.getSortedDescriptorsForGlobalConfigByDescriptor(my.FILTER).each { Descriptor descriptor ->
set("descriptor",descriptor)
set("instance",descriptor)

f.rowSet(name:descriptor.jsonSafeClassName) {
st.include(from:descriptor, page:descriptor.globalConfigPage)
}
Expand Down
8 changes: 2 additions & 6 deletions core/src/main/resources/lib/form/description.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ THE SOFTWARE.
<st:documentation>
Renders a row that shows description text below an input field.
</st:documentation>
<div class='tr'>
<div colspan="2"></div>
<div class="setting-description">
<d:invokeBody />
</div>
<div></div>
<div class="jenkins-form-description">
<d:invokeBody />
</div>
</j:jelly>
12 changes: 6 additions & 6 deletions core/src/main/resources/lib/form/entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,18 @@ THE SOFTWARE.
<!-- expose this so that we can look up the @field value later from prepareDatabinding.jelly -->
<j:set var="entry" value="${attrs}" />
<j:set var="possiblyEscapedTitle" value="${escapeEntryTitleAndDescription ? h.escape(attrs.title) : attrs.title}" />
<div class='tr form-group'>
<div class="jenkins-form-item">
<j:choose>
<j:when test="${possiblyEscapedTitle!=null}">
<div class="jenkins-form-label help-sibling">
<j:out value="${possiblyEscapedTitle}" />
<f:helpLink url="${attrs.help}" featureName="${title}"/>
</div>
<j:if test="${!empty(attrs.description)}">
<f:description>
<j:out value="${escapeEntryTitleAndDescription ? h.escape(attrs.description) : attrs.description}"/>
</f:description>
</j:if>
<!-- Needs to have a .tr class otherwise custom uses of findFollowing
findFollowingTR(listBox, "validation-error-area") will break -->
<div class="setting-main">
Expand All @@ -86,11 +91,6 @@ THE SOFTWARE.
<j:if test="${attrs.help!=null}">
<f:helpArea />
</j:if>
<j:if test="${!empty(attrs.description)}">
<f:description>
<j:out value="${escapeEntryTitleAndDescription ? h.escape(attrs.description) : attrs.description}"/>
</f:description>
</j:if>
</j:when>
<j:otherwise>
<div class="setting-main help-sibling">
Expand Down
12 changes: 5 additions & 7 deletions core/src/main/resources/lib/form/section_.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.section-header {
font-weight: 600;
font-size: 1.25rem;
line-height: 1.2;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 0.75rem;
margin-top: 1.5rem;
padding-bottom: 3px;
font-weight: 700;
font-size: 1rem;
border-top: 2px solid var(--panel-border-color);
padding-top: 2rem;
margin: 2rem 0;
}
20 changes: 19 additions & 1 deletion war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,30 @@

.jenkins-form-description {
display: block;
opacity: 0.5;
margin-top: 0;
margin-bottom: 0.75rem;
color: var(--text-color-secondary);
}

.jenkins-quote {
position: relative;
display: flex;
line-height: 38px;

&::before {
content: "";
position: relative;
width: 2px;
background: var(--input-border);
margin-right: 1rem;
border-radius: 2px;
}

&--monospace {
font-family: monospace;
}
}

.jenkins-input {
display: block;
background: var(--input-color);
Expand Down
4 changes: 4 additions & 0 deletions war/src/main/less/modules/section.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
&:last-child {
padding-bottom: 0;
}

.jenkins-form-item:last-of-type {
margin-bottom: 0;
}
}

.jenkins-section__title {
Expand Down

0 comments on commit 1d3a03d

Please sign in to comment.