Change comment:
Install extension [com.xwiki.store:application-store-ui-1.9]
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.A dmin1 +XWiki.AlexCotiuga - Content
-
... ... @@ -2,9 +2,16 @@ 2 2 3 3 {{velocity output="false"}} 4 4 #macro (getPriceMatrix $skus) 5 + ## Make sure the rows are sorted by support level. 5 5 #set ($priceMatrix = { 6 6 'columns': $collectionstool.sortedSet, 7 - 'rows': $collectionstool.orderedMap 8 + 'rows': { 9 + 'bronze': {}, 10 + 'silver': {}, 11 + 'gold': {}, 12 + 'platinum': {}, 13 + 'diamond': {} 14 + } 8 8 }) 9 9 #foreach ($sku in $skus) 10 10 #set ($support = "$!sku.support") ... ... @@ -20,6 +20,13 @@ 20 20 #set ($discard = $priceMatrix.columns.add($users)) 21 21 #end 22 22 #end 30 + #set ($emptyRows = []) 31 + #foreach ($entry in $priceMatrix.rows.entrySet()) 32 + #if ($entry.value.isEmpty()) 33 + #set ($discard = $emptyRows.add($entry.key)) 34 + #end 35 + #end 36 + #set ($discard = $priceMatrix.rows.keySet().removeAll($emptyRows)) 23 23 #end 24 24 25 25 #macro (findSKUMatchingCurrentLicense $priceMatrix $minUserCount $currentLicenseDetails) ... ... @@ -149,8 +149,9 @@ 149 149 #set ($currentLicenseDetailsDocument = $xwiki.getDocument($results[0])) 150 150 #set ($oldLicenseDetails = $licenseDetails) 151 151 #readLicenseDetailsFromDocument($currentLicenseDetailsDocument) 152 - ## Check if the best license is still active. 153 - #if ($licenseDetails.expirationDate && $licenseDetails.expirationDate.time > $datetool.date.time) 166 + ## Check if the best license is paid and still active. 167 + #if ($licenseDetails.type == 'paid' && $licenseDetails.expirationDate 168 + && $licenseDetails.expirationDate.time > $datetool.date.time) 154 154 #set ($currentLicenseDetails = $licenseDetails) 155 155 #end 156 156 #set ($licenseDetails = $oldLicenseDetails) ... ... @@ -266,8 +266,13 @@ 266 266 </dl> 267 267 #benefits 268 268 <p> 269 - <input type="submit" class="button btn-success"#if (!$selectedSKU) disabled="disabled" #end 284 + #if ($selectedSKU) 285 + <input type="submit" class="button btn-success" 270 270 value="$escapetool.xml($services.localization.render('store.buyLicense.submit'))"/> 287 + #else 288 + <input type="button" id="requestLicense" class="button btn-success" 289 + value="$escapetool.xml($services.localization.render('store.requestLicense.button'))"/> 290 + #end 271 271 </p> 272 272 </form> 273 273 #end ... ... @@ -296,7 +296,7 @@ 296 296 #accessPurchaseOrderForm($licenseDetails) 297 297 #else 298 298 <h2>Options</h2> 299 - <p>The price varies depending on the support level and the number of users.</p> 319 + <p>The price is per year and varies depending on the support level and the number of users.</p> 300 300 #displayPriceMatrix($priceMatrix $minUserCount $NULL true) 301 301 <h2>Benefits</h2> 302 302 #benefits
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -54,4 +54,17 @@ 54 54 submitButton.prop('disabled', false); 55 55 }); 56 56 }); 57 + 58 + // Request a license 59 + $('#requestLicense').click(function(event) { 60 + var progressNotification = new XWiki.widgets.Notification($jsontool.serialize($services.localization.render( 61 + 'store.requestLicense.button.inProgress')), 'inprogress'); 62 + var url = new XWiki.Document('RequestLicense', 'Store.Code').getURL('get', 'outputSyntax=plain'); 63 + $.post(url, $('form#buyLicense').serialize()).done(function(result) { 64 + progressNotification.replace(new XWiki.widgets.Notification(result.notification, result.status)); 65 + }).fail(function(result) { 66 + progressNotification.replace( 67 + new XWiki.widgets.Notification(result.responseJSON.notification, result.responseJSON.status)); 68 + }); 69 + }); 57 57 });
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -17,5 +17,6 @@ 17 17 } 18 18 19 19 table.prices td.price-euro label:after { 20 - content: ' \20ac'; 20 + content: ' \20ac / year'; 21 + font-weight: 100; 21 21 }