Changes for page Macros

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

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