Skip to content

Commit

Permalink
Restyle the tables and inline the new files filter.
Browse files Browse the repository at this point in the history
With DataTables 2.x it is much easier to style the table toolbar.
The new files toggle is now moved to the tables controls.
  • Loading branch information
uhafner committed Mar 6, 2024
1 parent 89bf3c3 commit 18574c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>data-tables-api</artifactId>
<version>2.0.0-1</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
Expand Down
27 changes: 15 additions & 12 deletions plugin/src/main/resources/coverage/coverage-table.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@
<j:when test="${it.hasSourceCode()}">
<div class="col-12 d-xxl-none">
<bs:card title="${title}" symbol="${symbol}" class="flex-fill h-100" >
<j:if test="${showChangedToggle}">
<f:toggleSwitch id="changed-${id + '-table'}" title="${%changed.files}" />
</j:if>
<dt:table model="${it.getTableModel(id + '-table')}"/>
<dt:table model="${it.getTableModel(id + '-table')}">
<j:if test="${showChangedToggle}">
<f:toggleSwitch id="changed-${id + '-table'}" title="${%changed.files}" />
</j:if>
</dt:table>
</bs:card>
</div>
<div class="col-xxl-6 d-none d-xxl-block">
<bs:card title="${title}" symbol="${symbol}" class="flex-fill h-100">
<j:if test="${showChangedToggle}">
<f:toggleSwitch id="changed-${id + '-table-inline'}" title="${%changed.files}" />
</j:if>
<dt:table model="${it.getTableModel(id + '-table-inline')}"/>
<dt:table model="${it.getTableModel(id + '-table-inline')}">
<j:if test="${showChangedToggle}">
<f:toggleSwitch id="changed-${id + '-table-inline'}" title="${%changed.files}" />
</j:if>
</dt:table>
</bs:card>
</div>
<div class="col-xxl-6 d-none d-xxl-block">
Expand Down Expand Up @@ -66,11 +68,12 @@
</j:when>
<j:otherwise>
<div class="col-12">
<j:if test="${showChangedToggle}">
<f:toggleSwitch id="changed-${id + '-table'}" title="${%changed.files}" />
</j:if>
<bs:card title="${title}" symbol="${symbol}" class="flex-fill h-100">
<dt:table model="${it.getTableModel(id + '-table')}"/>
<dt:table model="${it.getTableModel(id + '-table')}">
<j:if test="${showChangedToggle}">
<f:toggleSwitch id="changed-${id + '-table'}" title="${%changed.files}"/>
</j:if>
</dt:table>
</bs:card>
</div>

Expand Down

0 comments on commit 18574c7

Please sign in to comment.