more refactoring for multiple profile view support
This commit is contained in:
parent
0faa3630c2
commit
867370adb9
26 changed files with 542 additions and 184 deletions
|
@ -3,13 +3,34 @@
|
|||
<#-- Individual profile page template for foaf:Organization individuals (extends individual.ftl in vivo)-->
|
||||
|
||||
<#-- Do not show the link for temporal visualization unless it's enabled -->
|
||||
|
||||
<#if temporalVisualizationEnabled>
|
||||
<#assign classSpecificExtension>
|
||||
<section id="right-hand-column" role="region">
|
||||
<#include "individual-visualizationTemporalGraph.ftl">
|
||||
<#include "individual-visualizationMapOfScience.ftl">
|
||||
</section> <!-- #visualization -->
|
||||
</section> <!-- #right-hand-column -->
|
||||
</#assign>
|
||||
</#if>
|
||||
|
||||
<#include "individual.ftl">
|
||||
<#if individual.mostSpecificTypes?seq_contains("Academic Department")>
|
||||
<#assign departmentalGrantsExtension>
|
||||
<div id="activeGrantsLink">
|
||||
<img src="${urls.base}/images/individual/arrow-green.gif">
|
||||
<a href="${urls.base}/deptGrants?individualURI=${individual.uri}">
|
||||
View all active grants
|
||||
</a>
|
||||
</div>
|
||||
</#assign>
|
||||
|
||||
<#assign departmentalResearchAreas>
|
||||
<#include "individual-dept-research-areas.ftl">
|
||||
</#assign>
|
||||
|
||||
<#assign departmentalMemberships>
|
||||
<#include "individual-dept-memberships.ftl">
|
||||
</#assign>
|
||||
</#if>
|
||||
|
||||
<#include "individual.ftl">
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
<#if !labelCount??>
|
||||
<#assign labelCount = 0 >
|
||||
</#if>
|
||||
<#assign qrCodeIcon = "qr-code-icon.png">
|
||||
<#assign visRequestingTemplate = "foaf-person-2column">
|
||||
<section id="individual-intro" class="vcard person" role="region">
|
||||
<section id="share-contact" role="region">
|
||||
<#-- Image -->
|
||||
|
@ -58,12 +60,13 @@
|
|||
<@p.mostSpecificTypesPerson individual editable/>
|
||||
</#if>
|
||||
</#if>
|
||||
<span class="<#if editable>iconControlsEditable<#else>iconControlsNotEditable</#if>">
|
||||
<span id="iconControlsRightSide" class="<#if editable>iconControlsEditable<#else>iconControlsNotEditable</#if>">
|
||||
<#include "individual-iconControls.ftl">
|
||||
</span>
|
||||
<#if editable && profilePageTypesEnabled >
|
||||
<div id="profileTypeContainer">
|
||||
<h2>Profile type</h2>
|
||||
<!-- The text in this h2 element is set via the wilma.css file -->
|
||||
<h2></h2>
|
||||
<select id="profilePageType">
|
||||
<option value="standard" <#if profileType == "standard" || profileType == "none">selected</#if> >Standard profile view</option>
|
||||
<option value="quickView" <#if profileType == "quickView">selected</#if> >Quick profile view</option>
|
||||
|
@ -84,7 +87,6 @@
|
|||
<#include "individual-researchAreas.ftl">
|
||||
|
||||
<!-- Contact and Webpages -->
|
||||
<!-- VIVO Cornell does not use the contacts properties, so that include has been removed. -->
|
||||
<div id="contactsWebpages">
|
||||
<div id="contactContainer" >
|
||||
<#include "individual-contactInfo-2column.ftl">
|
||||
|
@ -162,7 +164,6 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/indi
|
|||
|
||||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/tiny_mce/tiny_mce.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/amplify/amplify.store.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/json2.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>')}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<#if !labelCount??>
|
||||
<#assign labelCount = 0 >
|
||||
</#if>
|
||||
|
||||
<#assign qrCodeIcon = "qr-code-icon.png">
|
||||
<#assign individualImage>
|
||||
<@p.image individual=individual
|
||||
propertyGroups=propertyGroups
|
||||
|
@ -76,12 +76,13 @@
|
|||
</section> <!-- end label-title -->
|
||||
<#include "individual-adminPanel.ftl">
|
||||
|
||||
<span class="<#if editable >iconControlsEditable<#else>iconControlsNotEditable</#if>">
|
||||
<span id="iconControlsRightSide" class="<#if editable >iconControlsEditable<#else>iconControlsNotEditable</#if>">
|
||||
<#include "individual-iconControls.ftl">
|
||||
</span>
|
||||
<#if editable && profilePageTypesEnabled >
|
||||
<div id="profileTypeContainer" <#if editable>style="margin-top:22px"</#if>>
|
||||
<h2>Profile type</h2>
|
||||
<!-- The text in this h2 element is set via the wilma.css file -->
|
||||
<h2></h2>
|
||||
<select id="profilePageType">
|
||||
<option value="standard" <#if profileType == "standard" || profileType == "none">selected</#if> >Standard profile view</option>
|
||||
<option value="quickView" <#if profileType == "quickView">selected</#if> >Quick profile view</option>
|
||||
|
|
|
@ -8,17 +8,25 @@
|
|||
<#assign individualProductExtension>
|
||||
<#-- Include for any class specific template additions -->
|
||||
${classSpecificExtension!}
|
||||
${departmentalGrantsExtension!}
|
||||
<!--PREINDIVIDUAL OVERVIEW.FTL-->
|
||||
<#include "individual-webpage.ftl">
|
||||
<#include "individual-overview.ftl">
|
||||
${departmentalResearchAreas!}
|
||||
${departmentalMemberships!}
|
||||
</section> <!-- #individual-info -->
|
||||
</section> <!-- #individual-intro -->
|
||||
<!--postindiviudal overiew tfl-->
|
||||
<!--postindividual overview ftl-->
|
||||
|
||||
</#assign>
|
||||
|
||||
<#include "individual-vitro.ftl">
|
||||
|
||||
<script>
|
||||
var individualLocalName = "${individual.localName}";
|
||||
</script>
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual-vivo.css" />')}
|
||||
|
||||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>')}
|
||||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/json2.js"></script>')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/individualUtils.js"></script>')}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<#assign primaryEmail = propertyGroups.pullProperty("${core}primaryEmail")!>
|
||||
<#assign addlEmail = propertyGroups.pullProperty("${core}email")!>
|
||||
|
||||
<#if !editable && (phone?has_content || primaryEmail?has_content || addlEmail?has_content) >
|
||||
<ul style="font-size:0.9em;padding-bottom:4px"><li><strong>Contact Info</strong></li></ul>
|
||||
<#if phone?has_content || primaryEmail?has_content || addlEmail?has_content >
|
||||
<ul style="font-size:1em;padding-bottom:4px"><li><strong>Contact Info</strong></li></ul>
|
||||
</#if>
|
||||
|
||||
<#-- Primary Email -->
|
||||
|
@ -21,10 +21,10 @@
|
|||
<#if phone?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
|
||||
<@p.addLinkWithLabel phone editable />
|
||||
<#if phone.statements?has_content> <#-- if there are any statements -->
|
||||
<ul id="individual-phone" role="list">
|
||||
<ul id="individual-phone" role="list" <#if editable>style="list-style:none;margin-left:0;"</#if>>
|
||||
<#list phone.statements as statement>
|
||||
<li role="listitem">
|
||||
<#-- <img class ="icon-phone middle" src="${urls.images}/individual/phoneIcon.gif" alt="phone icon"/> -->${statement.value}
|
||||
<li role="listitem">
|
||||
${statement.value}
|
||||
<@p.editingLinks "${phone.localName}" statement editable />
|
||||
</li>
|
||||
</#list>
|
||||
|
@ -43,10 +43,9 @@
|
|||
<#if email?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
|
||||
<@p.addLinkWithLabel email editable label/>
|
||||
<#if email.statements?has_content> <#-- if there are any statements -->
|
||||
<ul id="${listId}" class="individual-emails" role="list">
|
||||
<ul id="${listId}" class="individual-emails" role="list" <#if editable>style="list-style:none;margin-left:0;"</#if>>
|
||||
<#list email.statements as statement>
|
||||
<li role="listitem">
|
||||
<#-- <img class ="icon-email middle" src="${urls.images}/individual/emailIcon.gif" alt="email icon"/> -->
|
||||
<a class="email" href="mailto:${statement.value}" title="email">${statement.value}</a>
|
||||
<@p.editingLinks "${email.localName}" statement editable />
|
||||
</li>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#import "lib-datetime.ftl" as dt>
|
||||
|
||||
<#if deptGrants?has_content>
|
||||
<section id="pageList">
|
||||
<#list deptGrants as firstRow>
|
||||
<h2>Active Grants for ${firstRow["deptLabel"]}</h2>
|
||||
<#break>
|
||||
</#list>
|
||||
<table id="pageList" >
|
||||
<tr>
|
||||
<th>Grant Name</th>
|
||||
<th>Close Date</th>
|
||||
</tr>
|
||||
<#list deptGrants as resultRow>
|
||||
<tr>
|
||||
<td><a href="${urls.base}/individual${resultRow["activity"]?substring(resultRow["activity"]?last_index_of("/"))}">${resultRow["activityLabel"]}</a></td>
|
||||
<td>${dt.formatXsdDateTimeShort(resultRow["dt"], "yearMonthDayPrecision")}</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</table>
|
||||
<#else>
|
||||
There are currently no active grants for this department.
|
||||
</#if>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/pageList.css" />')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>')}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#if deptMemberships?has_content>
|
||||
<section id="pageList">
|
||||
<#list deptMemberships as firstRow>
|
||||
<div class="tab">
|
||||
<h2>${firstRow["orgLabel"]}</h2>
|
||||
<p>Here are the faculty in the ${firstRow["deptLabel"]} department who are members of this organization. <a href="${urls.base}/display${firstRow["orgURI"]?substring(firstRow["orgURI"]?last_index_of("/"))}" title="view all cornell faculty">View all the members of this organization.</a></p>
|
||||
</div>
|
||||
<#break>
|
||||
</#list>
|
||||
|
||||
<section id="deptGraduateFields">
|
||||
<ul role="list" class="deptDetailsList">
|
||||
<#list deptMemberships as resultRow>
|
||||
<li class="deptDetailsListItem">
|
||||
<a href="${urls.base}/individual${resultRow["person"]?substring(resultRow["person"]?last_index_of("/"))}">${resultRow["personLabel"]}</a>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
</#if>
|
||||
|
||||
</section>
|
|
@ -0,0 +1,15 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#if membershipResults?has_content>
|
||||
<h2 id="facultyMemberships" class="mainPropGroup">Faculty Memberships</h2>
|
||||
<#assign numberRows = membershipResults?size/>
|
||||
<ul id="individual-facultyMemberships" role="list">
|
||||
<#list membershipResults as resultRow>
|
||||
<li class="raLink">
|
||||
<a class="raLink" href="${urls.base}/deptGradFields?deptURI=${individual.uri}&actURI=${resultRow["activity"]}">
|
||||
${resultRow["actLabel"]}
|
||||
</a>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</#if>
|
|
@ -0,0 +1,24 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#if deptResearchAreas?has_content>
|
||||
<section id="pageList">
|
||||
<#list deptResearchAreas as firstRow>
|
||||
<div class="tab">
|
||||
<h2>${firstRow["raLabel"]}</h2>
|
||||
<p>Here are the faculty in the ${firstRow["deptLabel"]} department who have an interest in this research area. <a href="${urls.base}/display${firstRow["raURI"]?substring(firstRow["raURI"]?last_index_of("/"))}">View all Cornell faculty with an interest in this area.</a></p>
|
||||
</div>
|
||||
<#break>
|
||||
</#list>
|
||||
|
||||
<section id="deptResearchAreas">
|
||||
<ul role="list" class="deptDetailsList">
|
||||
<#list deptResearchAreas as resultRow>
|
||||
<li class="deptDetailsListItem">
|
||||
<a href="${urls.base}/individual${resultRow["person"]?substring(resultRow["person"]?last_index_of("/"))}">${resultRow["personLabel"]}</a>
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
</#if>
|
||||
|
||||
</section>
|
|
@ -0,0 +1,45 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#if researchAreaResults?has_content>
|
||||
<h2 id="facultyResearchAreas" class="mainPropGroup">
|
||||
Faculty Research Areas
|
||||
</h2>
|
||||
|
||||
<#assign numberRows = researchAreaResults?size/>
|
||||
<ul id="individual-hasResearchArea" role="list">
|
||||
<#assign totalLength = 0 >
|
||||
<#assign moreDisplayed = false>
|
||||
<#list researchAreaResults as resultRow>
|
||||
<#if ( totalLength > 380 ) && !moreDisplayed >
|
||||
<li id="raMoreContainer" style="border:none">(...<a id="raMore" href="javascript:">more</a>)</li>
|
||||
<li class="raLinkMore" style="display:none">
|
||||
<#assign moreDisplayed = true>
|
||||
<#elseif ( totalLength > 380 ) && moreDisplayed >
|
||||
<li class="raLinkMore" style="display:none">
|
||||
<#else>
|
||||
<li class="raLink">
|
||||
</#if>
|
||||
<a class="raLink" href="${urls.base}/deptResearchAreas?deptURI=${individual.uri}&raURI=${resultRow["ra"]}">
|
||||
${resultRow["raLabel"]}
|
||||
</a>
|
||||
</li>
|
||||
<#assign totalLength = totalLength + resultRow["raLabel"]?length >
|
||||
</#list>
|
||||
<#if ( totalLength > 380 ) ><li id="raLessContainer" style="display:none">(<a id="raLess" href="javascript:">less</a>)</li></#if>
|
||||
</ul>
|
||||
</#if>
|
||||
<script>
|
||||
$('a#raMore').click(function() {
|
||||
$('li.raLinkMore').each(function() {
|
||||
$(this).show();
|
||||
});
|
||||
$('li#raMoreContainer').hide();
|
||||
$('li#raLessContainer').show();
|
||||
});
|
||||
$('a#raLess').click(function() {
|
||||
$('li.raLinkMore').each(function() {
|
||||
$(this).hide();
|
||||
});
|
||||
$('li#raMoreContainer').show();
|
||||
$('li#raLessContainer').hide();
|
||||
});
|
||||
</script>
|
|
@ -1,10 +1,9 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Icon controls displayed in upper-right corner -->
|
||||
<#-- CU directory link -->
|
||||
<#assign netid = individual.selfEditingId()!>
|
||||
|
||||
<img id="uriIcon" title="${individual.uri}" src="${urls.images}/individual/share-uri-icon.png" alt="share the uri" />
|
||||
<@qr.renderCode />
|
||||
<@qr.renderCode qrCodeIcon />
|
||||
|
||||
<#--
|
||||
|
||||
|
@ -12,6 +11,7 @@ Some contact information is displayed on the profile page by default; e.g., phon
|
|||
has an additional location for contact info, such as a university directory, a third "contact" icon is available that can be used
|
||||
to direct users to that directory. The <a> tag below shows an example using Cornell University's directory.
|
||||
|
||||
<#assign netid = individual.selfEditingId()!>
|
||||
<#if netid?has_content>
|
||||
<a href="http://www.cornell.edu/search/?tab=people&netid=${netid}" title="Cornell University directory entry for ${netid}" target="_blank">
|
||||
<img src="${urls.images}/individual/contact-info-icon.png" title="view additional contact information" alt="contact info" />
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for property listing on individual profile page -->
|
||||
|
||||
<#list group.properties as property>
|
||||
<article class="property" role="article">
|
||||
<#-- Property display name -->
|
||||
<#if property.localName == "authorInAuthorship" && editable >
|
||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property />
|
||||
<a id="managePubLink" class="manageLinks" href="${urls.base}/managePublications?subjectUri=${subjectUri[1]!}" title="manage publications" <#if verbose>style="padding-top:10px"</#if> >
|
||||
manage publications
|
||||
</a>
|
||||
</h3>
|
||||
<#elseif property.localName == "hasResearcherRole" && editable >
|
||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property />
|
||||
<a id="manageGrantLink" class="manageLinks" href="${urls.base}/manageGrants?subjectUri=${subjectUri[1]!}" title="manage grants & projects" <#if verbose>style="padding-top:10px"</#if> >
|
||||
manage grants & projects
|
||||
</a>
|
||||
</h3>
|
||||
<#elseif property.localName == "organizationForPosition" && editable >
|
||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property />
|
||||
<a id="managePeopleLink" class="manageLinks" href="${urls.base}/managePeople?subjectUri=${subjectUri[1]!}" title="manage people" <#if verbose>style="padding-top:10px"</#if> >
|
||||
manage affiliated people
|
||||
</a>
|
||||
</h3>
|
||||
<#else>
|
||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> </h3>
|
||||
</#if>
|
||||
<#-- List the statements for each property -->
|
||||
<ul class="property-list" role="list" id="${property.localName}List">
|
||||
<#-- data property -->
|
||||
<#if property.type == "data">
|
||||
<@p.dataPropertyList property editable />
|
||||
<#-- object property -->
|
||||
<#else>
|
||||
<@p.objectProperty property editable />
|
||||
</#if>
|
||||
</ul>
|
||||
</article> <!-- end property -->
|
||||
</#list>
|
|
@ -25,7 +25,11 @@
|
|||
* setting the display to "full" will render a full-size QR code (<@renderCode display="full" />)
|
||||
* the size can be set using the width parameter (default is 125px)
|
||||
-->
|
||||
<#macro renderCode display="icon" width="125">
|
||||
<#--
|
||||
added the imageFile parameter because a different icon is used for the wilma theme (qr_icon.png)
|
||||
than is used for the 2 column and quick views (qr-code-icon.png).
|
||||
-->
|
||||
<#macro renderCode imageFile display="icon" width="125">
|
||||
<#if hasValidVCard()>
|
||||
<#local qrData = individual.qrData()>
|
||||
<#local qrCodeLinkedImage><a title="Export QR codes" href="${qrData.exportQrCodeUrl}" title="QR Code"><@qrCodeVCard qrCodeWidth=width /></a></#local>
|
||||
|
@ -34,10 +38,8 @@
|
|||
<h5 class="qrCode">vCard QR</h5>
|
||||
${qrCodeLinkedImage}
|
||||
<#elseif (display == "icon")>
|
||||
<#-- <li role="listitem"> -->
|
||||
<a id="qrIcon" title="vCard QR Code" href="${qrData.exportQrCodeUrl}" title="QR Code"><img src="${urls.images}/individual/qr-code-icon.png<#-- qr_icon.png -->" alt="qr icon" /></a>
|
||||
<a id="qrIcon" title="vCard QR Code" href="${qrData.exportQrCodeUrl}" title="QR Code"><img src="${urls.images}/individual/${imageFile!}" alt="qr icon" /></a>
|
||||
<span id="qrCodeImage" class="hidden">${qrCodeLinkedImage} <a class="qrCloseLink" href="#" title="QR Code">Close</a></span>
|
||||
<#-- </li> -->
|
||||
<#else>
|
||||
<p class="notice">You have passed an invalid value for the qrCode display parameter.</p>
|
||||
</#if>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
'<script type="text/javascript" src="${urls.base}/js/visualization/sparkline.js"></script>')}
|
||||
|
||||
<script type="text/javascript">
|
||||
var visualizationUrl = '${urls.base}/visualizationAjax?uri=${individual.uri?url}';
|
||||
var visualizationUrl = '${urls.base}/visualizationAjax?uri=${individual.uri?url}&template=${visRequestingTemplate!}';
|
||||
var infoIconSrc = '${urls.images}/iconInfo.png';
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Default VIVO individual profile page template (extends individual.ftl in vitro) -->
|
||||
|
||||
<#include "individual-setup.ftl">
|
||||
<#import "lib-vivo-properties.ftl" as vp>
|
||||
|
||||
<#assign individualProductExtension>
|
||||
<#-- Include for any class specific template additions -->
|
||||
${classSpecificExtension!}
|
||||
${departmentalGrantsExtension!}
|
||||
<!--PREINDIVIDUAL OVERVIEW.FTL-->
|
||||
<#include "individual-webpage.ftl">
|
||||
<#include "individual-overview.ftl">
|
||||
${departmentalResearchAreas!}
|
||||
</section> <!-- #individual-info -->
|
||||
</section> <!-- #individual-intro -->
|
||||
<!--postindiviudal overiew tfl-->
|
||||
</#assign>
|
||||
|
||||
<#include "individual-vitro.ftl">
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual-vivo.css" />')}
|
||||
|
||||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>')}
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/individualUtils.js"></script>')}
|
Loading…
Add table
Add a link
Reference in a new issue