提交 cc40af0c 编写于 作者: K Kohsuke Kawaguchi

While editing description, inline help should show the syntax guide based on...

While editing description, inline help should show the syntax guide based on the current markup formatter.
上级 efc7363e
......@@ -74,6 +74,8 @@ Upcoming changes</a>
Fixed a XSS vulnerability in the project relationship page.
<li class=rfe>
Added a new extension point to expose unprotected root action.
<li class=rfe>
While editing description, inline help should show the syntax guide based on the current markup formatter.
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -69,6 +69,20 @@ public abstract class MarkupFormatter extends AbstractDescribableImpl<MarkupForm
return w.toString();
}
/**
* Gets the URL of the help file. This help will shown next to the text area of the description,
* and is ideal of describing what the allowed syntax is.
*
* By default, we look for colocated help-syntax.html.
*
* @since 1.398
* @return null
* If there's no help file.
*/
public String getHelpUrl() {
return getDescriptor().getHelpFile("syntax");
}
@Override
public MarkupFormatterDescriptor getDescriptor() {
return (MarkupFormatterDescriptor)super.getDescriptor();
......
......@@ -31,7 +31,11 @@ THE SOFTWARE.
</j:if>
<l:ajax>
<form action="submitDescription" method="post">
<f:textarea name="description" value="${it.description}" />
<table>
<f:entry help="${app.markupFormatter.helpUrl}">
<f:textarea name="description" value="${it.description}" />
</f:entry>
</table>
<div align="right">
<f:submit value="${%Submit}" />
</div>
......
......@@ -30,7 +30,11 @@ THE SOFTWARE.
<st:include page="sidepanel.jelly" />
<l:main-panel>
<form action="submitDescription" method="post">
<f:textarea name="description" value="${it.description}" />
<table>
<f:entry help="${app.markupFormatter.helpUrl}">
<f:textarea name="description" value="${it.description}" />
</f:entry>
</table>
<f:submit value="${%Submit}" />
</form>
</l:main-panel>
......
......@@ -39,7 +39,7 @@ THE SOFTWARE.
<f:textbox name="name" value="${it.name}" />
</f:entry>
</j:if>
<f:entry title="${%Description}" help="/help/project-config/description.html">
<f:entry title="${%Description}" help="${app.markupFormatter.helpUrl}">
<f:textarea name="description" value="${it.description}"/>
</f:entry>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册