jQuery.template("add-content-roles",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div id="edit-content-roles-dialog" >  '),typeof roles!="undefined"&&roles!=null&&$.each(typeof roles=="function"?roles.call($item):roles,function(n,$value){with(this)__.push('   <label><input type="checkbox" value="'),typeof $value!="undefined"&&$value!=null&&__.push($.encode(typeof $value=="function"?$value.call($item):$value)),__.push('" '),typeof(rolesCount[$value]&&rolesCount[$value]==usersCount)!="undefined"&&(rolesCount[$value]&&rolesCount[$value]==usersCount)!=null&&(typeof(rolesCount[$value]&&rolesCount[$value]==usersCount)=="function"?(rolesCount[$value]&&rolesCount[$value]==usersCount).call($item):rolesCount[$value]&&rolesCount[$value]==usersCount)&&__.push('checked="checked"'),__.push("/>&nbsp;"),typeof $value!="undefined"&&$value!=null&&__.push($.encode(typeof $value=="function"?$value.call($item):$value)),__.push("<\/label><br />  ")}),__.push("  <\/div>");return __});jQuery.template("admin-page-user-list",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof(users.length>0)!="undefined"&&users.length>0!=null&&(typeof(users.length>0)=="function"?(users.length>0).call($item):users.length>0)?(__.push('    <table id="user-header-table">   <thead>    <tr>     '),typeof(mode=="community")!="undefined"&&mode=="community"!=null&&(typeof(mode=="community")=="function"?(mode=="community").call($item):mode=="community")?(__.push('      <th style="width: 5%"><\/th>      <th style="width: 3%"><input type="checkbox" id="allChecked" /><\/th>      <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","User"))),__.push('<\/th>      <th style="width: 15%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Social accounts"))),__.push('<\/th>      <th style="width: 15%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Role"))),__.push('<\/th>      <th style="width: 14%">       '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Status"))),__.push('       <div class="info">        <div class="info-tooltip">         <p><b>'),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","Invited")),__.push("<\/b> - "),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","E-mail invitation was sent to user")),__.push("<\/p>         <p><b>"),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","Verification pending")),__.push("<\/b> - "),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","User has not yet verified e-mail")),__.push("<\/p>         <p><b>"),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","Active")),__.push("<\/b> - "),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","User registration is complete")),__.push("<\/p>         <p><b>"),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","Suspended")),__.push("<\/b> - "),typeof $.R2!="undefined"&&$.R2!=null&&__.push($.R2("~/Tmpl/sys/admin/admin-page-user-list.htm","No access; password error or Admin choice")),__.push('<\/p>        <\/div>       <\/div>      <\/th>      <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Registered"))),__.push('<\/th>      <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Last signed in"))),__.push("<\/th>     ")):typeof(mode=="business")!="undefined"&&mode=="business"!=null&&(typeof(mode=="business")=="function"?(mode=="business").call($item):mode=="business")?(__.push('      <th style="width: 3%"><\/th>      <th style="width: 9%"><\/th>      <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Name"))),__.push('<\/th>      <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Email"))),__.push("<\/th>     ")):!0&&(__.push('      <th style="width: 5%"><\/th>      <th style="width: 9%"><\/th>      <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Name"))),__.push('<\/th>      <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Email"))),__.push('<\/th>      <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Registered"))),__.push('<\/th>      <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Last signed in"))),__.push('<\/th>      <th style="width: 12%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Status"))),__.push('<\/th>      <th style="width: 8%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Role"))),__.push("<\/th>     ")),__.push('    <\/tr>   <\/thead>  <\/table>    <div class="user-table-container">   <table id="user-base-table">    <thead>     <tr>      '),typeof(mode=="community")!="undefined"&&mode=="community"!=null&&(typeof(mode=="community")=="function"?(mode=="community").call($item):mode=="community")?(__.push('       <th style="width: 5%"><\/th>       <th style="width: 3%"><\/th>       <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","User"))),__.push('<\/th>       <th style="width: 15%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Social accounts"))),__.push('<\/th>       <th style="width: 15%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Role"))),__.push('<\/th>       <th style="width: 14%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Status"))),__.push('<\/th>       <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Registered"))),__.push('<\/th>       <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Last signed in"))),__.push("<\/th>      ")):typeof(mode=="business")!="undefined"&&mode=="business"!=null&&(typeof(mode=="business")=="function"?(mode=="business").call($item):mode=="business")?(__.push('       <th style="width: 3%"><\/th>       <th style="width: 9%"><\/th>       <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Name"))),__.push('<\/th>       <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Email"))),__.push("<\/th>      ")):!0&&(__.push('       <th style="width: 5%"><\/th>       <th style="width: 9%"><\/th>       <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Name"))),__.push('<\/th>       <th style="width: 20%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Email"))),__.push('<\/th>       <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Registered"))),__.push('<\/th>       <th style="width: 13%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Last signed in"))),__.push('<\/th>       <th style="width: 12%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Status"))),__.push('<\/th>       <th style="width: 8%">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Role"))),__.push("<\/th>      ")),__.push("     <\/tr>    <\/thead>    <tbody>     "),typeof users!="undefined"&&users!=null&&$.each(typeof users=="function"?users.call($item):users,function(n,$value){with(this)__.push("     <tr>      "),typeof(mode=="community")!="undefined"&&mode=="community"!=null&&(typeof(mode=="community")=="function"?(mode=="community").call($item):mode=="community")?(__.push("      "),typeof($value.marker=="")!="undefined"&&$value.marker==""!=null&&(typeof($value.marker=="")=="function"?($value.marker=="").call($item):$value.marker=="")?__.push('      <td class="group-gray-point marker-td"><img src="/img/v2/dsbrowser/gray-point.png" alt="" /><\/td>      '):!0&&(__.push('      <td id="'),typeof $value.marker.replace!="undefined"&&$value.marker.replace!=null&&__.push($.encode($value.marker.replace(" ","-"))),__.push('" class="marker-td">'),typeof $value.marker!="undefined"&&$value.marker!=null&&__.push($.encode(typeof $value.marker=="function"?$value.marker.call($item):$value.marker)),__.push("<\/td>      ")),__.push('      <td>       <input type="checkbox" value="'),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" class="userCheckbox" />      <\/td>      <td>       <a href="'),typeof userProfileUrl!="undefined"&&userProfileUrl!=null&&__.push($.encode(typeof userProfileUrl=="function"?userProfileUrl.call($item):userProfileUrl)),__.push(""),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" target="_blank" class="username">'),typeof $value.firstName!="undefined"&&$value.firstName!=null&&__.push($.encode(typeof $value.firstName=="function"?$value.firstName.call($item):$value.firstName)),__.push(" "),typeof $value.lastName!="undefined"&&$value.lastName!=null&&__.push($.encode(typeof $value.lastName=="function"?$value.lastName.call($item):$value.lastName)),__.push('<\/a>       <label class="user-email">'),typeof $value.email!="undefined"&&$value.email!=null&&__.push($.encode(typeof $value.email=="function"?$value.email.call($item):$value.email)),__.push('<\/label>      <\/td>      <td>       <div class="social-accounts">        <div class="'),typeof $value.hasFacebookSocialAccount!="undefined"&&$value.hasFacebookSocialAccount!=null&&(typeof $value.hasFacebookSocialAccount=="function"?$value.hasFacebookSocialAccount.call($item):$value.hasFacebookSocialAccount)?__.push("facebook"):!0&&__.push("no-facebook"),__.push(' account"><\/div>        <div class="'),typeof $value.hasGoogleSocialAccount!="undefined"&&$value.hasGoogleSocialAccount!=null&&(typeof $value.hasGoogleSocialAccount=="function"?$value.hasGoogleSocialAccount.call($item):$value.hasGoogleSocialAccount)?__.push("google"):!0&&__.push("no-google"),__.push(' account"><\/div>        <div class="'),typeof $value.hasLinkedInSocialAccount!="undefined"&&$value.hasLinkedInSocialAccount!=null&&(typeof $value.hasLinkedInSocialAccount=="function"?$value.hasLinkedInSocialAccount.call($item):$value.hasLinkedInSocialAccount)?__.push("linkedin"):!0&&__.push("no-linkedin"),__.push(' account"><\/div>       <\/div>      <\/td>      <td>       '),typeof($value.role==0||$value.role=="None")!="undefined"&&($value.role==0||$value.role=="None")!=null&&(typeof($value.role==0||$value.role=="None")=="function"?($value.role==0||$value.role=="None").call($item):$value.role==0||$value.role=="None")&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Pending Approval"))),__.push("<\/span>")),__.push("       "),typeof($value.role==1||$value.role=="Read")!="undefined"&&($value.role==1||$value.role=="Read")!=null&&(typeof($value.role==1||$value.role=="Read")=="function"?($value.role==1||$value.role=="Read").call($item):$value.role==1||$value.role=="Read")&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Visitor"))),__.push("<\/span>")),__.push("       "),typeof($value.role==2||$value.role=="Write")!="undefined"&&($value.role==2||$value.role=="Write")!=null&&(typeof($value.role==2||$value.role=="Write")=="function"?($value.role==2||$value.role=="Write").call($item):$value.role==2||$value.role=="Write")&&(__.push("       "),typeof($value.roles&&$value.roles.indexOf("Data Manager")>=0)!="undefined"&&($value.roles&&$value.roles.indexOf("Data Manager")>=0)!=null&&(typeof($value.roles&&$value.roles.indexOf("Data Manager")>=0)=="function"?($value.roles&&$value.roles.indexOf("Data Manager")>=0).call($item):$value.roles&&$value.roles.indexOf("Data Manager")>=0)?(__.push("       <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Data Manager"))),__.push("<\/span>       ")):!0&&(__.push("       <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Contributor"))),__.push("<\/span>       ")),__.push("       ")),__.push("       "),typeof($value.role==4||$value.role=="Full")!="undefined"&&($value.role==4||$value.role=="Full")!=null&&(typeof($value.role==4||$value.role=="Full")=="function"?($value.role==4||$value.role=="Full").call($item):$value.role==4||$value.role=="Full")&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Manager"))),__.push("<\/span>")),__.push("       "),typeof $value.roles!="undefined"&&$value.roles!=null&&(typeof $value.roles=="function"?$value.roles.call($item):$value.roles)&&__.push("<br />"),__.push("       "),typeof $value.roles!="undefined"&&$value.roles!=null&&$.each(typeof $value.roles=="function"?$value.roles.call($item):$value.roles,function(n,$value){with(this)__.push("       "),typeof($value!="Data Manager")!="undefined"&&$value!="Data Manager"!=null&&(typeof($value!="Data Manager")=="function"?($value!="Data Manager").call($item):$value!="Data Manager")&&(__.push('       <span class="content-role">'),typeof $value!="undefined"&&$value!=null&&__.push($.encode(typeof $value=="function"?$value.call($item):$value)),__.push(";<\/span>       ")),__.push("       ")}),__.push("      <\/td>      <td>       "),typeof($value.status==0)!="undefined"&&$value.status==0!=null&&(typeof($value.status==0)=="function"?($value.status==0).call($item):$value.status==0)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Active"))),__.push("<\/span>")),__.push("       "),typeof($value.status==1)!="undefined"&&$value.status==1!=null&&(typeof($value.status==1)=="function"?($value.status==1).call($item):$value.status==1)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Invited"))),__.push("<\/span>")),__.push("       "),typeof($value.status==2)!="undefined"&&$value.status==2!=null&&(typeof($value.status==2)=="function"?($value.status==2).call($item):$value.status==2)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Pending Approval"))),__.push("<\/span>")),__.push("       "),typeof($value.status==3)!="undefined"&&$value.status==3!=null&&(typeof($value.status==3)=="function"?($value.status==3).call($item):$value.status==3)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Suspended"))),__.push("<\/span>")),__.push("       "),typeof($value.status==4)!="undefined"&&$value.status==4!=null&&(typeof($value.status==4)=="function"?($value.status==4).call($item):$value.status==4)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Merged"))),__.push("<\/span>")),__.push("       "),typeof($value.status==5)!="undefined"&&$value.status==5!=null&&(typeof($value.status==5)=="function"?($value.status==5).call($item):$value.status==5)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Verification pending"))),__.push("<\/span>")),__.push("      <\/td>      <td>"),typeof $value.createdOn!="undefined"&&$value.createdOn!=null&&__.push($.encode(typeof $value.createdOn=="function"?$value.createdOn.call($item):$value.createdOn)),__.push("<\/td>      <td>"),typeof $value.lastLoggedOn!="undefined"&&$value.lastLoggedOn!=null&&__.push($.encode(typeof $value.lastLoggedOn=="function"?$value.lastLoggedOn.call($item):$value.lastLoggedOn)),__.push("<\/td>      ")):typeof(mode=="business")!="undefined"&&mode=="business"!=null&&(typeof(mode=="business")=="function"?(mode=="business").call($item):mode=="business")?(__.push('      <td>       <input type="checkbox" value="'),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" class="userCheckbox" />      <\/td>      <td>       <a href="'),typeof userProfileUrl!="undefined"&&userProfileUrl!=null&&__.push($.encode(typeof userProfileUrl=="function"?userProfileUrl.call($item):userProfileUrl)),__.push(""),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" target="_blank">        <img src="'),typeof $value.pictureUrl!="undefined"&&$value.pictureUrl!=null&&__.push($.encode(typeof $value.pictureUrl=="function"?$value.pictureUrl.call($item):$value.pictureUrl)),__.push('" width="50" height="50" alt="" />       <\/a>      <\/td>      <td><a href="'),typeof userProfileUrl!="undefined"&&userProfileUrl!=null&&__.push($.encode(typeof userProfileUrl=="function"?userProfileUrl.call($item):userProfileUrl)),__.push(""),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" target="_blank">'),typeof $value.firstName!="undefined"&&$value.firstName!=null&&__.push($.encode(typeof $value.firstName=="function"?$value.firstName.call($item):$value.firstName)),__.push(" "),typeof $value.lastName!="undefined"&&$value.lastName!=null&&__.push($.encode(typeof $value.lastName=="function"?$value.lastName.call($item):$value.lastName)),__.push("<\/a><\/td>      <td>"),typeof $value.email!="undefined"&&$value.email!=null&&__.push($.encode(typeof $value.email=="function"?$value.email.call($item):$value.email)),__.push("<\/td>      ")):typeof(mode=="knoema")!="undefined"&&mode=="knoema"!=null&&(typeof(mode=="knoema")=="function"?(mode=="knoema").call($item):mode=="knoema")&&(__.push("      "),typeof($value.marker=="")!="undefined"&&$value.marker==""!=null&&(typeof($value.marker=="")=="function"?($value.marker=="").call($item):$value.marker=="")?__.push('      <td class="group-gray-point marker-td"><img src="/img/v2/dsbrowser/gray-point.png" alt="" /><\/td>      '):!0&&(__.push('      <td id="'),typeof $value.marker.replace!="undefined"&&$value.marker.replace!=null&&__.push($.encode($value.marker.replace(" ","-"))),__.push('" class="marker-td">'),typeof $value.marker!="undefined"&&$value.marker!=null&&__.push($.encode(typeof $value.marker=="function"?$value.marker.call($item):$value.marker)),__.push("<\/td>      ")),__.push('      <td>       <a href="'),typeof userProfileUrl!="undefined"&&userProfileUrl!=null&&__.push($.encode(typeof userProfileUrl=="function"?userProfileUrl.call($item):userProfileUrl)),__.push(""),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" target="_blank">        <img src="'),typeof $value.pictureUrl!="undefined"&&$value.pictureUrl!=null&&__.push($.encode(typeof $value.pictureUrl=="function"?$value.pictureUrl.call($item):$value.pictureUrl)),__.push('" width="50" height="50" alt="" />       <\/a>      <\/td>      <td><a href="'),typeof userProfileUrl!="undefined"&&userProfileUrl!=null&&__.push($.encode(typeof userProfileUrl=="function"?userProfileUrl.call($item):userProfileUrl)),__.push(""),typeof $value.key!="undefined"&&$value.key!=null&&__.push($.encode(typeof $value.key=="function"?$value.key.call($item):$value.key)),__.push('" target="_blank">'),typeof $value.firstName!="undefined"&&$value.firstName!=null&&__.push($.encode(typeof $value.firstName=="function"?$value.firstName.call($item):$value.firstName)),__.push(" "),typeof $value.lastName!="undefined"&&$value.lastName!=null&&__.push($.encode(typeof $value.lastName=="function"?$value.lastName.call($item):$value.lastName)),__.push("<\/a><\/td>      <td>"),typeof $value.email!="undefined"&&$value.email!=null&&__.push($.encode(typeof $value.email=="function"?$value.email.call($item):$value.email)),__.push("<\/td>      <td>"),typeof $value.createdOn!="undefined"&&$value.createdOn!=null&&__.push($.encode(typeof $value.createdOn=="function"?$value.createdOn.call($item):$value.createdOn)),__.push("<\/td>      <td>"),typeof $value.lastLoggedOn!="undefined"&&$value.lastLoggedOn!=null&&__.push($.encode(typeof $value.lastLoggedOn=="function"?$value.lastLoggedOn.call($item):$value.lastLoggedOn)),__.push("<\/td>      <td>       "),typeof($value.status==0)!="undefined"&&$value.status==0!=null&&(typeof($value.status==0)=="function"?($value.status==0).call($item):$value.status==0)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Valid"))),__.push("<\/span>")),__.push("       "),typeof($value.status==1)!="undefined"&&$value.status==1!=null&&(typeof($value.status==1)=="function"?($value.status==1).call($item):$value.status==1)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","New"))),__.push("<\/span>")),__.push("       "),typeof($value.status==2)!="undefined"&&$value.status==2!=null&&(typeof($value.status==2)=="function"?($value.status==2).call($item):$value.status==2)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Pending Approval"))),__.push("<\/span>")),__.push("       "),typeof($value.status==3)!="undefined"&&$value.status==3!=null&&(typeof($value.status==3)=="function"?($value.status==3).call($item):$value.status==3)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Locked"))),__.push("<\/span>")),__.push("       "),typeof($value.status==4)!="undefined"&&$value.status==4!=null&&(typeof($value.status==4)=="function"?($value.status==4).call($item):$value.status==4)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Merged"))),__.push("<\/span>")),__.push("       "),typeof($value.status==5)!="undefined"&&$value.status==5!=null&&(typeof($value.status==5)=="function"?($value.status==5).call($item):$value.status==5)&&(__.push("<span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Verifying"))),__.push("<\/span>")),__.push("      <\/td>      <td>       "),typeof $value.isAdmin!="undefined"&&$value.isAdmin!=null&&(typeof $value.isAdmin=="function"?$value.isAdmin.call($item):$value.isAdmin)?(__.push("       <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","Admin"))),__.push("<\/span>       ")):!0&&(__.push("       <span>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","User"))),__.push("<\/span>       ")),__.push("      <\/td>      ")),__.push("     <\/tr>     ")}),__.push("    <\/tbody>   <\/table>  <\/div>  ")):!0&&(__.push("  "),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/admin-page-user-list.htm","No Users found."))),__.push("  ")),__.push("");return __});jQuery.template("admin-users-chars",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof chars!="undefined"&&chars!=null&&$.each(typeof chars=="function"?chars.call($item):chars,function(n,$value){with(this)__.push('  <a href="'),typeof $value!="undefined"&&$value!=null&&__.push($.encode(typeof $value=="function"?$value.call($item):$value)),__.push('">'),typeof $value!="undefined"&&$value!=null&&__.push($.encode(typeof $value=="function"?$value.call($item):$value)),__.push("<\/a>  ")}),__.push("");return __});jQuery.template("admin-users-dates",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof dates!="undefined"&&dates!=null&&$.each(typeof dates=="function"?dates.call($item):dates,function(n,$value){with(this)__.push('  <a href="'),typeof $value.name.replace!="undefined"&&$value.name.replace!=null&&__.push($.encode($value.name.replace(" ","-"))),__.push('" data-value="'),typeof $value.value!="undefined"&&$value.value!=null&&__.push($.encode(typeof $value.value=="function"?$value.value.call($item):$value.value)),__.push('">'),typeof $value.name!="undefined"&&$value.name!=null&&__.push($.encode(typeof $value.name=="function"?$value.name.call($item):$value.name)),__.push("<\/a>  ")}),__.push("");return __});jQuery.template("atlas-duplicates",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<table class="knoema-table">  <thead>   <tr>    <th>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/atlas-duplicates.htm","Locale"))),__.push("<\/th>    <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/atlas-duplicates.htm","Scope"))),__.push("<\/th>    <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/atlas-duplicates.htm","Text"))),__.push("<\/th>    <th>"),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/atlas-duplicates.htm","Translation"))),__.push("<\/th>   <\/tr>  <\/thead>  <tbody>   "),typeof duplicates!="undefined"&&duplicates!=null&&$.each(typeof duplicates=="function"?duplicates.call($item):duplicates,function(n,item){with(this)__.push("   <tr>    <td>"),typeof item.Locale!="undefined"&&item.Locale!=null&&__.push($.encode(typeof item.Locale=="function"?item.Locale.call($item):item.Locale)),__.push("<\/td>    <td>"),typeof item.Scope!="undefined"&&item.Scope!=null&&__.push($.encode(typeof item.Scope=="function"?item.Scope.call($item):item.Scope)),__.push("<\/td>    <td>"),typeof item.Text!="undefined"&&item.Text!=null&&__.push($.encode(typeof item.Text=="function"?item.Text.call($item):item.Text)),__.push("<\/td>    <td>"),typeof item.Translation!="undefined"&&item.Translation!=null&&__.push($.encode(typeof item.Translation=="function"?item.Translation.call($item):item.Translation)),__.push("<\/td>   <\/tr>   ")}),__.push("  <\/tbody> <\/table>");return __});jQuery.template("datasets-storage-statistics-item",function(n,$item){var $=n,__=[],$data=$item.data;with($data)__.push(""),typeof($data.state=ActionState==0?"Ok":ActionState==1?"Waiting":ActionState==2?"Running":"Failed","")!="undefined"&&($data.state=ActionState==0?"Ok":ActionState==1?"Waiting":ActionState==2?"Running":"Failed","")!=null&&__.push($.encode(typeof($data.state=ActionState==0?"Ok":ActionState==1?"Waiting":ActionState==2?"Running":"Failed","")=="function"?($data.state=ActionState==0?"Ok":ActionState==1?"Waiting":ActionState==2?"Running":"Failed","").call($item):($data.state=ActionState==0?"Ok":ActionState==1?"Waiting":ActionState==2?"Running":"Failed",""))),__.push(" "),typeof($data.title=ActionState==0?"":!ActionMessage||ActionMessage.length==0?state:ActionMessage,"")!="undefined"&&($data.title=ActionState==0?"":!ActionMessage||ActionMessage.length==0?state:ActionMessage,"")!=null&&__.push($.encode(typeof($data.title=ActionState==0?"":!ActionMessage||ActionMessage.length==0?state:ActionMessage,"")=="function"?($data.title=ActionState==0?"":!ActionMessage||ActionMessage.length==0?state:ActionMessage,"").call($item):($data.title=ActionState==0?"":!ActionMessage||ActionMessage.length==0?state:ActionMessage,""))),__.push(' <tr data-id="'),typeof DatasetId!="undefined"&&DatasetId!=null&&__.push($.encode(typeof DatasetId=="function"?DatasetId.call($item):DatasetId)),__.push('" data-fg="'),typeof Filegroup!="undefined"&&Filegroup!=null&&__.push($.encode(typeof Filegroup=="function"?Filegroup.call($item):Filegroup)),__.push('" class="'),typeof state!="undefined"&&state!=null&&__.push($.encode(typeof state=="function"?state.call($item):state)),__.push('" title="'),typeof title!="undefined"&&title!=null&&__.push($.encode(typeof title=="function"?title.call($item):title)),__.push('">  <td>   '),typeof(ActionState==1||ActionState==2)!="undefined"&&(ActionState==1||ActionState==2)!=null&&(typeof(ActionState==1||ActionState==2)=="function"?(ActionState==1||ActionState==2).call($item):ActionState==1||ActionState==2)?__.push('    <input type="checkbox" disabled="disabled" />   '):!0&&__.push('    <input type="checkbox" />   '),__.push('  <\/td>  <td><a href="'),typeof((Community?"//"+Community+"."+window.location.hostname:"")+"/"+DatasetId)!="undefined"&&(Community?"//"+Community+"."+window.location.hostname:"")+"/"+DatasetId!=null&&__.push($.encode(typeof((Community?"//"+Community+"."+window.location.hostname:"")+"/"+DatasetId)=="function"?((Community?"//"+Community+"."+window.location.hostname:"")+"/"+DatasetId).call($item):(Community?"//"+Community+"."+window.location.hostname:"")+"/"+DatasetId)),__.push('" target="_blank">'),typeof DatasetId!="undefined"&&DatasetId!=null&&__.push($.encode(typeof DatasetId=="function"?DatasetId.call($item):DatasetId)),__.push("<\/a><\/td>  <td>"),typeof Community!="undefined"&&Community!=null&&__.push($.encode(typeof Community=="function"?Community.call($item):Community)),__.push("<\/td>  <td>"),typeof Filegroup!="undefined"&&Filegroup!=null&&__.push($.encode(typeof Filegroup=="function"?Filegroup.call($item):Filegroup)),__.push("<\/td>  <td>"),typeof Math.round!="undefined"&&Math.round!=null&&__.push($.encode(Math.round(UsedSpaceKb/1024))),__.push("<\/td>  <td>"),typeof Math.round!="undefined"&&Math.round!=null&&__.push($.encode(Math.round(TotalSpaceKb/1024))),__.push("<\/td> <\/tr>");return __});jQuery.template("datasets-storage-statistics",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<table id="datasets" class="knoema-table">  <thead>   <tr>    <th><\/th>    <th>Dataset<\/th>    <th>Community<\/th>    <th>Filegroup<\/th>    <th>Space Used (MB)<\/th>    <th>Space Total (MB)<\/th>   <\/tr>  <\/thead>   <tbody>   '),typeof Datasets!="undefined"&&Datasets!=null&&$.each(typeof Datasets=="function"?Datasets.call($item):Datasets,function(n,item){with(this)__.push("    "),!0&&(__=__.concat($item.nest("datasets-storage-statistics-item",item))),__.push("   ")}),__.push('  <\/tbody>   <tfoot>   <tr>    <th><\/th>    <th colspan="4">Total:<\/th>    <th>'),typeof Math.round!="undefined"&&Math.round!=null&&__.push($.encode(Math.round(SelectionSizeKb/1024))),__.push(" / "),typeof Math.round!="undefined"&&Math.round!=null&&__.push($.encode(Math.round(DatabaseSizeKb/1024))),__.push("<\/th>   <\/tr>  <\/tfoot> <\/table>");return __});jQuery.template("edit-feature",function(n,t){var $=n,__=[],i=t.data;with(i)__.push('<div id="edit-feature-dialog" title="Edit Feature">   <div class="error-message">'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","Please enter a fraction between 0 and 1 for A-B ratio."))),__.push('<\/div>   <div class="feature-id">    <span>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","ID:"))),__.push('<\/span>&nbsp;<span id="id-placeholder"><\/span>   <\/div>   <div class="feature-name">    <span>'),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","Name:"))),__.push('<\/span>&nbsp;<span id="name-placeholder"><\/span>   <\/div>   <div id="status-placeholder">    <div class="distribution-status">     '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","Distribution Status:"))),__.push('    <\/div>    <div id="distribution-modes">     <input type="radio" name="distribution-status" id="globally-off" value="globally-off" />     <label for="globally-off">      '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","Globally Off"))),__.push('<\/label>     <br />     <input type="radio" name="distribution-status" id="globally-on" value="globally-on" />     <label for="globally-on">      '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","Globally On"))),__.push('<\/label>     <br />     <div id="selected-user-option">      <input type="radio" name="distribution-status" id="selected-users" value="selected-users" />      <label for="selected-users">       '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","Selected Users"))),__.push('<\/label>      <div id="domain-users-option">       <input type="checkbox" name="distribution-status" id="domain-users" value="domain-users" />       <label for="domain-users">        '),typeof $.R!="undefined"&&$.R!=null&&__.push($.encode($.R("~/Tmpl/sys/admin/edit-feature.htm","All users with email knoema.com"))),__.push("<\/label>      <\/div>     <\/div>    <\/div>   <\/div>  <\/div>");return __});jQuery.template("experiment-variants",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof variants!="undefined"&&variants!=null&&(typeof variants=="function"?variants.call($item):variants)?(__.push('  <table>   <thead>    <tr>     <th>      Name     <\/th>     <th class="number">      Sessions     <\/th>     <th class="number">      Conversion     <\/th>     <th class="number">      Probability     <\/th>     <th class="number">      Value Remaining     <\/th>    <\/tr>   <\/thead>   <tbody>    '),typeof variants!="undefined"&&variants!=null&&$.each(typeof variants=="function"?variants.call($item):variants,function(n,item){with(this)__.push('     <tr>      <td class="title">       '),typeof item.id!="undefined"&&item.id!=null&&__.push($.encode(typeof item.id=="function"?item.id.call($item):item.id)),__.push('      <\/td>      <td class="number">       '),typeof item.sessions!="undefined"&&item.sessions!=null&&__.push($.encode(typeof item.sessions=="function"?item.sessions.call($item):item.sessions)),__.push('      <\/td>      <td class="number">       '),typeof item.conversion!="undefined"&&item.conversion!=null&&__.push($.encode(typeof item.conversion=="function"?item.conversion.call($item):item.conversion)),__.push('      <\/td>      <td class="number">       '),typeof item.probability!="undefined"&&item.probability!=null&&__.push($.encode(typeof item.probability=="function"?item.probability.call($item):item.probability)),__.push('      <\/td>      <td class="number">       '),typeof item.valueRemaining!="undefined"&&item.valueRemaining!=null&&__.push($.encode(typeof item.valueRemaining=="function"?item.valueRemaining.call($item):item.valueRemaining)),__.push("      <\/td>     <\/tr>    ")}),__.push("   <\/tbody>  <\/table> ")):!0&&__.push("  There are no variants. "),__.push("");return __});jQuery.template("experiments",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof experiments.length!="undefined"&&experiments.length!=null&&(typeof experiments.length=="function"?experiments.length.call($item):experiments.length)?(__.push("  <table>   <thead>    <tr>     <th>      Id     <\/th>     <th>      Description     <\/th>     <th>      Status     <\/th>     <th>      Start Date     <\/th>     <th>      End Date     <\/th>    <\/tr>   <\/thead>   <tbody>    "),typeof experiments!="undefined"&&experiments!=null&&$.each(typeof experiments=="function"?experiments.call($item):experiments,function(n,item){with(this)__.push('     <tr>      <td>       <a href="/sys/admin/experiments?id='),typeof item.id!="undefined"&&item.id!=null&&__.push($.encode(typeof item.id=="function"?item.id.call($item):item.id)),__.push('">'),typeof item.id!="undefined"&&item.id!=null&&__.push($.encode(typeof item.id=="function"?item.id.call($item):item.id)),__.push('<\/a>      <\/td>      <td class="title">       '),typeof item.description!="undefined"&&item.description!=null&&__.push($.encode(typeof item.description=="function"?item.description.call($item):item.description)),__.push("      <\/td>      <td>       "),typeof item.state!="undefined"&&item.state!=null&&__.push($.encode(typeof item.state=="function"?item.state.call($item):item.state)),__.push("      <\/td>      <td>       "),typeof item.startDate!="undefined"&&item.startDate!=null&&__.push($.encode(typeof item.startDate=="function"?item.startDate.call($item):item.startDate)),__.push("      <\/td>      <td>       "),typeof item.endDate!="undefined"&&item.endDate!=null&&__.push($.encode(typeof item.endDate=="function"?item.endDate.call($item):item.endDate)),__.push("      <\/td>     <\/tr>    ")}),__.push("   <\/tbody>  <\/table> ")):!0&&__.push("  There are no experiments. "),__.push("");return __});jQuery.template("log-filelist",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<table id="filelist-table" class="knoema-table">  <thead>   <tr>    <th>Name<\/th>    <th>Size(Kb)<\/th>    <th>Stamp<\/th>   <\/tr>  <\/thead>   <tbody>   '),typeof files!="undefined"&&files!=null&&$.each(typeof files=="function"?files.call($item):files,function(n,item){with(this)__.push("    <tr>     <td>"),typeof item.name!="undefined"&&item.name!=null&&__.push($.encode(typeof item.name=="function"?item.name.call($item):item.name)),__.push("<\/td>     <td>"),typeof item.size!="undefined"&&item.size!=null&&__.push($.encode(typeof item.size=="function"?item.size.call($item):item.size)),__.push("<\/td>     <td>"),typeof item.stamp!="undefined"&&item.stamp!=null&&__.push($.encode(typeof item.stamp=="function"?item.stamp.call($item):item.stamp)),__.push("<\/td>    <\/tr>   ")}),__.push("  <\/tbody> <\/table>");return __});jQuery.template("promo-regions",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof regions!="undefined"&&regions!=null&&$.each(typeof regions=="function"?regions.call($item):regions,function(i,region){with(this)__.push('  <span id="'),typeof region.id!="undefined"&&region.id!=null&&__.push($.encode(typeof region.id=="function"?region.id.call($item):region.id)),__.push('">'),typeof region.name!="undefined"&&region.name!=null&&__.push($.encode(typeof region.name=="function"?region.name.call($item):region.name)),__.push("<\/span>"),typeof(i<regions.length-1)!="undefined"&&i<regions.length-1!=null&&(typeof(i<regions.length-1)=="function"?(i<regions.length-1).call($item):i<regions.length-1)&&__.push(","),__.push("   ")}),__.push("");return __});jQuery.template("promo",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div class="promo">     <input type="hidden" id="key" value="'),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('" />      <div class="prop">    <label for="tags">Tags<\/label>    <ul class="tagit"><\/ul>    <input type="hidden" id="tags" value="'),typeof tags!="undefined"&&tags!=null&&__.push($.encode(typeof tags=="function"?tags.call($item):tags)),__.push('" />   <\/div>     <div class="prop">    <label id="regions">Regions<\/label>    <div class="region-list">     '),!0&&(__=__.concat($item.nest("promo-regions",{regions:regions}))),__.push('    <\/div><a class="region-selector action ui-button">Select regions<\/a>   <\/div>     <div class="prop">    <label for="id">Id<\/label>    <input id="id" value="'),typeof id!="undefined"&&id!=null&&__.push($.encode(typeof id=="function"?id.call($item):id)),__.push('" />   <\/div>     <div class="prop">    <label for="variants">Variants<\/label>    <select id="variants">     '),typeof variants!="undefined"&&variants!=null&&$.each(typeof variants=="function"?variants.call($item):variants,function(i,variant){with(this)__.push('     <option value="'),typeof i!="undefined"&&i!=null&&__.push($.encode(typeof i=="function"?i.call($item):i)),__.push('">'),typeof variant.name!="undefined"&&variant.name!=null&&__.push($.encode(typeof variant.name=="function"?variant.name.call($item):variant.name)),__.push("<\/option>     ")}),__.push('    <\/select>    <input id="new-variant" /><a id="ok" class="action ui-button">OK<\/a>    '),typeof!active!="undefined"&&!active!=null&&(typeof!active=="function"?(!active).call($item):!active)&&__.push('    <a id="add-variant" class="action ui-button">Add variant<\/a>&nbsp;<a id="remove-variant" class="action ui-button">Remove variant<\/a>    '),__.push('   <\/div>     <div class="prop">    <label for="url">Url<\/label>    <input id="url" value="'),typeof url!="undefined"&&url!=null&&__.push($.encode(typeof url=="function"?url.call($item):url)),__.push('" />   <\/div>     <div class="prop">    <label for="title">Title<\/label>    <input id="title" value="'),typeof variants[0].title!="undefined"&&variants[0].title!=null&&__.push($.encode(typeof variants[0].title=="function"?variants[0].title.call($item):variants[0].title)),__.push('" />   <\/div>     <div class="prop">    <label for="description">Description<\/label>    <textarea id="description">'),typeof variants[0].description!="undefined"&&variants[0].description!=null&&__.push($.encode(typeof variants[0].description=="function"?variants[0].description.call($item):variants[0].description)),__.push('<\/textarea>   <\/div>     <div class="prop">    <label for="buttonText">Button text<\/label>    <input id="buttonText" value="'),typeof(variants[0].buttonText||"Try now")!="undefined"&&(variants[0].buttonText||"Try now")!=null&&__.push($.encode(typeof(variants[0].buttonText||"Try now")=="function"?(variants[0].buttonText||"Try now").call($item):variants[0].buttonText||"Try now")),__.push('" />   <\/div>     <div class="prop" id="product-promotion">    <label>Preview<\/label>    <div id="preview">     <div class="product-promo">      <div class="column">       <h4>'),typeof variants[0].title!="undefined"&&variants[0].title!=null&&__.push($.encode(typeof variants[0].title=="function"?variants[0].title.call($item):variants[0].title)),__.push("<\/h4>       <p>"),typeof variants[0].description!="undefined"&&variants[0].description!=null&&__.push($.encode(typeof variants[0].description=="function"?variants[0].description.call($item):variants[0].description)),__.push('<\/p>      <\/div>      <div class="column">       <a href="'),typeof url!="undefined"&&url!=null&&__.push($.encode(typeof url=="function"?url.call($item):url)),__.push('" target="_blank">'),typeof(variants[0].buttonText||"Try now")!="undefined"&&(variants[0].buttonText||"Try now")!=null&&__.push($.encode(typeof(variants[0].buttonText||"Try now")=="function"?(variants[0].buttonText||"Try now").call($item):variants[0].buttonText||"Try now")),__.push('<\/a>      <\/div>     <\/div>    <\/div>   <\/div>     <div class="prop">    <input type="checkbox" id="active" '),typeof active!="undefined"&&active!=null&&(typeof active=="function"?active.call($item):active)&&__.push(" checked"),__.push(' />    <label for="active">Active<\/label>   <\/div>     <div class="prop">    <a href="#" id="save-promo" class="ui-button">Save promo<\/a>    <div class="error"><\/div>   <\/div>  <\/div>');return __});jQuery.template("promos",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof promos.length!="undefined"&&promos.length!=null&&(typeof promos.length=="function"?promos.length.call($item):promos.length)&&(__.push("   <table>    <thead>     <tr>      <th>Name<\/th>      <th>Tags<\/th>      <th>Active<\/th>      <th><\/th>     <\/tr>    <\/thead>    <tbody>     "),typeof promos!="undefined"&&promos!=null&&$.each(typeof promos=="function"?promos.call($item):promos,function(){with(this)__.push("      <tr>       <td>"),typeof variants[0].title!="undefined"&&variants[0].title!=null&&__.push($.encode(typeof variants[0].title=="function"?variants[0].title.call($item):variants[0].title)),__.push("<\/td>       <td>"),typeof tags!="undefined"&&tags!=null&&__.push($.encode(typeof tags=="function"?tags.call($item):tags)),__.push("<\/td>       <td>"),typeof active!="undefined"&&active!=null&&(typeof active=="function"?active.call($item):active)?__.push("Yes"):!0&&__.push("No"),__.push('<\/td>       <td><a class="edit-promo" href="#" data-key="'),typeof key!="undefined"&&key!=null&&__.push($.encode(typeof key=="function"?key.call($item):key)),__.push('">Edit<\/a><\/td>      <\/tr>     ')}),__.push("    <\/tbody>   <\/table>  ")),__.push("");return __});jQuery.template("select-feature-items",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div>      <label class="mtl-checkbox">          <input class="mtl-checkbox-input" type="checkbox" value="'),typeof id!="undefined"&&id!=null&&__.push($.encode(typeof id=="function"?id.call($item):id)),__.push('" id="'),typeof id!="undefined"&&id!=null&&__.push($.encode(typeof id=="function"?id.call($item):id)),__.push('" '),typeof checked!="undefined"&&checked!=null&&(typeof checked=="function"?checked.call($item):checked)&&__.push('                 checked="checked"                 '),__.push(' />          <span class="mtl-checkbox-bg"><\/span>      <\/label>      <label for="'),typeof id!="undefined"&&id!=null&&__.push($.encode(typeof id=="function"?id.call($item):id)),__.push('">'),typeof name!="undefined"&&name!=null&&__.push($.encode(typeof name=="function"?name.call($item):name)),__.push("<\/label>  <\/div>");return __});jQuery.template("select-feature",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push('<div title="Select Features">   <p>    Please select the features you want to enable for '),typeof firstName!="undefined"&&firstName!=null&&__.push($.encode(typeof firstName=="function"?firstName.call($item):firstName)),__.push(" "),typeof lastName!="undefined"&&lastName!=null&&__.push($.encode(typeof lastName=="function"?lastName.call($item):lastName)),__.push('.<\/p>   <div class="items">   <\/div>  <\/div>');return __});jQuery.template("universities",function(n,$item){var $=n,__=[],t=$item.data;with(t)__.push(""),typeof universities.length!="undefined"&&universities.length!=null&&(typeof universities.length=="function"?universities.length.call($item):universities.length)?(__.push('  <table>   <thead>    <tr>     <th>      Name     <\/th>     <th>      Country     <\/th>     <th>      URL     <\/th>     <th>      Status     <\/th>     <th title="Registered / approved">      '),typeof userLabel!="undefined"&&userLabel!=null&&__.push($.encode(typeof userLabel=="function"?userLabel.call($item):userLabel)),__.push("     <\/th>    <\/tr>   <\/thead>   <tbody>    "),typeof universities!="undefined"&&universities!=null&&$.each(typeof universities=="function"?universities.call($item):universities,function(n,item){with(this)__.push('    <tr>     <td class="title">      <a href="/sys/admin/University?key='),typeof item.key!="undefined"&&item.key!=null&&__.push($.encode(typeof item.key=="function"?item.key.call($item):item.key)),__.push('">'),typeof item.name!="undefined"&&item.name!=null&&__.push($.encode(typeof item.name=="function"?item.name.call($item):item.name)),__.push('<\/a>     <\/td>     <td class="country">      '),typeof item.country!="undefined"&&item.country!=null&&__.push($.encode(typeof item.country=="function"?item.country.call($item):item.country)),__.push('     <\/td>     <td class="url">      <a href="'),typeof item.web_page!="undefined"&&item.web_page!=null&&__.push($.encode(typeof item.web_page=="function"?item.web_page.call($item):item.web_page)),__.push('" target="_blank">'),typeof item.web_page!="undefined"&&item.web_page!=null&&__.push($.encode(typeof item.web_page=="function"?item.web_page.call($item):item.web_page)),__.push('<\/a>     <\/td>     <td class="status">      '),typeof item.status!="undefined"&&item.status!=null&&__.push($.encode(typeof item.status=="function"?item.status.call($item):item.status)),__.push('     <\/td>     <td>      <a href="/sys/admin/users#role=Education&university='),typeof item.key!="undefined"&&item.key!=null&&__.push($.encode(typeof item.key=="function"?item.key.call($item):item.key)),__.push('">'),typeof item.registeredUsers!="undefined"&&item.registeredUsers!=null&&__.push($.encode(typeof item.registeredUsers=="function"?item.registeredUsers.call($item):item.registeredUsers)),__.push('<\/a> / <a href="/sys/admin/users#role=Education&university='),typeof item.key!="undefined"&&item.key!=null&&__.push($.encode(typeof item.key=="function"?item.key.call($item):item.key)),__.push('&status=Approved">'),typeof item.approvedUsers!="undefined"&&item.approvedUsers!=null&&__.push($.encode(typeof item.approvedUsers=="function"?item.approvedUsers.call($item):item.approvedUsers)),__.push("<\/a>     <\/td>    <\/tr>    ")}),__.push("   <\/tbody>  <\/table>  ")):!0&&__.push("   There are no organizations.  "),__.push("");return __})