Changes for page Macros
Last modified by Ecaterina Moraru on 2013/11/13 15:45
From version 11.1
edited by Ecaterina Moraru
on 2013/11/13 15:45
on 2013/11/13 15:45
Change comment:
Moved page to http://design.xwiki.org/xwiki/bin/view/Mockups/Macros
To version 3.1
edited by Jean-Vincent Drean
on 2008/11/20 12:48
on 2008/11/20 12:48
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki.r isherry1 +xwiki:XWiki.jvdrean - Content
-
... ... @@ -1,1 +1,53 @@ 1 -{{warning}}Moved to [[design.xwiki.org:Mockups.Macros>>http://design.xwiki.org/xwiki/bin/view/Mockups/Macros]]{{/warning}} 1 +1 XWiki Enterprise Design Mockups 2 + 3 +#macro(licenseViolationWarning) 4 + #set($mockups=$xwiki.mockups) 5 + #if($xwiki.hasAccessLevel('admin')) 6 + #set($licenseURL=$xwiki.getURL("Mockups.MockupsLicenseInfo", "view")) 7 + #set($licenseLink="If you bought a license, <a href=${licenseURL}>click here</a> to register.") 8 + #else 9 + #set($licenseLink="") 10 + #end 11 + #if($mockups.isTrial()) 12 + #if($mockups.isTrialExpired()) 13 + <div style="background-color:#fcc;text-align:center;clear:both;width:400px;margin:0px auto;"> 14 + <b>EVALUATION LICENSE EXPIRED</b> - <a href="http://www.balsamiq.com/products/mockups/xwiki">buy Balsamiq Mockups now</a> to continue editing your mockups. ${licenseLink} 15 + </div> 16 + #else 17 + <div style="background-color:#fcc;text-align:center;clear:both;width:400px;margin:0px auto;"> 18 + <b>EVALUATION LICENSE</b> - Are you enjoying Balsamiq Mockups? Please consider <a href="http://www.balsamiq.com/products/mockups/xwiki">purchasing it</a> today. ${licenseLink} 19 + </div> 20 + #end 21 + #else 22 + #if(!$mockups.isUserCountValid()) 23 + <div style="background-color:#fcc;text-align:center;clear:both;width:400px;margin:0px auto;"> 24 + <b>End User License Agreement Violation</b>: your license for Balsamiq Mockups is for ${mockups.maxUserCount} users, but the [Mockups.BalsamiqMockupsEditors] group contains ${mockups.currentUserCount} members. You must either remove some users from the group or <a href="http://www.balsamiq.com/products/mockups/xwiki#upgrades">upgrade your license</a>. ${licenseLink} 25 + </div> 26 + #end 27 + #end 28 +#end 29 + 30 +#macro(mockup $name) 31 + #set($mockups=$xwiki.mockups) 32 + #set($hasEdit=$xwiki.hasAccessLevel('edit')) 33 + #set($png=false) 34 + #set($xml=false) 35 + #set($png=$doc.getAttachment("${name}.png")) 36 + #set($xml=$doc.getAttachment("${name}.bmml")) 37 + #if($png and $xml) 38 + 1.1 $name 39 + 40 + <div align="center"> 41 + {image:${name}.png|halign=center|alt=$name} 42 + #if($mockups.canLoadEditor() and $hasEdit)<a href="$xwiki.getURL($doc.fullName, "loadeditor", "mockup=$name")">edit this mockup</a>#end 43 + </div> 44 + #else 45 + #if(!$png) 46 + <div class="error"><span class="error">Mockup image file ${name}.png not found. Did someone delete it?</span></div> 47 + #end 48 + #if(!$xml) 49 + <div class="error"><span class="error">Mockup bmml file ${name}.bmml not found. Did someone delete it?</span></div> 50 + #end 51 + #end 52 + #licenseViolationWarning() 53 +#end