Skip to content

Commit

Permalink
Add components for dropdown items (#8827)
Browse files Browse the repository at this point in the history
* Init

* Update taglib

* Add docs

* Add additional docs

* Update header.jelly

* Remove translations

* Linting

* Update utils.js

* Add clazz

* Update templates.js

* Address comments

* Fix failing tests due to JS change

* Update templates.js

* Fix properties not being set correctly

* XML escape clazz, URL and ID

---------

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
  • Loading branch information
janfaracik and MarkEWaite committed Mar 14, 2024
1 parent 471bf22 commit 730c59f
Show file tree
Hide file tree
Showing 49 changed files with 345 additions and 266 deletions.
16 changes: 9 additions & 7 deletions core/src/main/resources/hudson/PluginManager/available.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
List of available new plugins
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form" xmlns:dd="/lib/layout/dropdowns">
<l:layout title="${%Available plugins} - ${%Plugins}" permission="${app.SYSTEM_READ}">
<st:include page="sidepanel.jelly"/>
<!-- no need for additional breadcrumb here as the side panel offers enough functionality to browse between different pages -->
Expand All @@ -53,12 +53,14 @@ THE SOFTWARE.
icon="symbol-chevron-down"
tooltip="${null}"
clazz="jenkins-button--primary">
<button form="form" type="submit" class="jenkins-dropdown__item">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-download" />
</div>
${%Install after restart}
</button>
<dd:custom>
<button form="form" type="submit" class="jenkins-dropdown__item">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-download" />
</div>
${%Install after restart}
</button>
</dd:custom>
</l:overflowButton>
</div>
</l:isAdmin>
Expand Down
27 changes: 15 additions & 12 deletions core/src/main/resources/hudson/logging/LogRecorder/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ THE SOFTWARE.
Log view
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:dd="/lib/layout/dropdowns">
<l:layout title="Log" permission="${app.SYSTEM_READ}" type="one-column">
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
<l:main-panel>
Expand All @@ -46,19 +47,21 @@ THE SOFTWARE.
</a>
</l:isAdmin>
<l:overflowButton>
<span class="jenkins-dropdown__heading">${%Atom feed}</span>
<dd:header text="${%Atom feed}" />
<st:include it="${it.parent}" page="feeds.jelly" />
<l:isAdmin>
<div class="jenkins-dropdown__separator"></div>
<l:confirmationLink class="jenkins-dropdown__item jenkins-!-destructive-color"
href="doDelete"
message="${%delete.logrecorder(it.displayName)}"
post="true">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-trash" />
</div>
${%Delete log recorder}
</l:confirmationLink>
<dd:separator />
<dd:custom>
<l:confirmationLink class="jenkins-dropdown__item jenkins-!-destructive-color"
href="doDelete"
message="${%delete.logrecorder(it.displayName)}"
post="true">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-trash" />
</div>
${%Delete log recorder}
</l:confirmationLink>
</dd:custom>
</l:isAdmin>
</l:overflowButton>
</l:app-bar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,14 @@ THE SOFTWARE.

<!-- list of feed links -->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout">
<a class="jenkins-dropdown__item" href="rss">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-rss" />
</div>
${%All}
</a>
<a class="jenkins-dropdown__item" href="rss?level=WARNING">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-rss" />
</div>
${%WARNING}
</a>
<a class="jenkins-dropdown__item" href="rss?level=SEVERE">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-rss" />
</div>
${%SEVERE}
</a>
<j:jelly xmlns:j="jelly:core" xmlns:dd="/lib/layout/dropdowns">
<dd:item icon="symbol-rss"
text="${%All}"
href="rss" />
<dd:item icon="symbol-rss"
text="${%WARNING}"
href="rss?level=WARNING" />
<dd:item icon="symbol-rss"
text="${%SEVERE}"
href="rss?level=SEVERE" />
</j:jelly>
27 changes: 10 additions & 17 deletions core/src/main/resources/lib/hudson/rssBar.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,17 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout"
xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:jelly xmlns:j="jelly:core" xmlns:dd="/lib/layout/dropdowns" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<div id="rss-bar" class="jenkins-buttons-row jenkins-buttons-row--invert">
<button class="jenkins-button jenkins-button--tertiary" id="button-icon-legend">
${%Legend}
</button>
<a href="rssAll" class="jenkins-button jenkins-button--tertiary">
<l:icon src="symbol-rss" />
<span>Atom feed ${%forAll}</span>
</a>
<a href="rssFailed" class="jenkins-button jenkins-button--tertiary">
<l:icon src="symbol-rss" />
<span>Atom feed ${%forFailures}</span>
</a>
<a href="rssLatest" class="jenkins-button jenkins-button--tertiary">
<l:icon src="symbol-rss" />
<span>Atom feed ${%justLatestBuilds}</span>
</a>
<l:overflowButton clazz="jenkins-button--tertiary">
<dd:item icon="symbol-information-circle" id="button-icon-legend" text="${%Legend}" />
<dd:separator />
<dd:submenu icon="symbol-rss" text="${%Atom feed}">
<dd:item icon="symbol-rss" text="${%All}" href="rssAll" />
<dd:item icon="symbol-rss" text="${%Failures}" href="rssFailed" />
<dd:item icon="symbol-rss" text="${%LatestBuilds}" href="rssLatest" />
</dd:submenu>
</l:overflowButton>
</div>

<template id="template-icon-legend" data-title="${%Icon legend}">
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
# THE SOFTWARE.

Legend=Icon legend
forAll=for all
forFailures=for failures
justLatestBuilds=for just latest builds
All=All
Failures=Failures
LatestBuilds=Latest builds
6 changes: 0 additions & 6 deletions core/src/main/resources/lib/hudson/rssBar_bg.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@

Legend=\
Легенда
for\ all=\
За всички
for\ failures=\
За неуспешните
for\ just\ latest\ builds=\
Само за последните
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_ca.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Llegenda
for\ all=per a tot
for\ failures=per a les fallades
for\ just\ latest\ builds=només per als darrers muntatges
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_cs.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Vysvětlivky
for\ all=pro vše
for\ failures=pro neúspěšné
for\ just\ latest\ builds=pro poslední buildy
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_da.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

for\ just\ latest\ builds=kun for seneste byggerier
for\ failures=for fejl
for\ all=for alle
Legend=Beskrivelse
4 changes: 0 additions & 4 deletions core/src/main/resources/lib/hudson/rssBar_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@
# THE SOFTWARE.

Legend=Legende
for\ all=Alle Builds
for\ failures=Nur Fehlschläge
for\ just\ latest\ builds=Nur jeweils letzter Build
Icon\ legend=Legende
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_el.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Υπόμνημα
for\ all=για όλα
for\ failures=για τις αποτυχίες
for\ just\ latest\ builds=μονο για τις πρόσφατες διεργασίες
4 changes: 0 additions & 4 deletions core/src/main/resources/lib/hudson/rssBar_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@
# THE SOFTWARE.

Legend=Guía de iconos
for\ all=para todos
for\ failures=para fallas
for\ just\ latest\ builds=para los más recientes

3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_es_AR.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This file is under the MIT License by authors

Legend=Leyenda
for\ all=para todos
for\ failures=para las fallas
for\ just\ latest\ builds=sólo para los últimos trabajos
5 changes: 0 additions & 5 deletions core/src/main/resources/lib/hudson/rssBar_et.properties

This file was deleted.

3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_fi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Selite
for\ all=kaikista
for\ failures=epäonnistuneista
for\ just\ latest\ builds=vain viimeisimmistä
4 changes: 0 additions & 4 deletions core/src/main/resources/lib/hudson/rssBar_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@
# THE SOFTWARE.

Legend=Légende
for\ all=pour tout
for\ failures=de tous les échecs
for\ just\ latest\ builds=juste pour les dernières compilations

3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_he.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=תיאור
for\ all=עבור כולם
for\ failures=עבור כשלונות
for\ just\ latest\ builds=רק עבור הבניות האחרונות
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_hu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Jelmagyarázat
for\ all=mindegyikre
for\ failures=sikertelenekre
for\ just\ latest\ builds=csak a legutóbbi építésekre
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

for\ all=per tutte le compilazioni
for\ failures=per le compilazioni non riuscite
for\ just\ latest\ builds=solo per le ultime compilazioni
Legend=Legenda
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=凡例
for\ all=全ビルド
for\ failures=失敗ビルド
for\ just\ latest\ builds=最新ビルドのみ
26 changes: 0 additions & 26 deletions core/src/main/resources/lib/hudson/rssBar_ko.properties

This file was deleted.

3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_lt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Aprašymas
for\ all=visiems
for\ failures=nepavykusios užduotims
for\ just\ latest\ builds=tik paskutinėms užduotims
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_lv.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Leģenda
for\ all=visiem
for\ failures=kļūmēm
for\ just\ latest\ builds=pēdējiem būvējumiem
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_nb_NO.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Tegnforklaring
for\ all=for alle bygg
for\ failures=for feilede bygg
for\ just\ latest\ builds=for kun de siste byggene
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Legenda
for\ all=van alles
for\ failures=van gefaalde
for\ just\ latest\ builds=enkel de laatste uitvoerpogingen
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Legenda
for\ all=dla wszystkich
for\ failures=tylko niepowodzenia
for\ just\ latest\ builds=tylko dla najnowszych
27 changes: 0 additions & 27 deletions core/src/main/resources/lib/hudson/rssBar_pt_BR.properties

This file was deleted.

3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_pt_PT.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Legenda
for\ all=para todos
for\ failures=só para falhas
for\ just\ latest\ builds=só para últimas builds
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_ro.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Legendă
for\ all=pentru toate
for\ failures=pentru eşecuri
for\ just\ latest\ builds=doar pentru ultimele build-uri
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Помощь
for\ all=для всех сборок
for\ failures=для неудачных сборок
for\ just\ latest\ builds=Для последних сборок
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_sk.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Legenda
for\ all=pre všetko
for\ failures=pre neúspechy
for\ just\ latest\ builds=pre posledné zostavenia
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_sl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
# THE SOFTWARE.

Legend=Legenda
for\ all=Za vse
for\ failures=Za neuspehe
for\ just\ latest\ builds=Samo za zadnje različice
3 changes: 0 additions & 3 deletions core/src/main/resources/lib/hudson/rssBar_sr.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This file is under the MIT License by authors

Legend=Легенда
for\ all=за све
for\ failures=за неуспешне
for\ just\ latest\ builds=само за најновије изградње
Loading

0 comments on commit 730c59f

Please sign in to comment.