Skip to content

Commit

Permalink
Reset some files
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jan 15, 2022
1 parent b869976 commit 58936fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions core/src/main/java/hudson/model/ManagementLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@
*/
public abstract class ManagementLink implements ExtensionPoint, Action {

/**
* Mostly works like {@link Action#getIconFileName()}, except that
* the expected icon size is 48x48, not 24x24. So if you give
* just a file name, "/images/48x48" will be assumed.
*
* @return
* As a special case, return null to exclude this object from the management link.
* This is useful for defining {@link ManagementLink} that only shows up under
* certain circumstances.
*/
@Override
public abstract @CheckForNull String getIconFileName();

/**
* Returns a short description of what this link does. This text
* is the one that's displayed in grey. This can include HTML,
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/org/jenkins/ui/icon/IconType.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public enum IconType {
* @return The qualified icon url.
*/
public String toQualifiedUrl(String url, String resURL) {

switch (this) {
case CORE: {
return resURL + "/images/" + url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ THE SOFTWARE.
<table style="margin-top: 1em; margin-left:1em;">

<j:forEach var="act" items="${it.prominentActions}">
<j:set var="icon" value="${act.iconClassName != null ? act.iconClassName : act.icon}"/>
<j:set var="icon" value="${act.iconClassName != null ? act.iconClassName : act.iconFileName}"/>
<t:summary icon="${icon}" href="${act.urlName}">
${act.displayName}
</t:summary>
Expand Down

0 comments on commit 58936fe

Please sign in to comment.