Skip to content
Snippets Groups Projects
Commit 0d3a1338 authored by gnaegi's avatar gnaegi
Browse files

OO-1658 support help page anchors. Of course confluence has it's own anchor style...

parent 422146d8
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,19 @@ public class ConfluenceLinkSPI implements HelpLinkSPI {
String version = Settings.getVersion();
sb.append(generateSpace(version, locale));
if (page != null) {
sb.append(page.replace(" ", "%20"));
int anchorPos = page.indexOf("#");
if (anchorPos != -1) {
// page with anchor
String realPage = page.substring(0,anchorPos);
String anchor = page.substring(anchorPos+1);
// confluence has some super-fancy way to addressing pages with anchors
sb.append(realPage.replace(" ", "%20"));
sb.append("#").append(realPage.replace(" ", "")).append("-").append(anchor);
} else {
// page without anchor
sb.append(page.replace(" ", "%20"));
}
}
return sb.toString();
}
......
......@@ -142,7 +142,7 @@ public class GuiDemoFlexiForm extends FormBasicController {
firstName.setEnabled(inputMode);
firstName.setPlaceholderText("Hans");
firstName.setHelpText("If you have a middle name, add it to the first name input field");
firstName.setHelpUrlForManualPage("Personal menu");
firstName.setHelpUrlForManualPage("Configuration#Profile");
lastName = uifactory.addTextElement("lastname", "guidemo.flexi.form.lastname", 256, personData.getLastName(), formLayout);
lastName.setDisplaySize(defaultDisplaySize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment