Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table enhancement #313

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>ionicons-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
Expand Down
87 changes: 46 additions & 41 deletions src/main/resources/lib/configfiles/configfiles.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,61 @@ THE SOFTWARE.
<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:cf="/lib/configfiles">

<st:adjunct includes="org.jenkinsci.plugins.configfiles.styles"/>
<j:set var="groupedConfigs" value="${attrs.groupedConfigs}"/>

<div class="excerpt">

<j:forEach var="pEntry" items="${groupedConfigs}">
<p/>
<p/>
<table class="pane">
<tr valign="center" style="border-top: 0px;">
<td class="pane-header" colspan="3">
<i>
<table class="jenkins-table cfp-table">
<j:forEach var="pEntry" items="${groupedConfigs}">
<tbody>
<tr class="cfp-table__section-header cfp-table__section-header--title">
<td colspan="6" >
${pEntry.key.displayName}
</i>
</td>
</tr>
<j:forEach var="t" items="${pEntry.value}">
<tr valign="center" style="border-top: thin inset darkgray">
<td width="32">
<a href="editConfig?id=${t.id}">
<l:icon title="${%edit script} ${t.name}"
class="icon-notepad icon-md"/>
</a>
<j:out value=" "/>
<l:confirmationLink href="removeConfig?id=${t.id}" post="true" message="Sure you want to delete [${t.name}]?">
<l:icon title="${%remove script} ${t.name}"
class="icon-edit-delete icon-md"/>
</l:confirmationLink>
</td>
<td>
<i>
${t.name}
</i>
</td>
<td>
<code>
${t.id}
</code>
</td>
</tr>
<tr>
<td>
${t.contentType}
<tr class="cfp-table__section-header cfp-table__section-header--fields">
<td class="jenkins-table__cell--tight cfp-table__icon">
${%E}
</td>
<td>
${t.comment}
<td class="jenkins-table__cell--tight cfp-table__icon">
${%D}
</td>
<td></td>
<td>${%Name}</td>
<td>${%ID}</td>
<td>${%Comment}</td>
<td>${%Content Type}</td>
</tr>
</j:forEach>
</table>
</j:forEach>
<j:forEach var="t" items="${pEntry.value}">
<tr>
<td class="jenkins-table__cell--tight cfp-table__icon">
<a href="editConfig?id=${t.id}">
<l:icon tooltip="${%Edit script} ${t.name}" src="symbol-create-outline plugin-ionicons-api"
class="icon-md"/>
</a>
</td>
<td class="jenkins-table__cell--tight cfp-table__icon">
<l:confirmationLink href="removeConfig?id=${t.id}" post="true" message="Sure you want to delete [${t.name}]?">
<l:icon tooltip="${%Remove script} ${t.name}" src="symbol-trash-outline plugin-ionicons-api"
class="icon-md"/>
</l:confirmationLink>
</td>
<td>
${t.name}
</td>
<td>
${t.id}
</td>
<td>
${t.comment}
</td>
<td>
${t.contentType}
</td>
</tr>
</j:forEach>
</tbody>
</j:forEach>
</table>
</div>
</j:jelly>
1 change: 1 addition & 0 deletions src/main/resources/lib/configfiles/selectprovider.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ THE SOFTWARE.
<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:set var="providers" value="${attrs.providers}" />

<st:adjunct includes="org.jenkinsci.plugins.configfiles.styles"/>
<f:form name="addConfig" method="post" action="addConfig">
<j:if test="${error != null}">
<j:out value="${error.renderHtml()}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ THE SOFTWARE.
<l:layout title="${%filetype}" norefresh="true">
<cf:sitepanel />

<!-- TODO Remove when Jenkins LTS release is no longer supported by update center -->
<style>
.jenkins-radio__label {
margin-left: 5px;
font-weight: 600;
}
.jenkins-radio__description {
margin: 4px 0 10px 21px;
color: var(--text-color-secondary);
}
</style>

<l:main-panel>
<div class="jenkins-app-bar">
<div class="jenkins-app-bar__content">
Expand Down
34 changes: 34 additions & 0 deletions src/main/resources/org/jenkinsci/plugins/configfiles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.cfp-table {
width: auto;
}

.cfp-table__icon {
text-align: center!important;
width: 3rem!important;
}

.cfp-table__section-header > td {
background-color: color-mix(in srgb, var(--medium-grey) 20%, var(--light-grey))!important;
height: unset!important;
font-weight: 600!important;
padding-top: 0!important;
padding-bottom: 0!important;
}

.cfp-table > tbody:not(:first-of-type):before {
content: "";
display: block;
height: 20px;
}

.cfp-table__section-header--title > td {
padding: 0 .5rem!important;
}

.cfp-table__section-header--fields > td:not(.cfp-table__icon) {
padding-left: 1.6rem!important;
}

.jenkins-radio__label {
font-weight: 600;
}