Changes for page Macros

Last modified by Ecaterina Moraru on 2013/11/13 15:45

From version 1.1
edited by Administrator
on 2008/11/05 15:50
Change comment: There is no comment for this version
To version 11.1
edited by Ecaterina Moraru
on 2013/11/13 15:45
Change comment: Moved page to http://design.xwiki.org/xwiki/bin/view/Mockups/Macros

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +xwiki:XWiki.risherry
Content
... ... @@ -1,49 +1,1 @@
1 -#macro(licenseViolationWarning)
2 - #set($mockups=$xwiki.mockups)
3 - #if($xwiki.hasAccessLevel('admin'))
4 - #set($licenseURL=$xwiki.getURL("Mockups.MockupsLicenseInfo", "view"))
5 - #set($licenseLink="If you bought a license, <a href=${licenseURL}>click here</a> to register.")
6 - #else
7 - #set($licenseLink="")
8 - #end
9 - #if($mockups.isTrial())
10 - #if($mockups.isTrialExpired())
11 - <div style="background-color:#fcc;text-align:center;clear:both;width:400px;margin:0px auto;">
12 - <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}
13 - </div>
14 - #else
15 - <div style="background-color:#fcc;text-align:center;clear:both;width:400px;margin:0px auto;">
16 - <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}
17 - </div>
18 - #end
19 - #else
20 - #if(!$mockups.isUserCountValid())
21 - <div style="background-color:#fcc;text-align:center;clear:both;width:400px;margin:0px auto;">
22 - <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}
23 - </div>
24 - #end
25 - #end
26 -#end
27 -
28 -#macro(mockup $name)
29 - #set($mockups=$xwiki.mockups)
30 - #set($hasEdit=$xwiki.hasAccessLevel('edit'))
31 - #set($png=false)
32 - #set($xml=false)
33 - #set($png=$doc.getAttachment("${name}.png"))
34 - #set($xml=$doc.getAttachment("${name}.bmml"))
35 - #if($png and $xml)
36 - <div align="center">
37 - {image:${name}.png|halign=center|alt=$name}
38 - #if($mockups.canLoadEditor() and $hasEdit)<a href="$xwiki.getURL($doc.fullName, "loadeditor", "mockup=$name")">edit this mockup</a>#end
39 - </div>
40 - #else
41 - #if(!$png)
42 - <div class="error"><span class="error">Mockup image file ${name}.png not found. Did someone delete it?</span></div>
43 - #end
44 - #if(!$xml)
45 - <div class="error"><span class="error">Mockup bmml file ${name}.bmml not found. Did someone delete it?</span></div>
46 - #end
47 - #end
48 - #licenseViolationWarning()
49 -#end
1 +{{warning}}Moved to [[design.xwiki.org:Mockups.Macros>>http://design.xwiki.org/xwiki/bin/view/Mockups/Macros]]{{/warning}}