提交 f4437bda 编写于 作者: M mindless

[ui-samples] show link to index.jelly source too


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29911 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4a4a04ec
......@@ -37,7 +37,8 @@ public abstract class UISample implements ExtensionPoint, Action, Describable<UI
* Source files associated with this sample.
*/
public List<SourceFile> getSourceFiles() {
return Arrays.asList(new SourceFile(getClass().getSimpleName()+".java"));
return Arrays.asList(new SourceFile(getClass().getSimpleName()+".java"),
new SourceFile("index.jelly"));
}
/**
......@@ -78,7 +79,8 @@ public abstract class UISample implements ExtensionPoint, Action, Describable<UI
}
public URL resolve() {
return UISample.this.getClass().getResource(name);
return UISample.this.getClass().getResource(
name.endsWith(".jelly") ? UISample.this.getClass().getSimpleName()+"/"+name : name);
}
/**
......
......@@ -24,8 +24,8 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<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:s="/lib/samples"
xmlns:this="this">
<l:layout title="Dynamic ComboBox Sample">
<l:main-panel>
<l:layout title="Dynamic ComboBox Sample">
<l:main-panel>
<h1>Dynamic ComboBox Sample</h1>
<p>
......@@ -50,5 +50,5 @@ THE SOFTWARE.
</form>
</s:sample>
</l:main-panel>
</l:layout>
</l:layout>
</j:jelly>
......@@ -23,8 +23,8 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<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:s="/lib/samples">
<l:layout title="Dynamic ComboBox Sample">
<l:main-panel>
<l:layout title="Dynamic ComboBox Sample">
<l:main-panel>
<h1>UI Samples</h1>
<table>
......@@ -40,5 +40,5 @@ THE SOFTWARE.
</j:forEach>
</table>
</l:main-panel>
</l:layout>
</l:layout>
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册