|
| 1 | +<!-- |
| 2 | +The MIT License |
| 3 | +
|
| 4 | +Copyright (c) 2025 Jan Faracik |
| 5 | +
|
| 6 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | +of this software and associated documentation files (the "Software"), to deal |
| 8 | +in the Software without restriction, including without limitation the rights |
| 9 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | +copies of the Software, and to permit persons to whom the Software is |
| 11 | +furnished to do so, subject to the following conditions: |
| 12 | +
|
| 13 | +The above copyright notice and this permission notice shall be included in |
| 14 | +all copies or substantial portions of the Software. |
| 15 | +
|
| 16 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | +THE SOFTWARE. |
| 23 | +--> |
| 24 | +<?jelly escape-by-default='true'?> |
| 25 | +<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:x="jelly:xml"> |
| 26 | + <st:documentation> |
| 27 | + A wrappable bar of details about the given object. |
| 28 | + |
| 29 | + <st:attribute name="it" use="required"> |
| 30 | + The object to display details for. |
| 31 | + </st:attribute> |
| 32 | + </st:documentation> |
| 33 | + |
| 34 | + <div class="jenkins-details"> |
| 35 | + <j:forEach var="group" items="${h.getDetailsFor(it)}" indexVar="index"> |
| 36 | + <j:if test="${index gt 0}"> |
| 37 | + <div class="jenkins-details__separator">•</div> |
| 38 | + </j:if> |
| 39 | + <j:forEach var="detail" items="${group.value}"> |
| 40 | + <st:include page="detail.jelly" it="${detail}" optional="true"> |
| 41 | + <j:if test="${detail.iconClassName != null}"> |
| 42 | + <x:element name="${detail.link != null ? 'a' : 'div'}"> |
| 43 | + <x:attribute name="class">jenkins-details__item</x:attribute> |
| 44 | + <x:attribute name="href">${detail.link}</x:attribute> |
| 45 | + <div class="jenkins-details__item__icon"> |
| 46 | + <l:icon src="${detail.iconClassName}" /> |
| 47 | + </div> |
| 48 | + ${detail.displayName} |
| 49 | + </x:element> |
| 50 | + </j:if> |
| 51 | + </st:include> |
| 52 | + </j:forEach> |
| 53 | + </j:forEach> |
| 54 | + </div> |
| 55 | +</j:jelly> |
0 commit comments