How can I get the Browse->Space Directory output to include the Space Administrator?

Sami Moran July 23, 2012

I'd like my Space Directory listing to include the same information as your documentation site does. See https://confluence.atlassian.com/spacedirectory/view.action .

To access this view on your documentation site, click Browse->Space Directory.

We're currently running Confluence 4.04.

Thanks!

2 answers

1 accepted

3 votes
Answer accepted
Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2012

You need to change the Space Directory bundled plugin in order to do that. Go to <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup and open "atlassian-bundled-plugins.zip" file. Locate "confluence-space-directory-4.x.jar" and open it using an archiving utility. In templates folder, there are two files that you need to edit.

space-directory.vm

This template displays what is shown in the Space Directory. Locate the code below at line 55:

&lt;span class="column-heading desc-heading"&gt;$i18n.getText("description.name")&lt;/span&gt;

and add the following code below it:

&lt;span class="column-heading admins-heading"&gt;Space Administrators&lt;/span&gt;

space-item.vm

Locate the code below at line 11-13:

&lt;div class="entity-attribute space-desc"&gt;
        &lt;span&gt;$generalUtil.htmlEncode($desc)&lt;/span&gt;
    &lt;/div&gt;

and add the following code below it:

&lt;div class="entity-attribute space-admin"&gt;
        &lt;span&gt;
		#set ($permissions = $space.getPermissions())
		
		#foreach ($permission in $permissions)
			#if ($permission.getType() == "SETSPACEPERMISSIONS" &amp;&amp; $permission.getUserName())
			&lt;a href="/display/~$permission.getUserName()" class="url fn confluence-userlink userlink-0" data-username="$permission.getUserName()" title="" data-user-hover-bound="true"&gt;$userAccessor.getUserIfAvailable($permission.getUserName()).getFullName()&lt;/a&gt;
			#end
		#end
		
		&lt;/span&gt;
    &lt;/div&gt;

You'll find the links below useful:

0 votes
Sami Moran October 9, 2012

Thank you for the info! Very helpful!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events