提交 bf63784c 编写于 作者: K kohsuke

modified to display the plugin version number.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1939 71c3de6d-444a-0410-be80-ed276b4c234a
上级 76213767
......@@ -270,6 +270,15 @@ public final class PluginWrapper {
return shortName;
}
/**
* Returns the version number of this plugin
*/
public String getVersion() {
String v = manifest.getMainAttributes().getValue("Plugin-Version");
if(v!=null) return v;
return "???";
}
/**
* Gets the "abc" portion from "abc.ext".
*/
......
......@@ -13,27 +13,34 @@
Changes will take effect when you restart Hudson
</div>
</div>
<table id="pluginList">
<j:forEach var="p" items="${it.pluginManager.plugins}">
<tr class="hoverback">
<td class="plugin-description">
<h4>${p.longName}</h4>
<div stlyle="padding-left: 1em">
<j:set var="indexPage" value="${p.indexPage.toString()}" />
<j:if test="${!empty(indexPage)}">
<j:include uri="${indexPage}" />
</j:if>
</div>
</td>
<td>
<j:set var="state" value="${h.ifThenElse(p.enabled,'Disable','Enable')}"/>
<input type="button" value="${state}" onclick="flip(event)"
url="pluginManager/plugin/${p.shortName}"
original="${h.ifThenElse(p.active,'Disable','Enable')}"/>
</td>
</tr>
</j:forEach>
</table>
<j:choose>
<j:when test="${empty(it.pluginManager.plugins)}">
No plugins installed.
</j:when>
<j:otherwise>
<table id="pluginList">
<j:forEach var="p" items="${it.pluginManager.plugins}">
<tr class="hoverback">
<td class="plugin-description">
<h4>${p.longName} &#x2014; ver.${p.version}</h4>
<div stlyle="padding-left: 1em">
<j:set var="indexPage" value="${p.indexPage.toString()}" />
<j:if test="${!empty(indexPage)}">
<j:include uri="${indexPage}" />
</j:if>
</div>
</td>
<td>
<j:set var="state" value="${h.ifThenElse(p.enabled,'Disable','Enable')}"/>
<input type="button" value="${state}" onclick="flip(event)"
url="pluginManager/plugin/${p.shortName}"
original="${h.ifThenElse(p.active,'Disable','Enable')}"/>
</td>
</tr>
</j:forEach>
</table>
</j:otherwise>
</j:choose>
</s:block>
</s:form>
<script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册