Skip to content

Commit

Permalink
Display how many users there are on the 'Users' page (#9221)
Browse files Browse the repository at this point in the history
Init
  • Loading branch information
janfaracik authored May 27, 2024
1 parent 5af668d commit 2c02654
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<l:layout permission="${app.ADMINISTER}" title="${%Users}" type="one-column">
<l:main-panel>
<l:app-bar title="${%Users}">
<l:app-bar title="${%Users}" subtitle="${it.allUsers.size()}">
<l:isAdmin>
<a href="addUser" class="jenkins-button jenkins-button--primary">
<l:icon src="symbol-add" />
Expand Down
6 changes: 6 additions & 0 deletions core/src/main/resources/lib/layout/app-bar.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ THE SOFTWARE.
<st:attribute name="headingLevel">
Defaults to h1
</st:attribute>
<st:attribute name="subtitle">
The subtitle for the application bar
</st:attribute>
Generates a row containing the page title and an optional set of controls
</st:documentation>

Expand All @@ -39,6 +42,9 @@ THE SOFTWARE.
<div class="jenkins-app-bar__content">
<x:element name="${headingLevel ?: 'h1'}">
${title}
<j:if test="${attrs.subtitle != null}">
<span class="jenkins-app-bar__subtitle">${attrs.subtitle}</span>
</j:if>
</x:element>
</div>
<div class="jenkins-app-bar__controls">
Expand Down
11 changes: 5 additions & 6 deletions war/src/main/scss/components/_app-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
}
}

&--border {
margin-bottom: var(--section-padding);
padding-bottom: var(--section-padding);
border-bottom: 2px solid var(--panel-border-color);
}

&--sticky {
position: sticky;
top: 40px;
Expand Down Expand Up @@ -69,6 +63,11 @@
margin: 0;
font-size: 1.5rem;
}

&__subtitle {
color: var(--text-color-secondary);
margin-left: 0.5ch;
}
}

.jenkins-build-caption {
Expand Down

0 comments on commit 2c02654

Please sign in to comment.