diff --git a/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoDepartmentQueries.n3 b/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoDepartmentQueries.n3 new file mode 100644 index 00000000..62cde19a --- /dev/null +++ b/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoDepartmentQueries.n3 @@ -0,0 +1,161 @@ +# $This file is distributed under the terms of the license in /doc/license.txt$ + +@prefix owl: . +@prefix display: . +@prefix rdf: . +@prefix rdfs: . +@prefix core: . +@prefix vivoweb: . + + + +#### queries for departmental pages #### + + display:hasDataGetter display:getResearchAreaDataGetter . + +display:getResearchAreaDataGetter + a ; + display:saveToVar "researchAreaResults"; + display:query """ + PREFIX rdfs: + PREFIX vivo: + SELECT DISTINCT (str(?researchAreaLabel) AS ?raLabel) ?ra + WHERE { + ?individualURI vivo:organizationForPosition ?posn . + ?posn vivo:positionForPerson ?person . + ?person vivo:hasResearchArea ?ra . + ?ra rdfs:label ?researchAreaLabel + } + ORDER BY ?raLabel + """ . +## This is a working example of another type of data getter that can be used. This one retrieves ## +## the organizational memberships (vivo:hasMemberRole) of all the people in an academic department. ## +## You can use this or adapt it to your needs; for example, to display clinical activities of people ## +## in a department. The templates are available for this query and the appropriate freemarker code ## +## is commented out in the individual.ftl and individual--foaf-organization.ftl templates. ## +# display:hasDataGetter display:getMembershipsDataGetter . +# +#display:getMembershipsDataGetter +# a ; +# display:saveToVar "membershipResults"; +# display:query """ +# PREFIX rdfs: +# PREFIX vivo: +# SELECT DISTINCT (str(?organizationLabel) AS ?orgLabel) ?organization +# WHERE { +# ?individualURI vivo:organizationForPosition ?posn . +# ?posn vivo:positionForPerson ?person . +# ?person vivo:hasMemberRole ?mbrRole . +# ?mbrRole vivo:roleContributesTo ?organization. +# ?organization rdfs:label ?organizationLabel +# } +# ORDER BY ?organizationLabel +# """ . + +#### detail pages for department links #### + + + a ; + + ; + + "individual-dept-active-grants.ftl" ; + + "Departmental Grants" ; + + "/deptGrants" . + + + a ; + + """ + PREFIX rdfs: + PREFIX vivo: + PREFIX afn: + SELECT DISTINCT (str (?actLabel) AS ?activityLabel) ?dt (str(?departmentLabel) AS ?deptLabel) ?activity + WHERE { + ?individualURI vivo:organizationForPosition ?posn . + ?individualURI rdfs:label ?departmentLabel . + ?posn vivo:positionForPerson ?person . + ?person ?roleProperty ?role . + ?roleProperty rdfs:subPropertyOf vivo:hasResearcherRole . + ?role vivo:roleContributesTo ?activity . + ?activity rdfs:label ?actLabel . + ?activity vivo:dateTimeInterval ?dti . + ?dti vivo:end ?end. + ?end vivo:dateTime ?dt + FILTER (?dt > afn:now()) + } + ORDER BY ?activityLabel + """ ; + + "deptGrants" . + + + a ; + + ; + + "individual-dept-res-area-details.ftl" ; + + "Departmental Research Areas" ; + + "/deptResearchAreas" . + + + a ; + + """ + PREFIX rdfs: +PREFIX vivo: +SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) ?person (Str(?researchAreaLabel) AS ?raLabel) (str(?departmentLabel) AS ?deptLabel) ?raURI +WHERE { + ?deptURI vivo:organizationForPosition ?posn . + ?deptURI rdfs:label ?departmentLabel . + ?posn vivo:positionForPerson ?person . + ?person rdfs:label ?prsnLabel . + ?person vivo:hasResearchArea ?raURI . + ?raURI rdfs:label ?researchAreaLabel + +} +ORDER BY ?personLabel +""" ; + + "deptResearchAreas" . + + +## This is another part of the departmental memberships working example. This data getter gets called ## +## when a membership organization links is clicked on the academic department page. The template for ## +## this data getter (individual-dept-membership-details.ftl) is included in the VIVO source code. ## +# +# a ; +# +# ; +# +# "individual-dept-membership-details.ftl" ; +# +# "Departmental Memberships" ; +# +# "/deptMemberships" . + +# +# a ; +# +# """PREFIX vivoc: +# PREFIX rdfs: +# PREFIX vivo: +# SELECT DISTINCT (str (?prsnLabel) AS ?personLabel) (str (?departmentLabel) AS ?deptLabel) ?person #(str(?organizationLabel) AS ?orgLabel) ?orgURI +# WHERE { +# ?deptURI vivo:organizationForPosition ?posn . +# ?deptURI rdfs:label ?departmentLabel . +# ?posn vivo:positionForPerson ?person . +# ?person rdfs:label ?prsnLabel . +# ?person vivo:hasMemberRole ?role . +# ?role vivo:roleContributesTo ?orgURI . +# ?orgURI rdfs:label ?organizationLabel +# } +# ORDER BY ?personLabel +# """ ; +# +# "deptMemberships" . +# diff --git a/productMods/css/individual/individual-2column-view.css b/productMods/css/individual/individual-2column-view.css index 3ddea1d3..71f2b279 100644 --- a/productMods/css/individual/individual-2column-view.css +++ b/productMods/css/individual/individual-2column-view.css @@ -3,7 +3,7 @@ /* <------ INDIVIDUAL INTRO */ #individual-intro { margin-top: 15px; - margin-bottom: 0px; /* margin-bottom: 20px; out for redesign*/ + margin-bottom: 0px; position: relative; overflow: hidden; } @@ -13,7 +13,7 @@ width: 166px; float: left; padding-right: 1.5em; - margin-right: 12px; /* added for redesign */ + margin-right: 12px; margin-bottom: 20px; } img.individual-photo { @@ -21,17 +21,22 @@ img.individual-photo { margin-left: 0; float: left; margin-right: 20px; - margin-bottom: 10px; /* changed for redesign, was 20px */ + margin-bottom: 10px; } ul#phone-list { font-size:0.9em; } +ul#individual-phone { + clear: both; + list-style-type: circle; + margin-top:-8px; +} #primary-email { margin-top: 0; } -#primary-email li:last-child, /* added for redesign */ +#primary-email li:last-child, #additional-emails li:last-child { - margin-bottom: 0; /* changed for redesign, was 18px */ + margin-bottom: 0; } /* <------ INDIVIDUAL INTRO - RIGHT SIDE CONTENT */ @@ -54,8 +59,8 @@ div#titleContainer { margin-top:6px; } #individual-info h2 { - padding: 25px 0 10px 0; /* changed for redesign, was padding-bottom: 10px */ - clear:both; /* added for redesign */ + padding: 25px 0 10px 0; + clear:both; } #individual-info h2#contactHeading { margin-bottom: 8px; @@ -68,7 +73,7 @@ h3.primary-email { margin-top: -8px !important; } #individual-intro.person { - margin-bottom: 0; /* changed for redesign, was 30px */ + margin-bottom: 0; position: relative; width: 100%; } @@ -113,29 +118,34 @@ span.iconControlsNotEditable { top:3px; } #overview { - clear: both; /* changed for redesign, was left */ + clear: both; } /* <------ INDIVIDUAL VISUALIZATION */ #visualization { - padding: 0 0 0 0; /* changed for redesign, was 0 0 0 20px */ - background: #fff; /* added for redesign */ - width:174px; /* added for redesign */ - float:none; /* float:right; out for redesign */ + padding: 0 0 0 0; + background: #fff; + width:174px; + float:none; } #visualization h3 { padding-top: 10px; - margin-bottom: 0; /* changed for redesign, was 10px */ + margin-bottom: 0; } p#networks { margin-bottom:10px; } -.collaboratorship-link-separator { /* added for redesign */ +.collaboratorship-link-separator { + margin-top: 10px; + border-top: 1px solid #DDE4E3; + padding-top: 10px; +} +.collaboratorship-link-separator-solid { margin-top: 10px; border-top: 1px solid #DDE4E3; padding-top: 10px; } .sparkline_text { - font-size: .9em; /* changed for redesign, was .8em */ + font-size: .9em; text-align: left; line-height: 1.5em; width: 180px; @@ -143,7 +153,7 @@ p#networks { span.collaboratorship-link a img{ vertical-align:middle; } -td#totalPubs { /* added for redesign */ +td#totalPubs { font-size: 1.35em; background: url(../../images/individual/pub-total-bkgrnd.png) top left no-repeat; text-align:center; @@ -151,7 +161,7 @@ td#totalPubs { /* added for redesign */ width:48px; height:48px; } -td#tenYearCount { /* added for redesign */ +td#tenYearCount { font-size: .85em; padding-left:10px; vertical-align:middle; @@ -166,37 +176,37 @@ div#pub_count_short_sparkline_vis { } /* <------ INDIVIDUAL TEMPORAL GRAPH */ #temporal-graph { - padding: 0 3px 8px 0; /* changed for redesign, was 0 3px 20px 0 */ + padding: 0 3px 8px 0; background-color: #fff; - margin-top: -4px; /* added for redesign */ + margin-top: -4px; } #temporal-graph h3 img { padding-right: 10px; - vertical-align: middle; /* changed for redesign, was text-top */ + vertical-align: middle; } /* <------ INDIVIDUAL MAP O' SCIENCE */ #map-of-science { - padding: 0 3px 24px 0; /* changed for redesign, was 0 3px 20x 0 */ + padding: 0 3px 24px 0; background-color: #fff; } #map-of-science h3 img { padding-right: 10px; - vertical-align: middle; /* changed for redesign, was text-top */ + vertical-align: middle; } /* <------ POSITIONS */ ul#individual-personInPosition { list-style-type: circle; - padding-left: 10px; /* changed for redesign, was 20px */ - margin: 10px 0 0 0; /* added for redesign */ + padding-left: 10px; + margin: 10px 0 0 0; } ul#individual-personInPosition li { line-height: 1em; - padding-bottom:10px; /* changed for redesign, was 15px */ + padding-bottom:10px; } ul#individual-personInPosition li:last-child { - padding-bottom: 3px; /* changed for redesign, was 15px */ + padding-bottom: 3px; } /* <------ CONTACTS AND WEBPAGES */ @@ -235,8 +245,8 @@ div#contactPhoneDiv { ul#individual-hasResearchArea li { float: left; padding-right: 10px; - margin-right: 10px; /* added for redesign */ - padding-left: 0; /* padding-left: 10px; out for redesign */ + margin-right: 10px; + padding-left: 0; border-right: 1px solid #5e6363; } h2#researchAreas { @@ -245,21 +255,22 @@ h2#researchAreas { /* <------ QR Code */ span#qrCodeImage { position: absolute; - top: 30px; /* changed for redesign, was -9em */ - left: -120px !important; /* added for redesign */ - width:180px; /* added for redesign */ + top: 30px; + left: -120px !important; + width:180px; border: solid 2px #ccc; - background: #fff; /* changed for redesign, was #fff */ - text-align:middle; /* added for redesign */ + background: #fff; + text-align:middle; overflow:visible; + z-index:1000; } span#qrCodeImage img { - padding: 1.7em 1.7em 0 1.7em; /* changed for redesign, was 1.7em 1.7 em 0 1.7 em */ + padding: 1.7em 1.7em 0 1.7em; } a.qrCloseLink { float: right; - padding-right: 1em; /* added for redesign */ - margin-right: 0; /* margin-right: .5em out for redesign */ + padding-right: 1em; + margin-right: 0; font-size: .8em; } /* MISCELLANEOUS------> */ @@ -270,8 +281,7 @@ span#quickViewLink { span#quickViewLink img { margin-top:35px; } - -a#manageLabels { /* added for redesign but will work with existing templates */ +a#manageLabels { margin-left:20px; font-size:0.7em; } diff --git a/productMods/css/individual/individual-quick-view.css b/productMods/css/individual/individual-quick-view.css index c23c5d33..74229dbc 100644 --- a/productMods/css/individual/individual-quick-view.css +++ b/productMods/css/individual/individual-quick-view.css @@ -70,21 +70,20 @@ h2#preferredTitle { /* <------ QR Code */ span#qrCodeImage { position: absolute; - top: 30px; /* changed for redesign, was -9em */ - left: 76% !important; /* added for redesign */ - width:180px; /* added for redesign */ + top: 30px; + left: 76% !important; + width:180px; border: solid 2px #ccc; - background: #fff; /* changed for redesign, was #fff */ - text-align:middle; /* added for redesign */ + background: #fff; + text-align:middle; overflow:visible; } span#qrCodeImage img { - padding: 1.7em 1.7em 0 1.7em; /* changed for redesign, was 1.7em 1.7 em 0 1.7 em */ + padding: 1.7em 1.7em 0 1.7em; } /* <----- WEBPAGE CONTENT LEFT SIDE -----> */ .edit-mainImage { position: absolute; -/* background: rgba(255, 255, 255, 0.6); */ padding: 0 0 0 0; top: 44px; left: 0; @@ -93,7 +92,6 @@ span#qrCodeImage img { position: absolute; top: 44px; left: 26px; - /* background: rgba(255, 255, 255, 0.6); */ padding: 0 0 0 8px; } div#webpage-wrapper { @@ -204,14 +202,14 @@ ul#individual-visualization li:last-child { /* <------ POSITIONS ------> */ ul#individual-personInPosition { list-style-type: circle; - padding-left: 10px; /* changed for redesign, was 20px */ - margin: 10px 0 0 0; /* added for redesign */ + padding-left: 10px; + margin: 10px 0 0 0; } ul#individual-hasResearchArea li { float: left; padding-right: 10px; - margin-right: 10px; /* added for redesign */ - padding-left: 0; /* padding-left: 10px; out for redesign */ + margin-right: 10px; + padding-left: 0; border-right: 1px solid #5e6363 ; white-space:nowrap !important; } @@ -252,6 +250,6 @@ ul#individual-personInPosition li:last-child { padding-bottom: 0; } #individual-info h2 { - padding: 25px 0 10px 0; /* changed for redesign, was padding-bottom: 10px */ - clear:both; /* added for redesign */ + padding: 25px 0 10px 0; + clear:both; } diff --git a/productMods/css/individual/individual-vivo.css b/productMods/css/individual/individual-vivo.css index f1a4e154..38ac6550 100644 --- a/productMods/css/individual/individual-vivo.css +++ b/productMods/css/individual/individual-vivo.css @@ -13,7 +13,7 @@ ul#individual-tools li { } ul#individual-phone { clear: both; - list-style-type: circle; + list-style: circle outside url(../../images/phoneIconSmall.gif); margin-left: 15px; } ul#individual-phone li { @@ -24,14 +24,18 @@ ul#individual-phone li:last-child { margin-bottom: 10px; } ul#individual-phone li:first-child { - margin-top: 10px; + margin-top: -4px; } .icon-phone, .icon-email { padding-right: 2px; } +#individual-intro.person ul.individual-urls { + list-style-type: circle; + margin: 0 0 0 15px; +} #individual-intro ul.individual-urls { list-style-type: circle; - margin-left: 15px; + margin: 0 0 15px 15px; } #individual-intro ul.individual-urls li { font-size: .875em; @@ -41,7 +45,7 @@ ul#individual-phone li:first-child { ul.individual-emails { clear: both; padding-left: 0; - list-style-type: circle; + list-style: circle outside url(../../images/emailIconSmall.gif); margin-left: 20px; } #additional-emails li:last-child { @@ -49,13 +53,8 @@ ul.individual-emails { } ul.individual-emails li { font-size: .875em; - line-height: 1.5em; -} -ul#individual-phone { - list-style: url(../../images/phoneIconSmall.gif); -} -ul.individual-emails { - list-style: url(../../images/emailIconSmall.gif); + line-height: 1.2em; + padding-bottom: 6px; } ul#webpages{ margin-bottom: 5px; @@ -73,12 +72,15 @@ ul#additional-emails li { width: 78%; } #individual-intro .individual-overview { -/* margin-bottom: 10px; - margin-top: 10px; */ margin: 0; display: inline; clear: both; - float: left; + float: none; +} +div#activeGrantsLink { + float:right; + clear:right; + margin-bottom: 25px; } /* <------ INDIVIDUAL INTRO FOR PERSON*/ #individual-intro.person { @@ -96,10 +98,7 @@ ul#additional-emails li { float: none; } div#individual-tools-people { - height: 20px; - padding-bottom: 24px; - clear: both; - margin-bottom: 15px; + float: right; } ul#individual-tools-people li { position: relative; @@ -119,7 +118,7 @@ ul.individual-urls-people li { } /* <------ INDIVIDUAL CORE:OVERVIEW */ #overview { - clear: both; +/* clear: both; */ } .overview-value { display: inline; @@ -185,7 +184,7 @@ p.view-all-coauthors { /* <------ INDIVIDUAL MAP O' SCIENCE */ #map-of-science { - padding: 0 3px 20px 0; + padding: 0 29px 20px 0; background-color: #fff; } #map-of-science h3 { @@ -210,15 +209,18 @@ ul#individual-personInPosition li:last-child { } /* <------ RESEARCH AREA */ -ul#individual-hasResearchArea { - padding-bottom: 24px; -} ul#individual-hasResearchArea li { float: left; padding-right: 10px; margin-right: 10px; border-right: 1px solid #5e6363; } +ul#individual-facultyMemberships li { + float: left; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid #5e6363; +} /* <------ QR Code */ h5.qrCode { margin-top: 1em; @@ -226,20 +228,24 @@ h5.qrCode { } span#qrCodeImage { position: absolute; - top: -9em; - left: 2em; - border: solid 1px #ccc; - background: white; + top: 27px; + left: 175px !important; + width:180px; + border: solid 2px #ccc; + background: #fff; + text-align:middle; + overflow:visible; + z-index:1000; } span#qrCodeImage img { - padding: 1.7em 1.7em 0 1.7em; + padding: 1.7em 1.7em 0 1.7em; } a.qrCloseLink { - float: right; - margin-right: .5em; + float: right; + padding-right: 1em; + margin-right: 0; font-size: .8em; -} -/* MISCELLANEOUS------> */ +}/* MISCELLANEOUS------> */ .listDateTime { padding: 0 0.4em; font-size: 0.8em; @@ -254,10 +260,10 @@ a.manageLinks { /* individual-vivo.css merger ------> */ #individual-info h2#overview { padding-bottom: 0; - padding-top: 20px; +/* padding-top: 20px; */ } ul#individual-webpage li:first-child { - padding: 0 0 0 0; + padding: 0 0 5px 0; } ul.webpages-withThumbnails li:nth-child(2) { padding: 105px 0 0 15px; @@ -268,7 +274,12 @@ ul.webpages-withThumbnails li { float:left; } h2#facultyResearchAreas { - clear:both; + clear:left; + padding-bottom:3px; + padding-top:25px +} +h2#facultyMemberships { + clear:left; padding-bottom:3px; padding-top:25px } diff --git a/productMods/css/visualization/visualization.css b/productMods/css/visualization/visualization.css index 4e891051..c578ae8b 100644 --- a/productMods/css/visualization/visualization.css +++ b/productMods/css/visualization/visualization.css @@ -44,9 +44,9 @@ span.incomplete-data-holder, width: 180px; } .collaboratorship-link-separator { - margin-top: 20px; + margin-top: 15px; border-top: 1px dotted #A6B1B0; - padding-top: 20px; + padding-top: 15px; } .sparkline_text, .grey-text { font-size: .9em; diff --git a/productMods/js/individual/individualUtils.js b/productMods/js/individual/individualUtils.js index a1226c60..cc061858 100644 --- a/productMods/js/individual/individualUtils.js +++ b/productMods/js/individual/individualUtils.js @@ -4,6 +4,12 @@ $(document).ready(function(){ $.extend(this, individualLocalName); + // ensures proper layout when an organization has its webpage link displayed as a thumnail. + if ( $('ul.webpages-withThumnails') ) { + $('div.individual-overview').css("float","left"); + $('div#activeGrantsLink').css("margin-top","30px"); + $('section#individual-info').children('h2#overview').css("clear","both"); + } // "more"/"less" HTML truncator for showing more or less content in data property core:overview $('.overview-value').truncate({max_length: 500}); diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl index 851699e7..afc0e2a8 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl @@ -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>
<#include "individual-visualizationTemporalGraph.ftl"> <#include "individual-visualizationMapOfScience.ftl"> -
+ -<#include "individual.ftl"> \ No newline at end of file +<#if individual.mostSpecificTypes?seq_contains("Academic Department")> + <#assign departmentalGrantsExtension> + + + + <#assign departmentalResearchAreas> + <#include "individual-dept-research-areas.ftl"> + + + <#assign departmentalMemberships> + <#include "individual-dept-memberships.ftl"> + + + +<#include "individual.ftl"> + diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl index f7413087..dad2513d 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl @@ -10,6 +10,8 @@ <#if !labelCount??> <#assign labelCount = 0 > +<#assign qrCodeIcon = "qr-code-icon.png"> +<#assign visRequestingTemplate = "foaf-person-2column">
<#-- Image --> @@ -58,12 +60,13 @@ <@p.mostSpecificTypesPerson individual editable/> - + <#include "individual-iconControls.ftl"> <#if editable && profilePageTypesEnabled >
-

