I've got the web-item configured, have the xwork package and action working correctly, however when I click the menu option in the space admin to open my action it navigates away from the space admin section instead of rendering to the right of the space admin menu.
I can't figure out what I've done to stop this from rendering correctly.
My web-item:
<web-item key="configure-purge-attachments-space" name="Configure Purge Attachments (Space)" section="system.space.admin/spaceops" weight="40"> <label key="Attachment Purging" /> <link>/spaces/configure-purge-attachments-space.action?key=$helper.space.key</link> <condition class="com.drunkendev.confluence.plugins.attachments.ConfigurePurgeAttachmentsSpaceCondition"/> </web-item>
My xwork section:
<xwork key="configure-purge-attachments" name="Configure Purge Attachments"> <package name="purge-attachments-space" extends="default" namespace="/spaces"> <default-interceptor-ref name="validatingStack" /> <action name="configure-purge-attachments-space" class="com.drunkendev.confluence.plugins.attachments.ConfigurePurgeAttachmentsSpaceAction"> <result name="success" type="velocity">/templates/purge-attachments/config/configure-purge-attachments-space.vm</result> </action> </package> </xwork>
My action class:
public class ConfigurePurgeAttachmentsSpaceAction extends AbstractSpaceAction implements SpaceAware { @Override public boolean isSpaceRequired() { return true; } @Override public boolean isViewPermissionRequired() { return true; } @Override public boolean isPermitted() { return getRemoteUser() != null && getSpace() != null && permissionManager.hasPermission( getRemoteUser(), Permission.ADMINISTER, getSpace()); } }
Page template
<?xml version="1.0" encoding="UTF-8"?> <html> <head> <title>$action.getText("com.drunkendev.confluence.plugins.attachment-tools.config.title")</title> </head> <body> <p>To implement</p> </body> </html>
Community moderators have prevented the ability to post new answers.
My apologies, just worked it out. Needed to add the decorators to show the admin panels:
#applyDecorator("root") #decoratorParam("helper" $action.helper) #decoratorParam("mode" "view-space-administration") #decoratorParam("context" "space-administration") #applyDecorator ("root") #decoratorParam ("context" "spaceadminpanel") #decoratorParam ("selection" "configure-purge-attachments-space") #decoratorParam ("title" "Attachment Purging") #decoratorParam ("selectedTab" "admin") #decoratorParam("helper" $i18n.helper)
More detail in this related answer - https://answers.atlassian.com/questions/67072/how-to-modify-custom-confluence-page-so-that-its-viewable-like-default-options/67376
You also need to #end the #applyDecorator calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.