Writing a Space Admin Screen
This tutorial applies to Confluence 5.0.
Level of experience:
If your plugin needs per-space configuration, you will need to create a screen in Space Tools.
The example below is available on the following BitBucket repository:
You need to create a Confluence plugin and update the version of Confluence to 5.0-beta5.
Creating a Space Tools screen
You need two web-items, for Space Tools (5.0 themes) and Space Admin (pre-5.0 themes). If the screen should only be visible to space admins, you will need to use a Condition to check this.
For this example, we will also declare an action:
The action must extend SpaceAdminAction, this will check whether the user has permissions for the space:
The template needs two decorators:
- spaceadminpanel: Valid for Space Tools (for the new 5.0 themes) and Space Admin (in pre-5.0 themes).
- spacecontentpanel: Valid for Space Tools (new 5.0 themes) and Space Operations (pre-5.0 themes).
- spacetoolspanels: Valid for Space Tools only.
Here is the result:
The example above is also compatible with the Doc Theme and other pre-5.0 themes: