No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluence - Atlassian Summit 2010

  • Published on
    09-May-2015

  • View
    6.791

  • Download
    1

Embed Size (px)

DESCRIPTION

No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluence Charles Hall, Astrium & Jim Severino, Atlassian

Transcript

  • 1.1

2. No coding necessary Building user macros and dynamic reports inside Conuence Charles HallWiki Project ManagerAstrium 2 3. Who we areEuropes leading satellite manufacturer, number 3 worldwide.www.astrium.eads.net3 4. Agenda What is a user macro? Worked example colored tables Worked example watermark for wiki pages Showcase 4 5. User macros What is a user macro? Added functionality Removes complexity for authors Facilitates re-use Restrictions Used by users but installed by system admins 5 6. User macros Where can they be used? Pages Templates In other user macros But not Custom HTML (administration screen) What do they consist of? HTML Javascript Velocity Template Language (VTL) References to Conuence objects6 7. Complexity vs FunctionalityHigh Effort Capability FunctionalityComplexityHighLowStandard Wiki {html}UserCustom plugins markupmacros7 8. An exampleA performance testing tool {response-time} See your cheat sheet for details of this macro 8 9. Introducing jQueryI thought you said no coding? A Javascript library for simplifying HTML document traversal, event handling, and adding AJAX support easily Already used by Conuence Minimizes Javascript coding9 10. Worked example 1 colored tablesNo more boring tables! 10 11. Worked example 1 colored tables Listing 2## Macro name: color-table ## Macro has a body: N ## Body format: n/a ## Output: HTML ##Comment header ## Developed by: Charles Hall ## Developed for: All users ## Date created: 23/02/2010 ## Installed by: Charles Hall## Apply coloring to alternate rows of tables.11 12. Worked example 1 side effectsTest, test then test some more! 12 13. Firebug to the rescue Pinpoint the table(s) wewant to modifyPoint & Click 13 14. Worked example 1 revised version Listing 2## Macro name: color-table ## Macro has a body: N ## Body format: n/a ## Output: HTML ## ## Developed by: Charles Hall ## Developed for: All users ## Date created: 23/02/2010 ## Installed by: Charles Hall## Apply coloring to alternate rows of any tables with the class of confluenceTable. 14 15. Worked example 1 Accepting parameters{color-table:A2C1D5|BFEBEF}15 16. Worked example 1 Accepting parameters Listing 2 ## Apply coloring to alternate rows of any tables with theclass of confluenceTable. #set($oddcolor= $param0)#set($evencolor= $param1) ## Check for valid odd color, otherwise use default#if (!$oddcolor)#set ($oddcolor="ffffff")#end ## Check for valid even color, otherwise use default#if (!$evencolor)#set ($evencolor="ededed")#end 16 17. Worked Example 2 - Using Conuence objects17 18. Worked example 2 Referencing the image {watermark:draft.gif|no-repeat|1000}Listing 3 #set($image= $param0)#set($repeat = $param1)#set($minheight= $param2)