As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<type name="cm:person">^M <title>Person</title>^M <parent>cm:authority</parent>^M <properties>^M <!– The tokenisation set here is ignored - it is fixed for this type –>^M <!– This is so you can not break person lookup –>^M <property name="cm:userName">^M <type>d:text</type>^M <mandatory>true</mandatory>^M <constraints>^M <constraint ref="cm:userNameConstraint" />^M </constraints>^M </property>^M <property name="cm:homeFolder">^M <type>d:noderef</type>^M <mandatory>true</mandatory>^M </property>^M <property name="cm:firstName">^M <type>d:text</type>^M <mandatory>true</mandatory>^M </property>^M <property name="cm:lastName">^M <type>d:text</type>^M <mandatory>true</mandatory>^M </property>^M <property name="cm:middleName">^M <type>d:text</type>^M </property>^M <property name="cm:email">^M <type>d:text</type>^M </property>^M <property name="cm:organizationId">^M <type>d:text</type>^M </property>^M <property name="cm:homeFolderProvider">^M <type>d:text</type>^M </property>^M <type>d:text</type>^M </property>^M <property name="cm:defaultHomeFolderPath">^M <type>d:text</type>^M </property>^M <property name="cm:presenceProvider">^M <type>d:text</type>^M </property>^M <property name="cm:presenceUsername">^M <type>d:text</type>^M </property>^M <property name="cm:organization">^M <type>d:text</type>^M </property>^M <property name="cm:jobtitle">^M <type>d:text</type>^M </property>^M <property name="cm:location">^M <type>d:text</type>^M </property>^M <property name="cm:persondescription">^M <type>d:content</type>^M </property>^M <property name="cm:telephone">^M <type>d:text</type>^M </property>^M <property name="cm:mobile">^M <type>d:text</type>^M </property>^M <property name="cm:companyaddress1">^M <type>d:text</type>^M </property>^M <property name="cm:companyaddress2">^M <type>d:text</type>^M </property>^M <property name="cm:companyaddress3">^M <type>d:text</type>^M </property>^M <property name="cm:companypostcode">^M <type>d:text</type>^M </property>^M <property name="cm:companytelephone">^M <type>d:text</type>^M </property>^M <property name="cm:companyfax">^M <type>d:text</type>^M </property>^M <property name="cm:companyemail">^M <type>d:text</type>^M </property>^M <property name="cm:skype">^M <type>d:text</type>^M </property>^M <property name="cm:instantmsg">^M <type>d:text</type>^M </property>^M ^M <!– system maintained values –> <property name="cm:sizeCurrent"> <type>d:long</type> <protected>true</protected> <mandatory enforced="true">true</mandatory> </property> <property name="cm:sizeQuota"> <type>d:long</type>^M <protected>true</protected> </property>^M </properties>^M ^M <associations>^M <association name="cm:avatar">^M <source>^M <role>cm:avatarOf</role>^M <mandatory>false</mandatory>^M <many>false</many>^M </source>^M <target>^M <class>cm:content</class>^M <role>cm:hasAvatar</role>^M <mandatory>false</mandatory>^M <many>false</many>^M </target>^M </association>^M </associations>^M </type>^M
<config evaluator="node-type" condition="cm:person"> <property-sheet> <show-property name="cm:telephone" /> </property-sheet> </config>
<type name="custom:person"> <title>Person</title> <parent>cm:authority</parent> <properties> <!– The tokenisation set here is ignored - it is fixed for this type –> <!– This is so you can not break person lookup –> <property name="custom:userName"> <type>d:text</type> <mandatory>true</mandatory> <constraints> <constraint ref="cm:userNameConstraint" /> </constraints> </property> <property name="custom:homeFolder"> <type>d:noderef</type> <mandatory>true</mandatory> </property> <property name="custom:firstName"> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="custom:lastName"> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="custom:middleName"> <type>d:text</type> </property> <property name="custom:email"> <type>d:text</type> </property> <property name="custom:organizationId"> <type>d:text</type> </property> <property name="custom:homeFolderProvider"> <type>d:text</type> </property> <property name="custom:defaultHomeFolderPath"> <type>d:text</type> </property> <property name="custom:presenceProvider"> <type>d:text</type> </property> <property name="custom:presenceUsername"> <type>d:text</type> </property> <property name="custom:organization"> <type>d:text</type> </property> <property name="custom:jobtitle"> <type>d:text</type> </property> <property name="custom:location"> <type>d:text</type> </property> <property name="custom:persondescription"> <type>d:content</type> </property> <property name="custom:telephone"> <type>d:text</type> </property> <property name="custom:mobile"> <type>d:text</type> </property> <property name="custom:companyaddress1"> <type>d:text</type> </property> <property name="custom:companyaddress2"> <type>d:text</type> </property> <property name="custom:companyaddress3"> <type>d:text</type> </property> <property name="custom:companypostcode"> <type>d:text</type> </property> <property name="custom:companytelephone"> <type>d:text</type> </property> <property name="custom:companyfax"> <type>d:text</type> </property> <property name="custom:companyemail"> <type>d:text</type> </property> <property name="custom:skype"> <type>d:text</type> </property> <property name="custom:instantmsg"> <type>d:text</type> </property> <property name="custom:googleusername"> <type>d:text</type> </property> <property name="custom:sizeCurrent"> <type>d:long</type> <protected>true</protected> <mandatory enforced="true">true</mandatory> </property> <property name="custom:sizeQuota"> <type>d:long</type> <protected>true</protected> </property> [b] <!– añado mi propiedad –> <property name="custom:email2"> <type>d:long</type> <protected>true</protected> </property>[/b] </properties> <associations> <association name="custom:avatar"> <source> <role>custom:avatarOf</role> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>cm:content</class> <role>custom:hasAvatar</role> <mandatory>false</mandatory> <many>false</many> </target> </association> </associations> </type>
<config evaluator="node-type" condition="custom:person"> <property-sheet> <show-property name="custom:email2" display-label-id="Email2" /> </property-sheet> </config>
<type name="custom:person"> <title>Person personalizado</title> <parent>cm:person</parent> <properties> <property name="custom:email2"> <type>d:text</type> </property> </properties> </type>
… <properties> <property name="cm:email2"> <type>d:text</type> </property> </properties> …
<script type="text/javascript">//<![CDATA[ var userProfile = new Alfresco.UserProfile("${args.htmlid}").setOptions( { userId: "${user.name}", profile: { isMutable: ${((profile.capabilities.isMutable)!false)?string}, name: "<#if profile.name??>${profile.name?js_string}</#if>", lastName: "<#if profile.lastName??>${profile.lastName?js_string}</#if>", firstName: "<#if profile.firstName??>${profile.firstName?js_string}</#if>", jobtitle: "<#if profile.jobTitle??>${profile.jobTitle?js_string}</#if>", location: "<#if profile.location??>${profile.location?js_string}</#if>", bio: "<#if profile.biography??>${profile.biography?js_string}</#if>", telephone: "<#if profile.telephone??>${profile.telephone?js_string}</#if>", mobile: "<#if profile.mobilePhone??>${profile.mobilePhone?js_string}</#if>", email :"<#if profile.email??>${profile.email?js_string}</#if>", skype: "<#if profile.skype??>${profile.skype?js_string}</#if>", instantmsg: "<#if profile.instantMsg??>${profile.instantMsg?js_string}</#if>", organization: "<#if profile.organization??>${profile.organization?js_string}</#if>", companyaddress1: "<#if profile.companyAddress1??>${profile.companyAddress1?js_string}</#if>", companyaddress2: "<#if profile.companyAddress2??>${profile.companyAddress2?js_string}</#if>", companyaddress3:"<#if profile.companyAddress3??>${profile.companyAddress3?js_string}</#if>", companypostcode: "<#if profile.companyPostcode??>${profile.companyPostcode?js_string}</#if>", companytelephone: "<#if profile.companyTelephone??>${profile.companyTelephone?js_string}</#if>", companyfax: "<#if profile.companyFax??>${profile.companyFax?js_string}</#if>", companyemail: "<#if profile.companyEmail??>${profile.companyEmail?js_string}</#if>", numSS: "<#if profile.numSS??>${profile.numSS?js_string}</#if>" } }).setMessages( ${messages} ); //]]></script> <#assign el=args.htmlid> <#assign displayname=profile.firstName> <#if profile.lastName??><#assign displayname=displayname + " " + profile.lastName></#if> <div id="${el}-body" class="profile"> <div id="${el}-readview" class="hidden"> <#if profile.capabilities.isMutable> <div class="editcolumn"> <div class="btn-edit"><button id="${el}-button-edit" name="edit">${msg("button.editprofile")}</button></div> </div> </#if> <div class="viewcolumn"> <div class="header-bar">${msg("label.about")}</div> <div class="photorow"> <div class="photo"> <img class="photoimg" src="${url.context}<#if profile.properties.avatar??>/proxy/alfresco/api/node/${profile.properties.avatar?replace('://','/')}/content/thumbnails/avatar?c=force<#else>/components/images/no-user-photo-64.png</#if>" alt="" /> </div> <div class="namelabel">${displayname?html}</div> <#if profile.jobTitle?? && profile.jobTitle?length!=0><div class="fieldlabel">${profile.jobTitle?html}</div></#if> <#if profile.organization?? && profile.organization?length!=0><div class="fieldlabel">${profile.organization?html}</div></#if> <#if profile.location?? && profile.location?length!=0><div class="fieldlabel">${profile.location?html}</div></#if> </div> <#if biohtml?? && biohtml?length!=0> <div class="biorow"> <hr/> <div>${biohtml}</div> </div> </#if> <div class="header-bar">${msg("label.contactinfo")}</div> <#if profile.email?? && profile.email?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.email")}:</span> <span class="fieldvalue">${profile.email?html}</span> </div> </#if> <#if profile.telephone?? && profile.telephone?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.telephone")}:</span> <span class="fieldvalue">${profile.telephone?html}</span> </div> </#if> <#if profile.mobilePhone?? && profile.mobilePhone?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.mobile")}:</span> <span class="fieldvalue">${profile.mobilePhone?html}</span> </div> </#if> <#if profile.skype?? && profile.skype?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.skype")}:</span> <span class="fieldvalue">${profile.skype?html}</span> </div> </#if> <#if profile.instantMsg?? && profile.instantMsg?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.im")}:</span> <span class="fieldvalue">${profile.instantMsg?html}</span> </div> </#if> <div class="header-bar">${msg("label.companyinfo")}</div> <#if profile.organization?? && profile.organization?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.name")}:</span> <span class="fieldvalue">${profile.organization?html}</span> </div> </#if> <#if (profile.companyAddress1?? && profile.companyAddress1?length!=0) || (profile.companyAddress2?? && profile.companyAddress2?length!=0) || (profile.companyAddress3?? && profile.companyAddress3?length!=0) || (profile.companyPostcode?? && profile.companyPostcode?length!=0)> <div class="row"> <span class="fieldlabelright">${msg("label.address")}:</span> <span class="fieldvalue"><#if profile.companyAddress1?? && profile.companyAddress1?length!=0>${profile.companyAddress1?html}<br /></#if> <#if profile.companyAddress2?? && profile.companyAddress2?length!=0>${profile.companyAddress2?html}<br /></#if> <#if profile.companyAddress3?? && profile.companyAddress3?length!=0>${profile.companyAddress3?html}<br /></#if> <#if profile.companyPostcode?? && profile.companyPostcode?length!=0>${profile.companyPostcode?html}</#if> </span> </div> </#if> <!– <div class="row"> <span class="fieldlabelright">${msg("label.map")}:</span> <span class="fieldvalue"></span> </div> –> <#if profile.companyTelephone?? && profile.companyTelephone?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.telephone")}:</span> <span class="fieldvalue">${profile.companyTelephone?html}</span> </div> </#if> <#if profile.companyFax?? && profile.companyFax?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.fax")}:</span> <span class="fieldvalue">${profile.companyFax?html}</span> </div> </#if> <#if profile.companyEmail?? && profile.companyEmail?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.email")}:</span> <span class="fieldvalue">${profile.companyEmail?html}</span> </div> </#if> <#if profile.numSS?? && profile.numSS?length!=0> <div class="row"> <span class="fieldlabelright">${msg("label.numSS")}:</span> <span class="fieldvalue">${profile.numSS?html}</span> </div> </#if> </div> </div> <#if profile.capabilities.isMutable> <div id="${el}-editview" class="hidden"> <form id="${htmlid}-form" action="${url.context}/service/components/profile/userprofile" method="post"> <div class="header-bar">${msg("label.about")}</div> <div class="drow"> <div class="reqcolumn"> *</div> <div class="rightcolumn"> <span class="label"><label for="${el}-input-lastName">${msg("label.lastname")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-lastName" value="" /></span> </div> <div class="leftcolumn"> <span class="label"><label for="${el}-input-firstName">${msg("label.firstname")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-firstName" value="" /> *</span> </div> </div> <div class="drow"> <div class="reqcolumn"> </div> <div class="leftcolumn"> <span class="label"><label for="${el}-input-jobtitle">${msg("label.jobtitle")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-jobtitle" value="" /></span> </div> <div class="rightcolumn"> <span class="label"><label for="${el}-input-location">${msg("label.location")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-location" value="" /></span> </div> </div> <!– <div class="drow"> <div class="leftcolumn"> <span class="label">${msg("label.timezone")}:</span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-timezone" /></span> </div> <div class="rightcolumn"> </div> </div> –> <div class="row"> <span class="label"><label for="${el}-input-bio">${msg("label.bio")}:</label></span> <span class="input"><textarea id="${el}-input-bio" name="${el}-text-biography" rows="5" cols="60"></textarea></span> </div> <div class="header-bar">${msg("label.photo")}</div> <div class="photorow"> <div class="photo"> <img class="photoimg" src="${url.context}<#if profile.properties.avatar??>/proxy/alfresco/api/node/${profile.properties.avatar?replace('://','/')}/content/thumbnails/avatar?c=force<#else>/components/images/no-user-photo-64.png</#if>" alt="" /> </div> <div class="photobtn"> <button id="${el}-button-upload" name="upload">${msg("button.upload")}</button> <div class="phototxt">${msg("label.photoimagesize")}</div> <div class="phototxt">${msg("label.photonote")}</div> </div> </div> <div class="header-bar">${msg("label.contactinfo")}</div> <div class="row"> <span class="label"><label for="${el}-input-telephone">${msg("label.telephone")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-telephone" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-mobile">${msg("label.mobile")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-mobile" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-email">${msg("label.email")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-email" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-skype">${msg("label.skype")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-skype" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-instantmsg">${msg("label.im")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-instantmsg" value="" /></span> </div> <div class="header-bar">${msg("label.companyinfo")}</div> <div class="row"> <span class="label"><label for="${el}-input-organization">${msg("label.name")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-organization" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-companyaddress1">${msg("label.address")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companyaddress1" value="" /></span> </div> <div class="row"> <span class="label"></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companyaddress2" value="" /></span> </div> <div class="row"> <span class="label"></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companyaddress3" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-companypostcode">${msg("label.postcode")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companypostcode" value="" /></span> </div> <!– <div class="row"> <span class="label">${msg("label.map")}:</span> <span class="check"><input type="checkbox" id="${el}-input-showmap" /> ${msg("label.showmap")}</span> </div> –> <div class="row"> <span class="label"><label for="${el}-input-companytelephone">${msg("label.telephone")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companytelephone" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-companyfax">${msg("label.fax")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companyfax" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-companyemail">${msg("label.email")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-companyemail" value="" /></span> </div> <div class="row"> <span class="label"><label for="${el}-input-numSS">${msg("label.numSS")}:</label></span> <span class="input"><input type="text" maxlength="256" size="30" id="${el}-input-numSS" value="" /></span> </div> <hr/> <div class="buttons"> <button id="${el}-button-save" name="save">${msg("button.savechanges")}</button> <button id="${el}-button-cancel" name="cancel">${msg("button.cancel")}</button> </div> </form> </div> </#if> </div>
var jsonStr = remote.call('/api/login.json?u=user&pw=password'); //usuario y password del administrador var json = eval('(' + jsonStr + ')'); var data = json['data']; var connector = remote.connect('alfresco'); var result = connector.get('/api/people/'+user.id+'?alf_ticket='+data.ticket); model.person = eval('(' + result + ')');