mirror of https://github.com/jenkinsci/jenkins.git
Use Notice component for views lacking jobs (#9724)
* Use notice for views lacking jobs * Update _notice.scss * Rename text to title, use 'invokeBody' rather than description field
This commit is contained in:
parent
7ff5aaa0fd
commit
239ced05af
|
@ -71,7 +71,7 @@ THE SOFTWARE.
|
|||
|
||||
<j:choose>
|
||||
<j:when test="${noPlugins}">
|
||||
<l:notice icon="symbol-plugins" text="${%No plugins installed}" />
|
||||
<l:notice icon="symbol-plugins" title="${%No plugins installed}" />
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<table id="plugins" class="jenkins-table sortable">
|
||||
|
|
|
@ -230,7 +230,7 @@ THE SOFTWARE.
|
|||
</table>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<l:notice icon="symbol-up-to-date" text="${%No updates available}" />
|
||||
<l:notice icon="symbol-up-to-date" title="${%No updates available}" />
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
<d:invokeBody/>
|
||||
|
|
|
@ -67,7 +67,7 @@ THE SOFTWARE.
|
|||
</l:app-bar>
|
||||
|
||||
<j:if test="${noLogs}">
|
||||
<l:notice text="${%No logs available}" icon="symbol-journal" />
|
||||
<l:notice title="${%No logs available}" icon="symbol-journal" />
|
||||
</j:if>
|
||||
|
||||
<t:logRecords logRecords="${it.logRecords}"/>
|
||||
|
|
|
@ -23,9 +23,10 @@ THE SOFTWARE.
|
|||
-->
|
||||
|
||||
<?jelly escape-by-default='true'?>
|
||||
<j:jelly xmlns:j="jelly:core">
|
||||
${%description_1}
|
||||
<j:if test="${it.hasPermission(it.CONFIGURE)}">
|
||||
${%description_2}
|
||||
</j:if>
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout">
|
||||
<l:notice title="${%description_1}" icon="symbol-weather-icon-health-00to19">
|
||||
<j:if test="${it.hasPermission(it.CONFIGURE)}">
|
||||
${%description_2}
|
||||
</j:if>
|
||||
</l:notice>
|
||||
</j:jelly>
|
||||
|
|
|
@ -53,7 +53,7 @@ THE SOFTWARE.
|
|||
|
||||
<j:choose>
|
||||
<j:when test="${empty(app.pluginManager.plugins) and empty(app.pluginManager.failedPlugins)}">
|
||||
<l:notice icon="symbol-plugins" text="${%No plugins installed}" />
|
||||
<l:notice icon="symbol-plugins" title="${%No plugins installed}" />
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<table class="jenkins-table sortable">
|
||||
|
|
|
@ -23,10 +23,10 @@ THE SOFTWARE.
|
|||
-->
|
||||
|
||||
<?jelly escape-by-default='true'?>
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:d="jelly:define">
|
||||
<st:documentation>
|
||||
<st:attribute name="text" use="required">
|
||||
Sets the text for the notice. HTML isn't supported.
|
||||
<st:attribute name="title" use="required">
|
||||
Sets the title for the notice. HTML isn't supported.
|
||||
</st:attribute>
|
||||
<st:attribute name="icon" use="required">
|
||||
Sets the icon for the notice. Supports Jenkins Symbols and regular images.
|
||||
|
@ -35,6 +35,9 @@ THE SOFTWARE.
|
|||
|
||||
<div class="jenkins-notice">
|
||||
<l:icon src="${attrs.icon}" />
|
||||
<div>${attrs.text}</div>
|
||||
<div>${attrs.title}</div>
|
||||
<div class="jenkins-notice__description">
|
||||
<d:invokeBody />
|
||||
</div>
|
||||
</div>
|
||||
</j:jelly>
|
||||
|
|
|
@ -8,11 +8,22 @@
|
|||
background: var(--button-background);
|
||||
border-radius: 0.66rem;
|
||||
font-size: var(--font-size-base);
|
||||
margin-bottom: 30px;
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--section-padding);
|
||||
font-weight: 450;
|
||||
padding: calc(var(--section-padding) * 2);
|
||||
text-align: center;
|
||||
|
||||
svg {
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
}
|
||||
|
||||
&__description {
|
||||
color: var(--text-color-secondary);
|
||||
margin-top: -0.375rem;
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue