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

Allow linking to pre-filtered plugin manager pages, link from labels/… #4591

Merged
merged 8 commits into from
Apr 19, 2020
18 changes: 16 additions & 2 deletions core/src/main/resources/hudson/PluginManager/_table.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,26 @@ time {
margin-top: 0.25em;
}

.plugin-manager__category-label {
.plugin-manager__category-label:link,
.plugin-manager__category-label:visited {
display: inline-block;
border: 1px solid #ccc;
background-color: #eee;
background-color: #fbfbfb;
color: #333;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
padding: 0 0.5rem;
margin: 0 0.25rem 0.25rem 0;
text-decoration: none;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
transition: all 0.15s ease-in-out;
}
.plugin-manager__category-label:hover,
.plugin-manager__category-label:focus,
.plugin-manager__category-label:active {
background-color: #f2f2f2;
border-color: #333;
}
4 changes: 4 additions & 0 deletions core/src/main/resources/hudson/PluginManager/_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Behaviour.specify("#filter-box", '_table', 0, function(e) {
}

e.onkeyup = applyFilter;

(function() {
applyFilter();
}());
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ THE SOFTWARE.
<st:adjunct includes="hudson.PluginManager._table"/>
<div id="filter-container">
${%Filter}:
<input type="text" id="filter-box"/>
<input type="text" id="filter-box" value="${request.getParameter('filter')}"/>
</div>

<j:if test="${app.updateCenter.isRestartRequiredForCompletion()}">
Expand Down
7 changes: 4 additions & 3 deletions core/src/main/resources/hudson/PluginManager/table.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ THE SOFTWARE.

<div id="filter-container">
${%Filter}:
<input type="text" id="filter-box"/>
<input type="text" id="filter-box" value="${request.getParameter('filter')}"/>
</div>

<form method="post" action="install">
Expand Down Expand Up @@ -77,9 +77,10 @@ THE SOFTWARE.
<div class="plugin-manager__categories">
<j:forEach var="label" items="${p.categories}">
<j:if test="${!it.isMetaLabel(label)}">
<span class="plugin-manager__category-label">
<a href="?filter=${app.updateCenter.getCategoryDisplayName(label)}"
class="plugin-manager__category-label">
${app.updateCenter.getCategoryDisplayName(label)}
</span>
</a>
</j:if>
</j:forEach>
</div>
Expand Down