Profile type

+ +

diff --git a/productMods/templates/freemarker/body/individual/individual.ftl b/productMods/templates/freemarker/body/individual/individual.ftl index ececf942..ce433c9c 100644 --- a/productMods/templates/freemarker/body/individual/individual.ftl +++ b/productMods/templates/freemarker/body/individual/individual.ftl @@ -8,17 +8,25 @@ <#assign individualProductExtension> <#-- Include for any class specific template additions --> ${classSpecificExtension!} + ${departmentalGrantsExtension!} <#include "individual-webpage.ftl"> <#include "individual-overview.ftl"> + ${departmentalResearchAreas!} + ${departmentalMemberships!}
- + + <#include "individual-vitro.ftl"> - + ${stylesheets.add('')} -${headScripts.add('')} +${headScripts.add('', + '')} + ${scripts.add('')} diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl index 983ef2ee..abd877bd 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -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) > -
  • Contact Info
+<#if phone?has_content || primaryEmail?has_content || addlEmail?has_content > +
  • Contact Info
<#-- 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 --> -
    +
      style="list-style:none;margin-left:0;"> <#list phone.statements as statement> -
    • - <#-- phone icon -->${statement.value} +
    • + ${statement.value} <@p.editingLinks "${phone.localName}" statement editable />
    • @@ -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 --> -
        +
          style="list-style:none;margin-left:0;"> <#list email.statements as statement>
        • - <#-- email icon --> <@p.editingLinks "${email.localName}" statement editable />
        • diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl new file mode 100644 index 00000000..aa792821 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-active-grants.ftl @@ -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> +
          + <#list deptGrants as firstRow> +

          Active Grants for ${firstRow["deptLabel"]}

          + <#break> + + + + + + + <#list deptGrants as resultRow> + + + + + +
          Grant NameClose Date
          ${resultRow["activityLabel"]}${dt.formatXsdDateTimeShort(resultRow["dt"], "yearMonthDayPrecision")}
          +<#else> + There are currently no active grants for this department. + + +
          + + +${stylesheets.add('')} + +${scripts.add('')} + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-membership-details.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-membership-details.ftl new file mode 100644 index 00000000..45fdac23 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-membership-details.ftl @@ -0,0 +1,26 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#if deptMemberships?has_content> +
          + <#list deptMemberships as firstRow> +
          +

          ${firstRow["orgLabel"]}

          +

          Here are the faculty in the ${firstRow["deptLabel"]} department who are members of this organization. View all the members of this organization.

          +
          + <#break> + + +
          + + +
          + + + +
          diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-memberships.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-memberships.ftl new file mode 100644 index 00000000..bd91c165 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-memberships.ftl @@ -0,0 +1,15 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#if membershipResults?has_content> +

          Faculty Memberships

          + <#assign numberRows = membershipResults?size/> + + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl new file mode 100644 index 00000000..739a7b3a --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-res-area-details.ftl @@ -0,0 +1,24 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#if deptResearchAreas?has_content> +
          + <#list deptResearchAreas as firstRow> +
          +

          ${firstRow["raLabel"]}

          +

          Here are the faculty in the ${firstRow["deptLabel"]} department who have an interest in this research area. View all Cornell faculty with an interest in this area.

          +
          + <#break> + + +
          + + +
          + + +
          diff --git a/productMods/templates/freemarker/body/partials/individual/individual-dept-research-areas.ftl b/productMods/templates/freemarker/body/partials/individual/individual-dept-research-areas.ftl new file mode 100644 index 00000000..b858fa07 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-dept-research-areas.ftl @@ -0,0 +1,45 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#if researchAreaResults?has_content> +

          + Faculty Research Areas +

          + + <#assign numberRows = researchAreaResults?size/> +
            + <#assign totalLength = 0 > + <#assign moreDisplayed = false> + <#list researchAreaResults as resultRow> + <#if ( totalLength > 380 ) && !moreDisplayed > +
          • (...more)
          • + + <#assign totalLength = totalLength + resultRow["raLabel"]?length > + + <#if ( totalLength > 380 ) > +
          + + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl b/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl index d1cac1a5..324e93dd 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl @@ -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()!> + 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 tag below shows an example using Cornell University's directory. +<#assign netid = individual.selfEditingId()!> <#if netid?has_content> contact info diff --git a/productMods/templates/freemarker/body/partials/individual/individual-properties.ftl b/productMods/templates/freemarker/body/partials/individual/individual-properties.ftl deleted file mode 100644 index 48ceefde..00000000 --- a/productMods/templates/freemarker/body/partials/individual/individual-properties.ftl +++ /dev/null @@ -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> -
          - <#-- Property display name --> - <#if property.localName == "authorInAuthorship" && editable > -

          ${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> - style="padding-top:10px" > - manage publications - -

          - <#elseif property.localName == "hasResearcherRole" && editable > -

          ${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> - style="padding-top:10px" > - manage grants & projects - -

          - <#elseif property.localName == "organizationForPosition" && editable > -

          ${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> - style="padding-top:10px" > - manage affiliated people - -

          - <#else> -

          ${property.name} <@p.addLink property editable /> <@p.verboseDisplay property />

          - - <#-- List the statements for each property --> -
            - <#-- data property --> - <#if property.type == "data"> - <@p.dataPropertyList property editable /> - <#-- object property --> - <#else> - <@p.objectProperty property editable /> - -
          -
          - diff --git a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl index 6061fa19..3c556d34 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl @@ -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><@qrCodeVCard qrCodeWidth=width /> @@ -34,10 +38,8 @@
          vCard QR
          ${qrCodeLinkedImage} <#elseif (display == "icon")> -<#--
        • --> - qr icon + qr icon -<#--
        • --> <#else>

          You have passed an invalid value for the qrCode display parameter.

          diff --git a/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl b/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl index f84f7cb7..e7a60b5a 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl @@ -50,7 +50,7 @@ '')} diff --git a/productMods/templates/freemarker/body/partials/individual/individual.ftl b/productMods/templates/freemarker/body/partials/individual/individual.ftl new file mode 100644 index 00000000..f5eb094f --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual.ftl @@ -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!} + + <#include "individual-webpage.ftl"> + <#include "individual-overview.ftl"> + ${departmentalResearchAreas!} + + + + + +<#include "individual-vitro.ftl"> + +${stylesheets.add('')} + +${headScripts.add('')} +${scripts.add('')} diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl index 9cc4770d..a7c72020 100644 --- a/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl +++ b/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl @@ -1,19 +1,19 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- - There are two templates for displaying publication information on foaf person pages. - - personPublicationSparklineContent.ftl - - personPublicationCountNoSparkline.ftl + - personPublicationSparklineContent.ftl, which shows the actual sparkline + - personPublicationCountNoSparkline.ftl, which shows on counts and not the sparkline The first is the template use with the Wilma theme and the individual--foaf-person.ftl template. The second is used with the individual--foaf-person-2column.ftl template. - - Update the include statement below to use the correct "sparkline" template for your - foaf person template. - --> <#if shouldVIVOrenderVis> - <#include "personPublicationSparklineContent.ftl"> + <#-- Added requestingTemplate variable in release 1.6 to support multi-view option --> + <#if requestingTemplate = "foaf-person-wilma" > + <#include "personPublicationSparklineContent.ftl"> + <#else> + <#include "personPublicationCountNoSparkline.ftl"> + diff --git a/src/edu/cornell/mannlib/vitro/webapp/controller/visualization/VisualizationFrameworkConstants.java b/src/edu/cornell/mannlib/vitro/webapp/controller/visualization/VisualizationFrameworkConstants.java index b6ac3764..0b4cbdde 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/controller/visualization/VisualizationFrameworkConstants.java +++ b/src/edu/cornell/mannlib/vitro/webapp/controller/visualization/VisualizationFrameworkConstants.java @@ -53,6 +53,7 @@ public class VisualizationFrameworkConstants { public static final String VIS_MODE_KEY = "vis_mode"; public static final String RENDER_MODE_KEY = "render_mode"; public static final String OUTPUT_FORMAT_KEY = "output"; + public static final String REQUESTING_TEMPLATE_KEY = "template"; /* tlw72 - added in 1.6 for multi-view support */ /* * These values represent possible render modes. diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/personpubcount/PersonPublicationCountRequestHandler.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/personpubcount/PersonPublicationCountRequestHandler.java index 9e6d1c73..d90f72a2 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/visualization/personpubcount/PersonPublicationCountRequestHandler.java +++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/personpubcount/PersonPublicationCountRequestHandler.java @@ -59,6 +59,13 @@ VisualizationRequestHandler { .getParameter( VisualizationFrameworkConstants.VIS_CONTAINER_KEY); + /* tlw72 -- Added in 1.6 for multi-view support. There are now two different "sparkline" templates */ + /* and the one that gets loaded depends on which foaf person template is being used by the app. The */ + /* personPublicationCountDynamicActivator.ftl template needs to know which is the requesting template. */ + String requestingTemplate = vitroRequest + .getParameter( + VisualizationFrameworkConstants.REQUESTING_TEMPLATE_KEY); + QueryRunner> queryManager = new PersonPublicationCountQueryRunner( personURI, dataset, @@ -91,7 +98,7 @@ VisualizationRequestHandler { SparklineData sparklineData = visualizationCodeGenerator.getValueObjectContainer(); return prepareDynamicResponse(vitroRequest, sparklineData, - shouldVIVOrenderVis); + shouldVIVOrenderVis, requestingTemplate); } @@ -273,13 +280,14 @@ VisualizationRequestHandler { * @return */ private TemplateResponseValues prepareDynamicResponse(VitroRequest vreq, - SparklineData valueObjectContainer, boolean shouldVIVOrenderVis) { + SparklineData valueObjectContainer, boolean shouldVIVOrenderVis, String requestingTemplate) { String dynamicTemplate = "personPublicationCountDynamicActivator.ftl"; Map body = new HashMap(); body.put("sparklineVO", valueObjectContainer); body.put("shouldVIVOrenderVis", shouldVIVOrenderVis); + body.put("requestingTemplate", requestingTemplate); /* tlw72 -- Added in 1.6 for multi-view support.*/ return new TemplateResponseValues(dynamicTemplate, body); diff --git a/themes/wilma/css/wilma.css b/themes/wilma/css/wilma.css index 6419b18c..c60708b8 100644 --- a/themes/wilma/css/wilma.css +++ b/themes/wilma/css/wilma.css @@ -1276,6 +1276,9 @@ ul#individual-tools { h2#mainImage, #share-contact h2 { color: #5E6363; } +h2#webpage { + font-weight: bold; +} /* INDIVIDUAL INTRO - LEFT SIDE CONTENT ------> */ img.individual-photo { border: 7px solid #ebebeb; @@ -1284,11 +1287,6 @@ img.individual-photo { padding-top: .8em; display: block; } -div#individual-tools-people { - border-bottom: 1px dotted #A6B1B0; /* #e8ece9; */ - color: #b2d15a; - text-align:right; -} ul#individual-tools-people li a { color: #b2d15a; } @@ -1305,7 +1303,7 @@ ul#individual-tools li a { color: #5f6464; } ul.individual-urls { - list-style: url(../../../images/individual/arrow-grey.gif); + list-style: url(../../../images/individual/arrow-green.gif); } ul.individual-urls li { font-size: .875em; @@ -1326,7 +1324,7 @@ ul.individual-urls-people li a { } #individual-info h1.fn { font-size: 1.375em; - color: #2485ae; + color: #595B5B; line-height: 1.3em; } h1.fn .display-title { @@ -1359,17 +1357,17 @@ ul#individual-personInPosition li a { padding-top: 10px; width: 100%; } -ul#individual-hasResearchArea { - padding-bottom: 24px; -} ul#individual-hasResearchArea li { border-right: 1px solid #A6B1B0; } ul#individual-hasResearchArea li:last-child { border-right: none; } -ul#individual-hasResearchArea li a { - color: #2485ae; +ul#individual-facultyMemberships li { + border-right: 1px solid #A6B1B0; +} +ul#individual-facultyMemberships li:last-child { + border-right: none; } /* INDIVIDUAL VISUALIZATION ------> */ #right-hand-column h3 { @@ -1488,7 +1486,9 @@ input[type="submit"] { .edit-individual { border-left: 1px dotted #B2D15A; } - +div#profileTypeContainer h2:after { + content:"Profile Type"; +} /* -------------------------------------------------> */ /* SITE ADMIN DASHBOARD ----------------------------> */ /* -------------------------------------------------> */ diff --git a/themes/wilma/templates/individual--foaf-person.ftl b/themes/wilma/templates/individual--foaf-person.ftl index 5c1e464f..6f85573d 100644 --- a/themes/wilma/templates/individual--foaf-person.ftl +++ b/themes/wilma/templates/individual--foaf-person.ftl @@ -11,6 +11,7 @@ <#if !labelCount??> <#assign labelCount = 0 > +<#assign visRequestingTemplate = "foaf-person-wilma">
          @@ -29,6 +30,12 @@
          ${individualImage}
          +
          + + uri icon + <@qr.renderCode "qr_icon.png" /> + +
          <#include "individual-contactInfo.ftl"> @@ -37,10 +44,6 @@
          -
          - uri icon - <@qr.renderCode /> -
          <#include "individual-visualizationFoafPerson.ftl">
          <#include "individual-adminPanel.ftl">