Issue Details (XML | Word | Printable)

Key: CONF-6853
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: Dan Hardiker
Votes: 1
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Confluence

Page and Space decorators need a catch all mode for $context and $mode

Created: 24/Aug/06 04:48 PM   Updated: 30/Oct/06 07:01 PM
Component/s: Plugins, Templates, Web Interface
Affects Version/s: 2.2.5
Fix Version/s: 2.2.10

Time Tracking:
Not Specified

Participants: Agnes Ro [Atlassian], Dan Hardiker, David Peterson, Guy Fraser [Adaptavist.com] and Mike Cannon-Brookes [Atlassian]
Since last comment: 2 years, 10 weeks, 1 day ago
Resolution Date: 19/Sep/06 01:26 AM
Labels:


 Description  « Hide
Currently I can add a web-item to system.page to add a new tab (e.g. Translate). I have have that web-item link to my action and have the velocity output contain the following:

#applyDecorator("root")
#decoratorParam("helper" $action.helper)
#decoratorParam("mode" "translate")
#decoratorParam("context" "page")

The problem is that the page.vmd is hardwired to understand certain modes (view, edit, attachments, info) and it doesnt have a catch-all "else" to just dump the contents of $body out. It just drops the body out completely - a similar thing happens in the space.vmd too.

To make things worse, the "current" tab is selected based on matching $mode against the $item.key - so even if I surrender to rendering in page mode (and getting last edited by, favourites & comments - which I dont want) it means that the page tab will still be selected regardless!

The solution to this would be to take:

    1. ATTACHMENTS
      #elseif ($mode == "view-attachments" || $mode == "move-attachments")
      $body
      #end

and have

    1. ATTACHMENTS
      #elseif ($mode == "view-attachments" || $mode == "move-attachments")
      $body
    1. CATCH ALL
      #elseif
      $body
      #end

Instead - do similar for space.vmd, but that needs both the $context and the various $mode if's in them having the catch all's applied. There may be other areas across the decorators which suffer the same limitation.

With this extension I can actually start to use web-item's for page and space tabs in plugins!



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Guy Fraser [Adaptavist.com] added a comment - 25/Aug/06 03:51 AM
+1873819237!

We could do sooooo much more useful stuff if we had this information at page level.

Also, it would be rather useful if the Login screen had a context and mode!


Mike Cannon-Brookes [Atlassian] added a comment - 25/Aug/06 10:48 AM
Guys ,

Will make sure this gets snuck into 2.3. Looks like a simple enough change.

What do you mean by the login screen?

m


Agnes Ro [Atlassian] added a comment - 19/Sep/06 01:26 AM
Fixed. Added the 'else' mode to pages for default and left nav themes to display the content body.

Dan Hardiker added a comment - 19/Sep/06 03:11 AM
Has the space.vmd also been done? Similar effects happen there with plugable sections.

David Peterson added a comment - 30/Oct/06 07:01 PM
Also the Personal Profile area is broken currently. Has this been confirmed as fixed?