This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

Edit Dashboard Plugin

Name Edit Dashboard Plugin
Version 1.0.0
Vendor SGCIB
Author(s)
  • Florent GERBOD
  • Kedar LEE
  • François FEY
Contact
Price free
License Open Source (LGPL)
Download JAR editDashboard-1.0.0.jar
Source Control  

Description

This plugin

allow you to edit a html section for Home page of each space.
This section is displayed at top of the home page and editable only by those who can edit the page.

The Html section is written in a vm file on the server at path data/velocity

Downloading & Installing

  • Download from above the plugin jar.
  • Install the plugin through Confluence's plugin upload feature.
  • Edit the page.vmd file (in your theme or not) as specified below

you have to add the following line in page.vmd

#parse("vm/editspacedashboardinclude.vm")

Add it at top of div with "wiki-content" class, like below

page.vmd
...
<div class="wiki-content">
  #parse("vm/editspacedashboardinclude.vm")
  $body
</div>
...

Screenshots

Developer information

Web item

The link in system.page section is added by a web-item as below.

<web-item key="edit-dashboard" name="editDashboardInclude" section="system.page" weight="40">
  <label key="Edit Dashboard" />
  <link><![CDATA[/editdashboard/editdashboard.action?key=$helper.spaceKey&decoratorName=customSpaceDashboard.vmd&pageId=$helper.page.id]]></link>
  <condition class="com.sgcib.confluence.macros.EditDashboard.EditDashboardCondition">
    <param name="permission">edit</param>
  </condition>
</web-item>

The EditDashboardCondition class extends PagePermissionCondition class. The web-item is visible only if user is on home page et can edit the page.

Package action "editDashboardActions"

<xwork name="editDashboardActions" key="editDashboardActions">
  <package name="editdashboard" extends="default" namespace="/editdashboard">
    <default-interceptor-ref name="defaultStack" />
    <action name="editdashboard" class="com.sgcib.confluence.macros.EditDashboard.EditDashboardAction" method="doRead">
      <result name="success" type="velocity">/vm/editdashboard.vm</result>
    </action>
    <action name="doeditdashboard" class="com.sgcib.confluence.macros.EditDashboard.EditDashboardAction" method="doWrite">
      <result name="success" type="redirect">/display/${key}</result>
    </action>
    <action name="doresetdashboard" class="com.sgcib.confluence.macros.EditDashboard.EditDashboardAction" method="doReset">
      <result name="success" type="redirect">/display/${key}</result>
    </action>
  </package>
</xwork>

This package contains 3 actions which allow edition of html/velocity section  :

  • editdashboard : load vm file in edit form. (editdashboardadmin.vm)
  • doeditdashboard : save vm file on disk. (editdashboard.vm)
  • doresetdashboard : delete vm file.

Class Java

please see [javadoc|http://]

Bugs

Please report bugs in comments.

Labels

plugin plugin Delete
confluence22 confluence22 Delete
non-repository non-repository Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 10, 2007

    M Dhivya says:

    Hi,  when i trying ot upload the jar file, it throws the following error ...

    Hi,

     when i trying ot upload the jar file, it throws the following error

    There was an error opening the downloaded file as a JAR: C:\confluence\temp\editDashboard-1.0.0.jar

    With Regards,

    Dhivya.M

  2. May 30, 2008

    Eric Bardoux says:

    Hi, I'm using Confluence 2.7.3, and i can't have this plug-in working. If i fo...

    Hi,

    I'm using Confluence 2.7.3, and i can't have this plug-in working.

    If i follow the installation step, it's ok, i have the "edit dashboard" button, i can edit it, save it (i've checked that it's stored in /datas/velocity/[wikikey])

    But the #parse does not seem to work -> only the wiki content is displayed. Nothing in the logs.

    So i've tried to extract your vm content, and copy/paste it in my "page" layout.

    #if ($helper.space.getHomePage().getId() == $helper.page.id)
     #if ($editDashHelper.hasDecorator($helper.space.key, "customSpaceDashboard.vmd"))
      #parse ("/$helper.space.key/customSpaceDashboard.vmd")
     #end
    #end

    Then i have an exception :

    org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/sandbox/customSpaceDashboard.vmd'
     

    Any idea?

    thanks

    Eric