From version < 2.1
edited by Xwiki Admin
on 2019/10/17 11:07
To version 1.1 >
edited by Xwiki Admin
on 2018/03/14 16:00
Change comment: Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/10.0]

Summary

Details

Page properties
Syntax
... ... @@ -1,1 +1,1 @@
1 -XWiki 2.1
1 +XWiki 2.0
Content
... ... @@ -1,31 +1,20 @@
1 -{{include reference="AppWithinMinutes.VelocityMacros"/}}
1 +{{include reference="AppWithinMinutes.WizardStep"/}}
2 2  
3 -{{velocity}}
4 -#if ($request.wizard == 'true')
5 - {{include reference="AppWithinMinutes.WizardStep"/}}
6 -#end
7 -{{/velocity}}
8 -
9 9  {{template name="locationPicker_macros.vm" /}}
10 10  
11 11  {{velocity output="false"}}
12 -#macro (showStep)
6 +#macro(showStep)
7 + {{html wiki="true"}}
13 13   #appWizardHeader('name')
14 - <div class="wizard-help">
15 - <p>
16 - <strong>$services.localization.render('platform.appwithinminutes.wizardStepHelpTitle')</strong>
17 - $services.localization.render('platform.appwithinminutes.wizardStepHelpDescription')
18 - </p>
19 - <ul class="steps vertical">
20 - #foreach($step in $awmSteps)
21 - <li>
22 - <span class="number">$mathtool.add($foreach.index, 1)</span>
23 - <span class="name">$services.localization.render("appWithinMinutes.wizardStep.${step}.name")</span>
24 - <span class="description">$services.localization.render("appWithinMinutes.wizardStep.${step}.description")</span>
25 - </li>
26 - #end
27 - </ul>
28 - </div>
9 + (% class="wizard-help" %)
10 + (((
11 + **$services.localization.render('platform.appwithinminutes.wizardStepHelpTitle')** $services.localization.render('platform.appwithinminutes.wizardStepHelpDescription')
12 + (% class="steps vertical" %)
13 + #foreach($step in $awmSteps)
14 + * (% class="number" %)$mathtool.add($foreach.index, 1)(%%) (% class="name" %)$services.localization.render("appWithinMinutes.wizardStep.${step}.name")(%%)
15 + (% class="description" %)$services.localization.render("appWithinMinutes.wizardStep.${step}.description")
16 + #end
17 + )))
29 29   <form action="$doc.getURL()" method="post" class="xform wizard-body">
30 30   #locationPicker({
31 31   'id': 'app',
... ... @@ -49,6 +49,7 @@
49 49   <div class="appName-preview"></div>
50 50   #appWizardFooter(1)
51 51   </form>
41 + {{/html}}
52 52  #end
53 53  
54 54  #macro (processStep)
... ... @@ -56,9 +56,10 @@
56 56   #getAppReference
57 57   #getAppDescriptor($appReference)
58 58   #if ($appDescriptor)
59 - ## Edit an existing application.
60 - #getAppClassReference($appDescriptor)
61 - #set ($appClassRef = $classReference)
49 + ## Edit an existing application. Use the configured class name.
50 + #set ($appClassRef = $appDescriptor.getObject($appDescriptorClassName).getValue('class'))
51 + ## The class reference is relative to the document holding the application descriptor.
52 + #set ($appClassRef = $services.model.resolveDocument($appClassRef, 'explicit', $appDescriptor.documentReference))
62 62   #else
63 63   ## Create a new application. Use the default class name.
64 64   #set ($appCodeRef = $services.model.createSpaceReference('Code', $appReference))
... ... @@ -79,29 +79,28 @@
79 79  #macro (validateAppName)
80 80   #getAppReference
81 81   #if (!$appReference)
82 - <span class="xErrorMsg">$services.localization.render('platform.appwithinminutes.appNameEmptyError')</span>
73 + (% class="xErrorMsg" %)$services.localization.render('platform.appwithinminutes.appNameEmptyError')
83 83   #else
84 84   #getAppDescriptor($appReference)
85 85   #if ($appDescriptor)
86 86   ## Edit an existing application.
87 - #getAppClassReference($appDescriptor)
88 - #set ($appClassRef = $classReference)
78 + #set ($appDescriptorObj = $appDescriptor.getObject($appDescriptorClassName))
79 + #set ($appClassRef = $appDescriptorObj.getValue('class'))
80 + ## The class reference is relative to the document holding the application descriptor.
81 + #set ($appClassRef = $services.model.resolveDocument($appClassRef, 'explicit', $appDescriptor.documentReference))
89 89   #else
90 90   ## Create a new application.
91 91   #set ($appCodeRef = $services.model.createSpaceReference('Code', $appReference))
92 92   #set ($appClassRef = $services.model.createDocumentReference("$!{appReference.name}Class", $appCodeRef))
93 93   #end
94 - <dl>
95 - <dt>$services.localization.render('platform.appwithinminutes.appNamePreviewHomePageUrlLabel')</dt>
96 - <dd><pre>$!escapetool.xml($xwiki.getDocument($appReference).externalURL)</pre></dd>
97 - <dt>$services.localization.render('platform.appwithinminutes.appNamePreviewCodeSpaceLabel')</dt>
98 - <dd>#hierarchy($appClassRef.parent)</dd>
99 - </dl>
87 + ; $services.localization.render('platform.appwithinminutes.appNamePreviewHomePageUrlLabel')
88 + : {{{$!xwiki.getDocument($appReference).externalURL}}}
89 + ; $services.localization.render('platform.appwithinminutes.appNamePreviewCodeSpaceLabel')
90 + : {{html clean="false"}}#hierarchy($appClassRef.parent){{/html}}
100 100   #set ($appHomeRef = $services.model.resolveDocument('', 'default', $appReference))
101 101   #if ($appDescriptor || $xwiki.exists($appHomeRef) || $xwiki.exists($appClassRef))
102 - <div class="box warningmessage">
103 - $services.localization.render('platform.appwithinminutes.appNameIsUsedWarning')
104 - </div>
93 +
94 + {{warning}}$services.localization.render('platform.appwithinminutes.appNameIsUsedWarning'){{/warning}}
105 105   #end
106 106   #end
107 107  #end
... ... @@ -127,14 +127,11 @@
127 127   #set ($appDescriptors = $services.query.xwql($appDescriptorStatement).bindValue('space', $localSpaceReference).execute())
128 128   #if ($appDescriptors.size() > 0)
129 129   #set ($appDescriptor = $xwiki.getDocument($appDescriptors.get(0)))
130 - #else
131 - #set ($appDescriptor = $NULL)
132 132   #end
133 133  #end
134 134  {{/velocity}}
135 135  
136 136  {{velocity}}
137 -{{html clean="false"}}
138 138  #if ("$!request.appName" != '')
139 139   #if ($xcontext.action == 'get')
140 140   #validateAppName
... ... @@ -142,9 +142,8 @@
142 142   ## CSRF protection is not needed because this step only redirects to the next one passing data in the query string.
143 143   #processStep
144 144   #end
145 -#elseif ($request.wizard == 'true')
132 +#else
146 146   #showStep
147 - #set ($displayDocExtra = false)
148 148  #end
149 -{{/html}}
135 +#set ($displayDocExtra = false)
150 150  {{/velocity}}

Step 1 — Name your application

  • 1 Name
  • 2 Structure
  • 3 Entries
  • 4 Presentation
Steps This wizard will guide you through the process of creating an application. These are the steps you'll take:
  • 1 Name Choose the application name
  • 2 Structure Describe the application data
  • 3 Entries Choose where to store the data
  • 4 Presentation Customize the application home page
The application name determines the homepage URL and the location where the application code is stored.
The location in the page hierarchy where the application will be created.

My Recent Modifications

Need help?

If you need help with XWiki you can contact:

----------------------------