[JENKINS-72407] missing folder icon (#8872)

when a folder icon is provided and relies on the getImageOf method this
leads to a missing icon, e.g. gitlab branch source or when using a
custom folder icon
So fall back to the ballColorTd when we have no iconname which handles
all cases properly.
This commit is contained in:
Markus Winter 2024-01-25 15:43:34 +01:00 committed by GitHub
parent a665b45ba5
commit 70f2237147
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 13 deletions

View File

@ -23,18 +23,18 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout">
<td class="jenkins-table__cell--tight jenkins-table__icon" data="${job.iconColor.ordinal()}">
<div class="jenkins-table__cell__button-wrapper">
<j:choose>
<j:when test="${job.iconColor.iconName != null}">
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
<j:choose>
<j:when test="${job.iconColor.iconName != null}">
<td class="jenkins-table__cell--tight jenkins-table__icon" data="${job.iconColor.ordinal()}">
<div class="jenkins-table__cell__button-wrapper">
<l:icon src="symbol-status-${job.iconColor.iconName}" tooltip="${job.iconColor.description}" />
</j:when>
<j:otherwise>
<!-- This is for special conditions, such as folders -->
<l:icon src="${job.iconColor.iconClassName}" />
</j:otherwise>
</j:choose>
</div>
</td>
</div>
</td>
</j:when>
<j:otherwise>
<!-- This is for special conditions, such as folders -->
<t:ballColorTd it="${job.iconColor}" />
</j:otherwise>
</j:choose>
</j:jelly>