Changes for page homeopathsSheet
Last modified by Jip-jan Alunkel on March 26, 17:31
From version 1.31
edited by Jip-jan Alunkel
on March 07, 22:27
on March 07, 22:27
Change comment:
There is no comment for this version
To version 1.27
edited by Jip-jan Alunkel
on March 07, 19:28
on March 07, 19:28
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -31,29 +31,16 @@ 31 31 #if($xcontext.action == "view") 32 32 <div id="${spaceTitle}" class="box sheet_properties"> 33 33 <h2>Details</h2> 34 -#set($classProperties = { 35 - 'practiceName': {'type': 'string'}, 36 - 'pmStreet': {'type': 'string'}, 37 - 'pmHousenumber': {'type': 'string'}, 38 - 'pmPostcode': {'type': 'string'}, 39 - 'pmCity': {'type': 'string'}, 40 - 'pmCounty': {'type': 'string'}, 41 - 'pmState': {'type': 'string'}, 42 - 'pmCountry': {'type': 'string'}, 43 - 'certification': {'type': 'bool'}, 44 - 'certificationFrom': {'type': 'string'} 45 -}) 46 -#foreach($property in $classProperties.keySet()) 47 - #if($theDocObj.getProperty($property)) 34 +#set($classProperties = ['practiceName','pmStreet','pmHousenumber','pmPostcode','pmCity','pmCounty','pmState','pmCountry','certification','certificationFrom']) 35 +#foreach($property in $classProperties) 48 48 <p class="property"> 49 - ## Difference with added housenumber because of the streetaddress layout.50 - ## Difference with added housenumber because of the streetaddress layout.37 + #if($theDocObj.getProperty($property).value != "" && $property != "pmHousenumber") 38 + #if($property == "pmStreet") 51 51 <span class="property-name">$services.localization.render("homeopaths.classproperty.address")</span> <span class="property-value">$doc.display($property) $doc.display("pmHousenumber")</span> 52 - 40 + #else 53 53 <span class="property-name">$services.localization.render("homeopaths.classproperty.${property}")</span> <span class="property-value">$doc.display($property)</span> 54 - #end 55 - </p> 56 56 #end 43 + </p> 57 57 #end 58 58 #end 59 59 ... ... @@ -74,14 +74,8 @@ 74 74 "use_captcha": "false" 75 75 }) 76 76 #set($thisObj = {}) 77 - #foreach($item in $classProperties .keySet())64 + #foreach($item in $classProperties) 78 78 #set($label = $services.localization.render("homeopaths.classproperty.${item}")) 79 - #if($theDocObj.getProperty($item)) 80 - #set($value = $theDocObj.getProperty($item).value) 81 - #else 82 - #set($value = "") 83 - #end 84 - $classProperties[$item].type 85 85 #set($newElem = { 86 86 "id": "$item", 87 87 "type": "text", ... ... @@ -90,7 +90,7 @@ 90 90 "data-create-xobj" : "true", 91 91 "data-xobj-classname" : "homeopaths.Code.homeopathsClass", 92 92 "data-xobj-fieldname" : "$item", 93 - "value": "$value"74 + "value": '$theDocObj.getProperty($item).value' 94 94 }) 95 95 #set($thisObj["$item"] = $newElem) 96 96 #end