diff --git a/example.runtime.properties b/example.runtime.properties index edb02720..d28b7bd7 100644 --- a/example.runtime.properties +++ b/example.runtime.properties @@ -237,3 +237,9 @@ RDFService.languageFilter = true # Only set sandbox to True for dev/test environments. Comment out or set to False in production # #OpenSocial.sandbox = True + +# MultiViews +# VIVO supports the simultaneous use of a full foaf:Person profile page view and a "quick" page view that emphasizes +# the individual's webpage presence. The following flag should be uncommented when implementing the multiple +# views. +#MultiViews.profilePageTypes=enabled diff --git a/productMods/css/individual/ie7-quick-view.css b/productMods/css/individual/ie7-quick-view.css new file mode 100644 index 00000000..75472b4d --- /dev/null +++ b/productMods/css/individual/ie7-quick-view.css @@ -0,0 +1,32 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +/* Fix for quickview admin panel */ +#admin { + font-size:0.75em; + padding:0 0 0 0; + margin:0 0 0 0; + width:54%; +} +#admin h3 { + color:#fff; + font-size:12px; + padding:2px 2px 2px 2px; + margin:0 0 0 0; + float:left; +} +a.edit-individual { + margin-left:5px; + padding-bottom:5px; + float:left; +} +#verbose-mode { + padding-left:0px; + float:right; +} + +#admin .uri-link { + padding-left:8px; +} +#verbose-mode .small { + padding:3px 3px 3px 3px; +} diff --git a/productMods/css/individual/ie7-standard-view.css b/productMods/css/individual/ie7-standard-view.css new file mode 100644 index 00000000..37986a09 --- /dev/null +++ b/productMods/css/individual/ie7-standard-view.css @@ -0,0 +1,36 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +/* Fix for quickview admin panel */ +#admin { + font-size:0.75em; + padding:0 0 0 0; + margin:0 0 8px 0; + width:100%; + height:75px; +} +#admin h3 { + color:#fff; + font-size:12px; + padding:2px 2px 2px 2px; + margin:0 0 0 0; + float:left; +} +a.edit-individual { + margin-left:5px; + padding-bottom:5px; + float:left; +} +#verbose-mode { + padding-left:0px; + float:right; +} + +#admin .uri-link { + padding-left:8px; +} +#verbose-mode .small { + padding:3px 3px 3px 3px; +} +.iconControlsEditable { + top:140px; +} \ No newline at end of file diff --git a/productMods/css/individual/individual-2column-view.css b/productMods/css/individual/individual-2column-view.css new file mode 100644 index 00000000..3ddea1d3 --- /dev/null +++ b/productMods/css/individual/individual-2column-view.css @@ -0,0 +1,297 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +/* <------ INDIVIDUAL INTRO */ +#individual-intro { + margin-top: 15px; + margin-bottom: 0px; /* margin-bottom: 20px; out for redesign*/ + position: relative; + overflow: hidden; +} +/* <------ INDIVIDUAL INTRO - LEFT SIDE CONTENT */ +#share-contact { + position: relative; + width: 166px; + float: left; + padding-right: 1.5em; + margin-right: 12px; /* added for redesign */ + margin-bottom: 20px; +} +img.individual-photo { + width: 160px; + margin-left: 0; + float: left; + margin-right: 20px; + margin-bottom: 10px; /* changed for redesign, was 20px */ +} +ul#phone-list { + font-size:0.9em; +} +#primary-email { + margin-top: 0; +} +#primary-email li:last-child, /* added for redesign */ +#additional-emails li:last-child { + margin-bottom: 0; /* changed for redesign, was 18px */ +} + +/* <------ INDIVIDUAL INTRO - RIGHT SIDE CONTENT */ +.display-title-not-editable { + float-left; + font-size:1.15em; +/* padding-right:5em; */ +} +.display-title-editable { + padding-left:0 !important; + margin-left:0 !important; + font-size:1em !important; + border:none !important; + display:inline-block; +} +div#titleContainer { + display:inline-block; +} +#individual-info { + margin-top:6px; +} +#individual-info h2 { + padding: 25px 0 10px 0; /* changed for redesign, was padding-bottom: 10px */ + clear:both; /* added for redesign */ +} +#individual-info h2#contactHeading { + margin-bottom: 8px; +} +#individual-info h3#contact { + padding: 7px 0 5px 0; + margin:0 0 0 0 ; +} +h3.primary-email { + margin-top: -8px !important; +} +#individual-intro.person { + margin-bottom: 0; /* changed for redesign, was 30px */ + position: relative; + width: 100%; +} +#individual-info h1.foaf-person { + float:left; + padding-right:8px; + height:20px; + margin:-3px 8px 5px 0; +} +div#profileTypeContainer { + position:absolute; + right:0; + top:135px; +} +div#profileTypeContainer select { + float:none; + display:inline-block; + padding: .5em; + background: none repeat scroll 0 0 #FFFFFF; + border: 1px solid #E0DFDF; + border-radius: 5px 5px 5px 5px; + font-size: 14px; + margin-bottom: 0.8em; +} +div#profileTypeContainer h2 { + float:none; + display:inline-block; + margin: 0 0 0 0; + font-weight:bold; + font-size:1em; + color:#5e6363; + padding:0 0 0 0; +} +span.iconControlsEditable { + position:absolute; + right:0; + top:82px; +} +span.iconControlsNotEditable { + position:absolute; + right:0; + top:3px; +} +#overview { + clear: both; /* changed for redesign, was left */ +} +/* <------ 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 */ +} +#visualization h3 { + padding-top: 10px; + margin-bottom: 0; /* changed for redesign, was 10px */ +} +p#networks { + margin-bottom:10px; +} +.collaboratorship-link-separator { /* added for redesign */ + margin-top: 10px; + border-top: 1px solid #DDE4E3; + padding-top: 10px; +} +.sparkline_text { + font-size: .9em; /* changed for redesign, was .8em */ + text-align: left; + line-height: 1.5em; + width: 180px; +} +span.collaboratorship-link a img{ + vertical-align:middle; +} +td#totalPubs { /* added for redesign */ + font-size: 1.35em; + background: url(../../images/individual/pub-total-bkgrnd.png) top left no-repeat; + text-align:center; + vertical-align:middle; + width:48px; + height:48px; +} +td#tenYearCount { /* added for redesign */ + font-size: .85em; + padding-left:10px; + vertical-align:middle; +} +.infoIcon { + padding-right: 0; +} +div#pub_count_short_sparkline_vis { + margin-top: 4px; + height: 48px; + margin-bottom: 20px; +} +/* <------ INDIVIDUAL TEMPORAL GRAPH */ +#temporal-graph { + padding: 0 3px 8px 0; /* changed for redesign, was 0 3px 20px 0 */ + background-color: #fff; + margin-top: -4px; /* added for redesign */ +} +#temporal-graph h3 img { + padding-right: 10px; + vertical-align: middle; /* changed for redesign, was text-top */ +} + +/* <------ INDIVIDUAL MAP O' SCIENCE */ +#map-of-science { + padding: 0 3px 24px 0; /* changed for redesign, was 0 3px 20x 0 */ + background-color: #fff; +} +#map-of-science h3 img { + padding-right: 10px; + vertical-align: middle; /* changed for redesign, was text-top */ +} + +/* <------ POSITIONS */ +ul#individual-personInPosition { + list-style-type: circle; + padding-left: 10px; /* changed for redesign, was 20px */ + margin: 10px 0 0 0; /* added for redesign */ +} +ul#individual-personInPosition li { + line-height: 1em; + padding-bottom:10px; /* changed for redesign, was 15px */ +} +ul#individual-personInPosition li:last-child { + padding-bottom: 3px; /* changed for redesign, was 15px */ +} + +/* <------ CONTACTS AND WEBPAGES */ +div#contactsWebpages { + width:100%; + display:inline; + clear:both +} +div#contactContainer { + width:50%; + float:left; + clear:both; + padding:0 21px 0 0; +} +div#webpagesContainer { + width:47%; + float:left; + clear:right; + padding:0 0 0 0; +} +div#contactOuterDiv { + width:100%; + display:inline; +} +div#contactEmailDiv { + width:68%; + float:left; + overflow:hidden; +} +div#contactPhoneDiv { + width:32%; + float:right; + text-align:right; +} +/* <------ RESEARCH AREA */ +ul#individual-hasResearchArea li { + float: left; + padding-right: 10px; + margin-right: 10px; /* added for redesign */ + padding-left: 0; /* padding-left: 10px; out for redesign */ + border-right: 1px solid #5e6363; +} +h2#researchAreas { + vertical-align:bottom; +} +/* <------ QR Code */ +span#qrCodeImage { + position: absolute; + top: 30px; /* changed for redesign, was -9em */ + left: -120px !important; /* added for redesign */ + width:180px; /* added for redesign */ + border: solid 2px #ccc; + background: #fff; /* changed for redesign, was #fff */ + text-align:middle; /* added for redesign */ + 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 */ +} +a.qrCloseLink { + float: right; + padding-right: 1em; /* added for redesign */ + margin-right: 0; /* margin-right: .5em out for redesign */ + font-size: .8em; +} +/* MISCELLANEOUS------> */ +span#quickViewLink { + clear:both; + padding-left:47%; +} +span#quickViewLink img { + margin-top:35px; +} + +a#manageLabels { /* added for redesign but will work with existing templates */ + margin-left:20px; + font-size:0.7em; +} +/****** FROM WILMA.CSS ******/ +#individual-info h2.mainPropGroup { + border-bottom: 1px solid #DDE4E3; + padding-bottom:1px; + margin-bottom:8px; +} +#individual-info div#contactContainer h3{ + color:#8aa149; +} +ul#individual-personInPosition li { + padding-bottom:12px; + margin-left:10px; + line-height: 1.25em !important; +} +ul#individual-personInPosition li:last-child { + padding-bottom: 0; +} +td#totalPubs { + color: #2485AE; +} diff --git a/productMods/css/individual/individual-quick-view.css b/productMods/css/individual/individual-quick-view.css new file mode 100644 index 00000000..c23c5d33 --- /dev/null +++ b/productMods/css/individual/individual-quick-view.css @@ -0,0 +1,257 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +/* ADMIN PANEL------> */ +#admin { + font-size: .8em; + padding: 0 0 0 0 ; + margin: -15px 0 4px 0; + float:left; + width:55%; + height:70px; +} +#admin h3 { + display: inline-block; + padding: 3px 4px 3px 4px !important; + margin-bottom: 5px; + font-size: 14px; + float: left; +} +#admin .uri-link { + padding:0 0 0 11px; + clear: left; +} +/* <------ HEADER CONTENT ---------> */ +img.individual-photo { + width: 56px; + margin: -15px 10px 4px 0; + float: left; + border-width:2px !important; +} +h2#mainImage { + margin-top:36px; + margin-left:-10px; + float:left; + font-weight:bold; + width:80px !important; +} +section#label-title { + float:left; + width:88%; +} +.display-title-not-editable { + float-left; + font-size:1.15em; +} +.display-title-editable { + padding-left:0 !important; + margin-left:0 !important; + font-size:1em !important; + border:none !important; + display:inline-block; +} +div#titleContainer { + display:inline-block; +} +section#qv-share-contact { + width:49.1%; + float:left; + padding:0 .8em 0 0; + margin-left:-2em; + overflow:visible; + clear:left; +} +h2#preferredTitle { + color: #5E6363; + font-size: 1em; + font-weight: bold; + padding:6px 0 0 0; + margin-top:48px; +} +/* <------ QR Code */ +span#qrCodeImage { + position: absolute; + top: 30px; /* changed for redesign, was -9em */ + left: 76% !important; /* added for redesign */ + width:180px; /* added for redesign */ + border: solid 2px #ccc; + background: #fff; /* changed for redesign, was #fff */ + text-align:middle; /* added for redesign */ + 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 */ +} +/* <----- WEBPAGE CONTENT LEFT SIDE -----> */ +.edit-mainImage { + position: absolute; +/* background: rgba(255, 255, 255, 0.6); */ + padding: 0 0 0 0; + top: 44px; + left: 0; +} +.delete-mainImage { + position: absolute; + top: 44px; + left: 26px; + /* background: rgba(255, 255, 255, 0.6); */ + padding: 0 0 0 8px; +} +div#webpage-wrapper { + background-color: #e4e8e7; + margin:-7px 0 -16px 0; + padding-bottom:9px; + padding-top:3px; + display:inline-block; + width: 456px; +} +h2.websites { + margin-left:15px; + padding:4px 0 0 0; + border-bottom: 1px solid #a1d2e2; + padding-bottom:3px; + width:418px; + color: #5E6363; + font-size: 1em; + font-weight: bold; +} +ul.individual-webpage { + padding:18px 0 0 25px ; +} +ul.individual-webpage li:first-child { + padding: 0 0 0 0; +} +ul.individual-webpage li { + padding: 5px 5px 0 0; + float:left; +} +li.weblinkLarge { + margin-left:-14.5em; + margin-top:7em +} +li.weblinkSmall { + margin-left:-7.475em; + margin-top:3.425em +} +span.webpage-indicator-qv { + float:left; + font-size:0.825em; +} + +/* <------ INDIVIDUAL INTRO - RIGHT SIDE CONTENT */ +section#individual-intro { + overflow:visible ; +} +#individual-intro h1.fn { + padding-right:8px; + height:20px; + margin:-1px 8px 5px 0; +} +section.qv-individual-info { + float:left !important; + margin-right:-20px; + margin-left:7px; +} +#individual-info h2#personInPosition { + padding: 25px 0 2px 0; +} +span.iconControlsEditable { + float:right; + margin-top:1.2em +} +span.iconControlsNotEditable { + float:right; +} +div#profileTypeContainer { + float:right; + margin-right:92px; + margin-top:12px; +} +div#profileTypeContainer select { + float:none; + display:inline-block; + padding: .5em; + background: none repeat scroll 0 0 #FFFFFF; + border: 1px solid #E0DFDF; + border-radius: 5px 5px 5px 5px; + font-size: 14px; + margin-bottom: 0.8em; +} +div#profileTypeContainer h2 { + margin-right:8px; + font-weight:bold; + font-size:1em; + color:#5e6363; + padding:0 0 0 0; + float:none; + display:inline-block; +} +/* <------ INDIVIDUAL VISUALIZATION */ +#visualization { + width:100%; + clear:both; + padding-top:0 !important; + background:red !important; +} +ul#individual-visualization li { + float: left; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid #5e6363; +} +ul#individual-visualization li:last-child { + border: none; +} +/* <------ POSITIONS ------> */ +ul#individual-personInPosition { + list-style-type: circle; + padding-left: 10px; /* changed for redesign, was 20px */ + margin: 10px 0 0 0; /* added for redesign */ +} +ul#individual-hasResearchArea li { + float: left; + padding-right: 10px; + margin-right: 10px; /* added for redesign */ + padding-left: 0; /* padding-left: 10px; out for redesign */ + border-right: 1px solid #5e6363 ; + white-space:nowrap !important; +} +ul#individual-hasResearchArea li:last-child { + white-space:nowrap !important; +} + +ul#individual-personInPosition li { + margin-left: 8px !important; +} +/* <------ GEOGRAPHIC FOCUS */ +ul#individual-geographicFocus li { + float: left; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid #5e6363; +} +ul#individual-geographicFocus li:last-child { + border: none; +} +/* <------ MISC. ------> */ +span#fullViewLink { + position:relative; + padding-left:47%; +} +/****** FROM WILMA.CSS ******/ +#individual-info h2.mainPropGroup { + border-bottom: 1px solid #DDE4E3; + padding-bottom:1px; + margin-bottom:8px; +} +ul#individual-personInPosition li { + padding-bottom:12px; + margin-left:10px; + line-height: 1.25em !important; +} +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 */ +} diff --git a/productMods/css/individual/individual-vivo.css b/productMods/css/individual/individual-vivo.css index 10a243c6..d21bac20 100644 --- a/productMods/css/individual/individual-vivo.css +++ b/productMods/css/individual/individual-vivo.css @@ -14,9 +14,11 @@ ul#individual-tools li { ul#individual-phone { clear: both; list-style-type: circle; + margin-left: 15px; } ul#individual-phone li { font-size: .875em; + line-height: 1.5em; } ul#individual-phone li:last-child { margin-bottom: 10px; @@ -25,26 +27,35 @@ ul#individual-phone li:first-child { margin-top: 10px; } .icon-phone, .icon-email { - padding-right: 5px; + padding-right: 2px; } #individual-intro ul.individual-urls { list-style-type: circle; - margin-left: 20px; + margin-left: 15px; } #individual-intro ul.individual-urls li { font-size: .875em; - line-height: 1.7em; + line-height: 1.5em; + padding-bottom:5px; } ul.individual-emails { clear: both; padding-left: 0; + list-style-type: circle; + margin-left: 20px; } #additional-emails li:last-child { margin-bottom: 18px; } ul.individual-emails li { font-size: .875em; - line-height: 1.3em; + line-height: 1.5em; +} +ul#individual-phone { + list-style: url(../../images/phoneIconSmall.gif); +} +ul.individual-emails { + list-style: url(../../images/emailIconSmall.gif); } ul#webpages{ margin-bottom: 5px; @@ -83,11 +94,9 @@ ul#additional-emails li { width: 100%; float: none; } -ul#individual-tools-people { - margin-top: 5px; +div#individual-tools-people { height: 20px; - padding-bottom: 20px; - list-style-type: none; + padding-bottom: 24px; clear: both; margin-bottom: 15px; } @@ -126,12 +135,12 @@ div.overview-value :last-child { width: 100%; } /* <------ INDIVIDUAL VISUALIZATION */ -#visualization { +#right-hand-column { padding: 0 0 0 20px; float: right; background-color: #fff; } -#visualization h3 { +#right-hand-column h3 { padding-top: 10px; margin-bottom: 10px; } @@ -231,7 +240,7 @@ a.qrCloseLink { } /* MISCELLANEOUS------> */ .listDateTime { - padding: 0.2em 0.4em; + padding: 0 0.4em; font-size: 0.8em; background: #f4f4f4; } diff --git a/productMods/css/visualization/visualization.css b/productMods/css/visualization/visualization.css index ee1097bb..4e891051 100644 --- a/productMods/css/visualization/visualization.css +++ b/productMods/css/visualization/visualization.css @@ -18,7 +18,7 @@ span.incomplete-data-holder, } .collaboratorship-icon { float: left; - padding-right: 5px; + padding-right: 8px; } .collaboratorship-link a { font-size: 0.9em; @@ -48,12 +48,12 @@ span.incomplete-data-holder, border-top: 1px dotted #A6B1B0; padding-top: 20px; } -.sparkline_text { - font-size: .8em; - font-weight: bold; +.sparkline_text, .grey-text { + font-size: .9em; text-align: left; line-height: 1.5em; width: 180px; + color: #5e6363; } .google-visualization-sparkline-default { margin-bottom: 5px; @@ -80,6 +80,7 @@ span.incomplete-data-holder, .infoIcon { padding-right:30px; } + /* ---------------------------*/ /* Visualization Tools -------*/ /* ---------------------------*/ diff --git a/productMods/images/individual/contact-info-icon.png b/productMods/images/individual/contact-info-icon.png new file mode 100644 index 00000000..4e1372b1 Binary files /dev/null and b/productMods/images/individual/contact-info-icon.png differ diff --git a/productMods/images/individual/fullViewBubble.png b/productMods/images/individual/fullViewBubble.png new file mode 100644 index 00000000..c42ce400 Binary files /dev/null and b/productMods/images/individual/fullViewBubble.png differ diff --git a/productMods/images/individual/fullViewIcon.png b/productMods/images/individual/fullViewIcon.png new file mode 100644 index 00000000..9e18ddca Binary files /dev/null and b/productMods/images/individual/fullViewIcon.png differ diff --git a/productMods/images/individual/pub-total-bkgrnd.png b/productMods/images/individual/pub-total-bkgrnd.png new file mode 100644 index 00000000..650e4f55 Binary files /dev/null and b/productMods/images/individual/pub-total-bkgrnd.png differ diff --git a/productMods/images/individual/qr-code-icon.png b/productMods/images/individual/qr-code-icon.png new file mode 100644 index 00000000..af954b19 Binary files /dev/null and b/productMods/images/individual/qr-code-icon.png differ diff --git a/productMods/images/individual/quickViewBubble.png b/productMods/images/individual/quickViewBubble.png new file mode 100644 index 00000000..045b8b16 Binary files /dev/null and b/productMods/images/individual/quickViewBubble.png differ diff --git a/productMods/images/individual/quickViewIcon.png b/productMods/images/individual/quickViewIcon.png new file mode 100644 index 00000000..e8b1b65b Binary files /dev/null and b/productMods/images/individual/quickViewIcon.png differ diff --git a/productMods/images/individual/research-group-icon.png b/productMods/images/individual/research-group-icon.png new file mode 100644 index 00000000..5d82c382 Binary files /dev/null and b/productMods/images/individual/research-group-icon.png differ diff --git a/productMods/images/individual/researchAreaBubble.png b/productMods/images/individual/researchAreaBubble.png new file mode 100644 index 00000000..f9358817 Binary files /dev/null and b/productMods/images/individual/researchAreaBubble.png differ diff --git a/productMods/images/individual/share-uri-icon.png b/productMods/images/individual/share-uri-icon.png new file mode 100644 index 00000000..a79edd97 Binary files /dev/null and b/productMods/images/individual/share-uri-icon.png differ diff --git a/productMods/images/individual/weblinkIconLarge.png b/productMods/images/individual/weblinkIconLarge.png new file mode 100644 index 00000000..bd1b864b Binary files /dev/null and b/productMods/images/individual/weblinkIconLarge.png differ diff --git a/productMods/images/individual/weblinkIconSmall.png b/productMods/images/individual/weblinkIconSmall.png new file mode 100644 index 00000000..c0b14768 Binary files /dev/null and b/productMods/images/individual/weblinkIconSmall.png differ diff --git a/productMods/images/individual/webpage-popout-bottom.png b/productMods/images/individual/webpage-popout-bottom.png new file mode 100644 index 00000000..bfe3234e Binary files /dev/null and b/productMods/images/individual/webpage-popout-bottom.png differ diff --git a/productMods/images/individual/webpage-popout-top.png b/productMods/images/individual/webpage-popout-top.png new file mode 100644 index 00000000..f9b1ff8c Binary files /dev/null and b/productMods/images/individual/webpage-popout-top.png differ diff --git a/productMods/js/individual/individualProfilePageType.js b/productMods/js/individual/individualProfilePageType.js new file mode 100644 index 00000000..575f7fce --- /dev/null +++ b/productMods/js/individual/individualProfilePageType.js @@ -0,0 +1,78 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +var profilePageType = { + + /* *** Initial page setup *** */ + + onLoad: function() { + + this.mixIn(); + // in the event that the individual does not have a profile type set, + // the controller returns "none" and the select is set to "standard". + // we need to distinguish these when it comes time to do a retraction or + // not. So "default" = the type defined by the triple; "selected" = + // the selected option. + var selectedProfileType = ""; + this.initPage(); + }, + + mixIn: function() { + + // Get the custom form data from the page + $.extend(this, profileTypeData); + }, + + // Initial page setup. Called only at page load. + initPage: function() { + + profilePageType.selectedProfileType = $('select#profilePageType').val(); + this.bindEventListeners(); + + }, + + bindEventListeners: function() { + + $('select#profilePageType').change( function() { + profilePageType.processSelection($('select#profilePageType').val()) + }); + + }, + + processSelection: function(newType) { + + // if no profile page type is defined for this individual, don't do a retraction but pass an empty string to the controller + var retract = ""; + var add = "<" + profilePageType.individualUri + "> " + + " ."; + + if ( profilePageType.defaultProfileType != "none" ) { + retract = "<" + profilePageType.individualUri + "> " + + " ."; + } + + $.ajax({ + url: profilePageType.processingUrl, + type: 'POST', + data: { + additions: add, + retractions: retract + }, + dataType: 'json', + context: newType, // context for callback + complete: function(request, status) { + + if (status == 'success') { + location.reload(true); + } + else { + alert('Error processing request: the unchecked labels could not be deleted.'); + $('select#profilePageType').val(profilePageType.selectedProfileType); + } + } + }); + } +}; + +$(document).ready(function() { + profilePageType.onLoad(); +}); diff --git a/productMods/js/individual/individualQtipBubble.js b/productMods/js/individual/individualQtipBubble.js new file mode 100644 index 00000000..5b56c814 --- /dev/null +++ b/productMods/js/individual/individualQtipBubble.js @@ -0,0 +1,119 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +$(document).ready(function(){ + // This function creates and styles the "qTip" tooltip that displays the bubble text when the user hovers + // over the research area "group" icon. + $('#researchAreaIcon').each(function() + { + $(this).qtip( + { + content: { + prerender: true, + text: ' ' + }, + position: { + corner: { + target: 'topleft', + tooltip: 'bottomcenter' + }, + adjust: { + x:22, + y:30 + } + }, + show: { + when: { + event: 'mouseenter' + } + }, + hide: { + fixed: false, + when: { + event: 'mouseleave' + } + }, + style: { + padding: '0em', + height: 56, + width: 180, + border: 'none', + background:'url(' + imagesPath + '/individual/researchAreaBubble.png) no-repeat' + } + }); + }); + + $('#fullViewIcon').each(function() + { + $(this).qtip( + { + content: { + text: ' ' + }, + position: { + corner: { + target: 'topleft', + tooltip: 'bottomcenter' + }, + adjust: { + x:27, + y:30 + } + }, + show: { + + when: { + event: 'mouseenter' + } + }, + hide: { + fixed: false, + when: { + event: 'mouseleave' + } + }, + style: { + padding: '0em', + height: 56, + width: 140, + border: 'none', + background: 'url(' + imagesPath + '/individual/quickViewBubble.png) no-repeat' + } + }); + }); + + $('#quickViewIcon').each(function() + { + $(this).qtip( + { + content: { + text: ' ' + }, + position: { + corner: { + target: 'topleft', + tooltip: 'bottomcenter' + }, + adjust: { + x:28, + y:30 + } + }, + show: { + when: {event: 'mouseenter'} + }, + hide: { + fixed: false, + when: { + event: 'mouseleave' + } + }, + style: { + padding: '0em', + height: 56, + width: 144, + border: 'none', + background: 'url(' + imagesPath + '/individual/fullViewBubble.png) no-repeat' + } + }); + }); +}); \ No newline at end of file diff --git a/productMods/js/individual/individualUtils.js b/productMods/js/individual/individualUtils.js index 8cfcc787..a1226c60 100644 --- a/productMods/js/individual/individualUtils.js +++ b/productMods/js/individual/individualUtils.js @@ -131,8 +131,10 @@ $(document).ready(function(){ } // if there are webpages but no contacts (email/phone), extend - // the webpage border the full width. Used with "standard" profile view. + // the webpage border the full width. Used with "2 column" profile view. if ( $('h2#contactHeading').length < 1 ) { - $('div#webpagesContainer').css('width', '100%').css('clear','both'); + if ( $('div#webpagesContainer').length ) { + $('div#webpagesContainer').css('width', '100%').css('clear','both'); + } } }); diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl index 56ee0069..851699e7 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-organization.ftl @@ -5,7 +5,7 @@ <#-- Do not show the link for temporal visualization unless it's enabled --> <#if temporalVisualizationEnabled> <#assign classSpecificExtension> -
+
<#include "individual-visualizationTemporalGraph.ftl"> <#include "individual-visualizationMapOfScience.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 new file mode 100644 index 00000000..f7413087 --- /dev/null +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-2column.ftl @@ -0,0 +1,174 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Individual profile page template for foaf:Person individuals --> + +<#-- <#include "individual-setup.ftl"> --> +<#import "individual-qrCodeGenerator.ftl" as qr> +<#import "lib-vivo-properties.ftl" as vp> +<#if !labelCount??> + <#assign labelCount = 0 > + +
+
+ <#-- Image --> + <#assign individualImage> + <@p.image individual=individual + propertyGroups=propertyGroups + namespaces=namespaces + editable=editable + showPlaceholder="always" /> + + + <#if ( individualImage?contains(' + <#assign infoClass = 'class="withThumb"'/> + + +
${individualImage}
+ + <#include "individual-visualizationFoafPerson.ftl"> +
+
+ <#include "individual-adminPanel.ftl"> +
+ <#if relatedSubject??> +

${relatedSubject.relatingPredicateDomainPublic} for ${relatedSubject.name}

+

← return to ${relatedSubject.name}

+ <#else> +

style="float:left;border-right:1px solid #A6B1B0;"> + <#-- Label --> + <@p.label individual editable labelCount/> +

+ <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> + <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> + <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <@p.addLinkWithLabel title editable /> + <#list title.statements as statement> + <#if !editable > +
${statement.value}
+ <#else> + ${statement.value} + <@p.editingLinks "${title.name}" statement editable /> + + + + <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> + <#if ! (title.statements)?has_content> + <@p.mostSpecificTypesPerson individual editable/> + + + + <#include "individual-iconControls.ftl"> + + <#if editable && profilePageTypesEnabled > +
+

Profile type

+ +
+ +
+ + <#include "individual-positions.ftl"> + + + <#if !editable> +

+ + <#include "individual-overview.ftl"> + + + <#include "individual-researchAreas.ftl"> + + + +
+
+ <#include "individual-contactInfo-2column.ftl"> +
+
+ <#assign webpage = propertyGroups.pullProperty("${core}webpage")!> + <#if webpage?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> +

Websites <@p.addLink webpage editable ""/>

+ <@p.verboseDisplay webpage /> + <#assign localName = webpage.localName> +
    + <@p.objectProperty webpage editable /> +
+ +
+
+ <#include "individual-openSocial.ftl"> +
+
+ +<#assign nameForOtherGroup = "other"> <#-- individual-properties.ftl --> +<#-- Ontology properties --> +<#if !editable> + <#-- We don't want to see the first name and last name unless we might edit them. --> + <#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/firstName")!> + <#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!> + + +<#include "individual-property-group-tabs.ftl"> + +<#if targetedView?has_content || user.loggedIn > + + + full view icon + + + +<#if !editable> + + + +<#assign rdfUrl = individual.rdfUrl> + +<#if rdfUrl??> + + + + +${stylesheets.add('', + '', + '', + '')} + +${headScripts.add('', + '', + '', + '', + '')} + +${scripts.add('', + '', + '', + '', + '', + '')} diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl new file mode 100644 index 00000000..cb3bfc64 --- /dev/null +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person-quickview.ftl @@ -0,0 +1,232 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- The "quick view" individual profile page template for foaf:Person individuals --> + + +<#-- <#include "individual-setup.ftl"> --> +<#import "individual-qrCodeGenerator.ftl" as qr> +<#import "lib-vivo-properties.ftl" as vp> + +<#if !labelCount??> + <#assign labelCount = 0 > + + +<#assign individualImage> + <@p.image individual=individual + propertyGroups=propertyGroups + namespaces=namespaces + editable=editable + showPlaceholder="always"/> + + +<#-- + the display in this template is driven by whether the individual has a web page, + so set this variable now +--> +<#assign hasWebpage = false> +<#assign web = individual.propertyList.getProperty("${core}webpage")!> +<#if editable > + <#if web.first()?? > + <#assign hasWebpage = true> + <#else> + <#assign hasWebpage = false> + +<#else> + <#if (web?size > 0) > + <#assign hasWebpage = true> + <#else> + <#assign hasWebpage = false> + + + +
+
style="width:45%" > +
+ <#if relatedSubject??> +

${relatedSubject.relatingPredicateDomainPublic} for ${relatedSubject.name}

+

← return to ${relatedSubject.name}

+ <#else> + <#-- Image --> +
${individualImage}
+

style="float:left;border-right:1px solid #A6B1B0;"> + <#-- Label --> + <@p.label individual editable labelCount/> +

+ <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> + <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> + <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <@p.addLinkWithLabel title editable /> + <#list title.statements as statement> + <#if !editable > +
${statement.value}
+ <#else> + ${statement.value} + <@p.editingLinks "${title.name}" statement editable /> + + + + <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> + <#if ! (title.statements)?has_content> + <@p.mostSpecificTypesPerson individual editable /> + + +
+
+ <#include "individual-adminPanel.ftl"> + + + <#include "individual-iconControls.ftl"> + + <#if editable && profilePageTypesEnabled > +
style="margin-top:22px"> +

Profile type

+ +
+ + + <#-- + If this individual has a web page or pages, then we highlight them on the left-hand side + of the profile page against a shaded background. If not, all the right-hand content shifts + left and displays across the full width of the page. + --> + <#if hasWebpage > + + +
+ + <#include "individual-positions.ftl"> + + + <#include "individual-researchAreas.ftl"> + + + <#assign geographicFocus = propertyGroups.pullProperty("${core}geographicFocus")!> + <#if geographicFocus?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> +

Geographic Focus <@p.addLink geographicFocus editable ""/>

+ <@p.verboseDisplay geographicFocus /> + <#assign localName = geographicFocus.localName> + + <#if geographicFocus.subclasses?has_content > + <#assign subclasses = geographicFocus.subclasses> + <#list subclasses as subclass> + <#assign subclassName = subclass.name!> +
    + <@p.objectPropertyList geographicFocus editable subclass.statements geographicFocus.template/> +
+ + <#else> +
    + <@p.objectProperty geographicFocus editable /> +
+ + + + <#-- If the individual does not have webpages and we're in edit mode, provide the opportunity to add webpages --> + <#if editable && !hasWebpage > + + <#assign webpage = propertyGroups.pullProperty("${core}webpage")!> + <#if webpage?has_content> +

Websites <@p.addLink webpage editable ""/>

+ <@p.verboseDisplay webpage /> + <#assign localName = webpage.localName> +
    + <@p.objectProperty webpage editable /> +
+ + + <#include "individual-visualizationQuickView.ftl"> + + <#include "individual-openSocial.ftl"> +
+
+ +

+
+

+ + + full view icon + + +<#if !editable> + + + +<#assign rdfUrl = individual.rdfUrl> + +<#if rdfUrl??> + + + +<#if editable> + + +${stylesheets.add('', + '', + '', + '')} + +${headScripts.add('', + '', + '', + '', + '')} + +${scripts.add('', + '', + '', + '', + '', + '')} diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl index e2af21fa..a7f2911c 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -1,152 +1,48 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#-- Individual profile page template for foaf:Person individuals --> +<#-- + + This version of individual--foaf-person.ftl is a "router" template. The original VIVO + version of this template now resides in the /themes/wilma/templates directory. + + This version of the template is used when the profile page types feature is enabled. + This template serves to "rout" the user to the correct template based (1) the + profile page type of the foaf person being displayed or (2) the targeted view that + the user wants to see. For example, when a user is routed to a quick view template, + the user has the option of displaying the full view. If the user chooses that option, + the targetedView variable gets set. + + This template could also be used to load just the "individual--foaf-person-2column.ftl" + without enabling profile page types. + + --> + <#include "individual-setup.ftl"> -<#import "individual-qrCodeGenerator.ftl" as qr> -<#import "lib-vivo-properties.ftl" as vp> -<#if !labelCount??> - <#assign labelCount = 0 > - -
-
- <#-- Image --> - <#assign individualImage> - <@p.image individual=individual - propertyGroups=propertyGroups - namespaces=namespaces - editable=editable - showPlaceholder="always" /> - +<#-- + First, check to see if profile page types are enabled. If not, get the 2 column template: + "individual--foaf-person-2column.ftl". - <#if ( individualImage?contains(' - <#assign infoClass = 'class="withThumb"'/> - - -
${individualImage}
- - - - <#include "individual-contactInfo.ftl"> - - <#-- Links --> - <@vp.webpages propertyGroups editable "individual-urls-people" /> -
- -
- <#include "individual-visualizationFoafPerson.ftl"> - - <#include "individual-adminPanel.ftl"> - -
- <#if relatedSubject??> -

${relatedSubject.relatingPredicateDomainPublic} for ${relatedSubject.name}

-

← return to ${relatedSubject.name}

- <#else> -

- <#-- Label --> - <@p.label individual editable labelCount/> - - <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> - <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> - <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> - <@p.addLinkWithLabel title editable /> - <#list title.statements as statement> - ${statement.value} - <@p.editingLinks "${title.name}" statement editable /> - - - <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> - <#if ! (title.statements)?has_content> - <@p.mostSpecificTypes individual /> - -

- - - <#-- Positions --> - <#assign positions = propertyGroups.pullProperty("${core}personInPosition")!> - <#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> - <@p.objectPropertyListing positions editable /> - -
- - <#-- Overview --> - <#include "individual-overview.ftl"> - - <#-- Research Areas --> - <#assign researchAreas = propertyGroups.pullProperty("${core}hasResearchArea")!> - <#if researchAreas?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> - <@p.objectPropertyListing researchAreas editable /> - - - <#-- VIVO OpenSocial Extension by UCSF --> - <#if openSocial??> - <#if openSocial.visible> -
-

OpenSocial

- <#-- It would likely make sense to remove the #if logic as it is safe and --> - <#-- arguably better to just have both divs in all conditions --> - <#if editable> -
- <#else> -
- -
- - -
- -
- -<#assign nameForOtherGroup = "other"> <#-- used by both individual-propertyGroupMenu.ftl and individual-properties.ftl --> - -<#-- Property group menu --> -<#-- With release 1.6 the property group is no longer used. The include statement - remains in the event a particular VIVO site still wants to use it with the new - collapsible groups. - - <#include "individual-propertyGroupMenu.ftl"> + NOTE: the assumption here is that if this template is being loaded, rather than the + individual--foaf-person.ftl template that resides in the theme directory, than the site + administrator wants to use 2 column template by itself or with the quick view template. --> -<#-- Ontology properties --> -<#if !editable> - <#-- We don't want to see the first name and last name unless we might edit them. --> - <#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/firstName")!> - <#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!> + +<#assign selectedTemplate = "individual--foaf-person-2column.ftl" > + + +<#if profilePageTypesEnabled > + <#assign profilePageType = profileType > + + <#-- targetedView takes precedence over the profilePageType. --> + + <#if targetedView?has_content> + <#if targetedView != "standardView"> + <#assign selectedTemplate = "individual--foaf-person-quickview.ftl" > + + <#elseif profilePageType == "quickView" > + <#assign selectedTemplate = "individual--foaf-person-quickview.ftl" > + +<#include selectedTemplate > -<#include "individual-properties.ftl"> - -<#assign rdfUrl = individual.rdfUrl> - -<#if rdfUrl??> - - - - -${stylesheets.add('', - '', - '', - '')} - -${headScripts.add('', - '', - '', - '')} - -${scripts.add('', - '', - '', - '', - '')} - diff --git a/productMods/templates/freemarker/body/individual/individual.ftl b/productMods/templates/freemarker/body/individual/individual.ftl index f5043350..ececf942 100644 --- a/productMods/templates/freemarker/body/individual/individual.ftl +++ b/productMods/templates/freemarker/body/individual/individual.ftl @@ -8,8 +8,8 @@ <#assign individualProductExtension> <#-- Include for any class specific template additions --> ${classSpecificExtension!} - <@vp.webpages propertyGroups editable /> + <#include "individual-webpage.ftl"> <#include "individual-overview.ftl">
@@ -18,9 +18,7 @@ <#include "individual-vitro.ftl"> -${stylesheets.add('', - '')} +${stylesheets.add('')} ${headScripts.add('')} -${scripts.add('', - '')} +${scripts.add('')} diff --git a/productMods/templates/freemarker/body/partials/individual/individual-adminPanel.ftl b/productMods/templates/freemarker/body/partials/individual/individual-adminPanel.ftl new file mode 100644 index 00000000..3dcca64c --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-adminPanel.ftl @@ -0,0 +1,23 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Template for admin panel on individual profile page --> + +<#import "lib-form.ftl" as form> + +<#if individual.showAdminPanel> +
+

Admin Panel

Edit this individual + +
+ <#if verbosePropertySwitch?has_content> + <#assign anchorId = "verbosePropertySwitch"> + <#assign currentValue = verbosePropertySwitch.currentValue?string("on", "off")> + <#assign newValue = verbosePropertySwitch.currentValue?string("off", "on")> + Verbose property display is ${currentValue} | + Turn ${newValue} + +
+ + +
+ \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl new file mode 100644 index 00000000..521e1efa --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo-2column.ftl @@ -0,0 +1,75 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Contact info on individual profile page --> +<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!> +<#assign pEmail = propertyGroups.pullProperty("${core}primaryEmail")!> +<#assign email = propertyGroups.pullProperty("${core}email")!> + +<#if editable || ( phone?has_content || pEmail?has_content || email?has_content ) > +

Contact

+ + +<#-- the layout is different in edit mode --> +<#if !editable> +
+
+ +<#-- Primary Email --> +<@emailLinks "${core}primaryEmail" pEmail /> + +<#-- Additional Emails --> +<@emailLinks "${core}email" email /> +<#if !editable> +
+
+ +<#-- Phone --> +<@phoneLinks phone /> +<#if !editable> +
+
+ +<#macro phoneLinks phone> +<#if phone?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <#if editable> +

phone<@p.addLink phone editable />

+ <@p.verboseDisplay phone /> + + <#if phone.statements?has_content> <#-- if there are any statements --> +
    + <#list phone.statements as statement> +
  • style="padding-left:10px;"> + ${statement.value} + <@p.editingLinks "${phone.localName}" statement editable /> +
  • + +
+ + + +<#macro emailLinks property email> + <#if property == "${core}primaryEmail"> + <#local listId = "primary-email"> + <#local label = "primary email"> + <#else> + <#local listId = "additional-emails"> + <#local label = "additional emails"> + + <#if email?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <#if editable> +

${label}<@p.addLink email editable label/>

+ <@p.verboseDisplay email /> + + <#if email.statements?has_content> <#-- if there are any statements --> +
    + <#list email.statements as statement> +
  • style="padding-left:10px;"> + + + <@p.editingLinks "${email.localName}" statement editable /> +
  • + +
+ + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl index d915843c..983ef2ee 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -2,21 +2,29 @@ <#-- Contact info on individual profile page --> +<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!> +<#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
+ + <#-- Primary Email --> -<@emailLinks "${core}primaryEmail" /> +<@emailLinks "${core}primaryEmail" primaryEmail /> <#-- Additional Emails --> -<@emailLinks "${core}email" /> +<@emailLinks "${core}email" addlEmail /> <#-- Phone --> -<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!> + <#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 -->
    <#list phone.statements as statement>
  • - phone icon${statement.value} + <#-- phone icon -->${statement.value} <@p.editingLinks "${phone.localName}" statement editable />
  • @@ -24,8 +32,7 @@ -<#macro emailLinks property> - <#assign email = propertyGroups.pullProperty(property)!> +<#macro emailLinks property email> <#if property == "${core}primaryEmail"> <#local listId = "primary-email"> <#local label = "Primary Email"> @@ -39,7 +46,7 @@
      <#list email.statements as statement>
    • - email icon + <#-- email icon --> <@p.editingLinks "${email.localName}" statement editable />
    • @@ -47,4 +54,4 @@
    - \ No newline at end of file + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl b/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl new file mode 100644 index 00000000..d1cac1a5 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-iconControls.ftl @@ -0,0 +1,21 @@ +<#-- $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 /> + +<#-- + +Some contact information is displayed on the profile page by default; e.g., phone numbes and email addresses. If an institution +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. + +<#if netid?has_content> + + contact info + + + +--> \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl new file mode 100644 index 00000000..01553334 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-positions.ftl @@ -0,0 +1,11 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- List of positions for the individual --> +<#assign positions = propertyGroups.pullProperty("${core}personInPosition")!> +<#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <#assign localName = positions.localName> +

    ${positions.name?capitalize} <@p.addLink positions editable /> <@p.verboseDisplay positions />

    +
      + <@p.objectProperty positions editable /> +
    + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-properties.ftl b/productMods/templates/freemarker/body/partials/individual/individual-properties.ftl new file mode 100644 index 00000000..48ceefde --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-properties.ftl @@ -0,0 +1,40 @@ +<#-- $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 ed020e51..6061fa19 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl @@ -34,10 +34,10 @@
    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-researchAreas.ftl b/productMods/templates/freemarker/body/partials/individual/individual-researchAreas.ftl new file mode 100644 index 00000000..3b0c0005 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-researchAreas.ftl @@ -0,0 +1,15 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- List of research areas for the individual --> +<#assign researchAreas = propertyGroups.pullProperty("${core}hasResearchArea")!> +<#if researchAreas?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <#assign localName = researchAreas.localName> +

    + ${researchAreas.name?capitalize} + research areas + <@p.addLink researchAreas editable /> <@p.verboseDisplay researchAreas /> +

    +
      + <@p.objectProperty researchAreas editable /> +
    + diff --git a/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl b/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl index 1692aa95..f84f7cb7 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-visualizationFoafPerson.ftl @@ -14,8 +14,7 @@ ${stylesheets.add('')} <#assign standardVisualizationURLRoot ="/visualization"> - -
    + <#if isAuthor> <#assign coAuthorIcon = "${urls.images}/visualization/coauthorship/co_author_icon.png"> <#assign mapOfScienceIcon = "${urls.images}/visualization/mapofscience/scimap_icon.png"> @@ -32,7 +31,7 @@ @@ -41,7 +40,7 @@ @@ -66,10 +65,9 @@ -
    \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-visualizationMapOfScience.ftl b/productMods/templates/freemarker/body/partials/individual/individual-visualizationMapOfScience.ftl index 1cd665e5..3ebfd33b 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-visualizationMapOfScience.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-visualizationMapOfScience.ftl @@ -3,5 +3,5 @@ <#-- Map Of Science visualization --> \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-visualizationQuickView.ftl b/productMods/templates/freemarker/body/partials/individual/individual-visualizationQuickView.ftl new file mode 100644 index 00000000..f8f63ccc --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-visualizationQuickView.ftl @@ -0,0 +1,46 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Template for sparkline visualization on individual profile page --> + +<#-- Determine whether this person is an author --> +<#assign isAuthor = p.hasStatements(propertyGroups, "${core}authorInAuthorship") /> + +<#-- Determine whether this person is involved in any grants --> +<#assign isInvestigator = ( p.hasStatements(propertyGroups, "${core}hasInvestigatorRole") || + p.hasStatements(propertyGroups, "${core}hasPrincipalInvestigatorRole") || + p.hasStatements(propertyGroups, "${core}hasCo-PrincipalInvestigatorRole") ) > + +<#if (isAuthor || isInvestigator)> + + <#assign standardVisualizationURLRoot ="/visualization"> + <#assign coauthor = ""> + <#assign coinvestigator = ""> + <#assign mapofscience = ""> +

    Networks

    + <#if isAuthor> + <#assign coAuthorIcon = "${urls.images}/visualization/coauthorship/co_author_icon.png"> + <#assign mapOfScienceIcon = "${urls.images}/visualization/mapofscience/scimap_icon.png"> + <#assign coAuthorVisUrl = individual.coAuthorVisUrl()> + <#assign mapOfScienceVisUrl = individual.mapOfScienceUrl()> + + <#assign coauthor = "
  • Co-author network iconCo-Authors
  • " > + + <#assign mapofscience = "
  • Map Of Science iconMap Of Science
  • " > + + + <#if isInvestigator> + <#assign coInvestigatorVisUrl = individual.coInvestigatorVisUrl()> + <#assign coInvestigatorIcon = "${urls.images}/visualization/coauthorship/co_investigator_icon.png"> + <#assign coinvestigator = "
  • Co-investigator network iconCo-Investigators
  • "> + +
      + ${coauthor} + ${coinvestigator} + ${mapofscience} +
    + + + \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl b/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl new file mode 100644 index 00000000..d3ec7d61 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/individual-webpage.ftl @@ -0,0 +1,22 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- This snippet will be included in lib-vivo-properties.ftl, so users will be able to have a + different view when extending wilma theme + + <#assign webpage = propertyGroups.pullProperty("${core}webpage")!> + <@p.objectPropertyListing webpage editable /> + + +--> + <#assign webpage = propertyGroups.pullProperty("${core}webpage")!> + <#if webpage?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <#if !editable && individual.person() > +
    • Websites
    + + <@p.addLinkWithLabel webpage editable "Websites"/> + <#assign localName = webpage.localName> +
      style="font-size:1.15em"> + <@p.objectProperty webpage editable /> +
    + + diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl new file mode 100644 index 00000000..fa5ef8a2 --- /dev/null +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-webpage-quickview.ftl @@ -0,0 +1,80 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- "Quick view" template for core:webpage + + This template must be self-contained and not rely on other variables set for the individual page, because it + is also used to generate the property statement during a deletion. +--> + +<#-- *** Use of the quick view template requires that a web service provide snap shots of the web sites that *** + *** are defined on a foaf:Person individual's profile page. The web service can be one that you develop *** + *** or implement, or it can be a paid service. The service is called in the src attribute of the image *** + *** element that contains the web page snap shot, as shown below in the template. Note that this code is *** + *** currently commented out and a placeholder is displayed instead. *** +--> + +<#assign count = property.statements?size!> + +<#assign identifier> + <#if statement.url?has_content> + ${statement.url?replace(":","")?replace("/","")?replace(".","-")?replace("&","")?replace("%","")?replace("?","")?replace("=","")}<#t> + <#else> + "noUrl"<#t> + + + + +<@showWebpage statement count identifier/> + +<#macro showWebpage statement count identifier> +<#local linkText> + <#if statement.anchor?has_content>${statement.anchor}<#t> + <#elseif statement.url?has_content>${statement.url}<#t> + + +<#local imgSize = "&thumbnail=true" > + +<#if (statement.rank?? && statement.rank == "1") || ( count == 1 ) > + <#local imgSize = "" > + +<#if statement.url?has_content> + +<#-- This section commented out until the web service for the web page snapshot is implemented. + The assumption is made that the service will require the url of the web page and possibly + an image size as well. + +Loading website image. . .    + + + + + <#if imgSize == "" > + +
  • + + + + <#else> +
  • +
  • + + + + +--> +<#-- Here is the placeholder link --> + ${linkText} +<#else> + ${statement.linkName} (no url provided for link) + + + + + \ No newline at end of file diff --git a/productMods/templates/freemarker/lib/lib-vivo-properties.ftl b/productMods/templates/freemarker/lib/lib-vivo-properties.ftl index 426bb2ee..d74c79be 100644 --- a/productMods/templates/freemarker/lib/lib-vivo-properties.ftl +++ b/productMods/templates/freemarker/lib/lib-vivo-properties.ftl @@ -25,10 +25,10 @@ <#if webpage?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> diff --git a/productMods/templates/freemarker/lib/lib-vivo-property-webpage.ftl b/productMods/templates/freemarker/lib/lib-vivo-property-webpage.ftl deleted file mode 100644 index dbf2fa20..00000000 --- a/productMods/templates/freemarker/lib/lib-vivo-property-webpage.ftl +++ /dev/null @@ -1,9 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#-- This snippet will be included in lib-vivo-properties.ftl, so users will be able to have a - different view when extending wilma theme ---> - -
      - <@p.objectPropertyList webpage editable /> -
    diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl index b462f957..b049fe1f 100644 --- a/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl +++ b/productMods/templates/freemarker/visualization/publication/personPublicationCountDynamicActivator.ftl @@ -1,5 +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 + + 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"> + <#include "personPublicationCountNoSparkline.ftl"> diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationCountNoSparkline.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationCountNoSparkline.ftl new file mode 100644 index 00000000..8c91ba88 --- /dev/null +++ b/productMods/templates/freemarker/visualization/publication/personPublicationCountNoSparkline.ftl @@ -0,0 +1,121 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#assign visContainerID = '${sparklineVO.visContainerDivID}'> + +<#if sparklineVO.shortVisMode> + <#assign sparklineContainerID = 'pub_count_short_sparkline_vis'> +<#else> + <#assign sparklineContainerID = 'pub_count_full_sparkline_vis'> + + +<#-- This is used to prevent collision between sparkline & visualization conatiner div ids. --> +<#if visContainerID?upper_case == sparklineContainerID?upper_case> + <#assign sparklineContainerID = visContainerID + "_spark"> + +
    +
    + + +
    + +
    diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl index aae1746f..172b1dcf 100644 --- a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl +++ b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl @@ -144,17 +144,26 @@ which would not be mentioned in the other case because the renderedShortSparks only hold counts of publications which have any date associated with it. */ + var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedShortSparks; - - $('#${sparklineContainerID} td.sparkline_number').text(totalPubs + " in the last 10 full").css("font-weight", "bold").css("font-size",".85em").attr("class", "grey"); - - var sparksText = "years"; - - if (totalPubs !== totalPublicationCount) { - sparksText += ' (' + totalPublicationCount + ' total)' ; - } + var sparksText = ""; + if ( !onlyUnknownYearPublications ) { - sparksText += " information icon" ; + $('#${sparklineContainerID} td.sparkline_number').text(totalPubs + " in the last 10 full").attr("class", "grey-text"); + + sparksText += "years"; + + if (totalPubs !== totalPublicationCount) { + sparksText += ' (' + totalPublicationCount + ' total)' ; + } + sparksText += " information icon" ; + + } + else { + var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedSparks; + + $('#${sparklineContainerID} td.sparkline_number').html(totalPubs + " total information icon").attr("class", "grey-text"); + } <#else> @@ -177,7 +186,7 @@ var pubDisplay = "publications"; } - $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append(" "+ pubDisplay +"
    "); + $('#${sparklineContainerID} td.sparkline_number').text(totalPubs).attr("class", "grey-text").append(" "+ pubDisplay +"
    "); var sparksText = ' from ${sparklineVO.earliestYearConsidered?c}' + ' to ${sparklineVO.latestRenderedPublicationYear?c}'; @@ -189,12 +198,12 @@ if (totalPublicationCount) { sparksText += '
    (.CSV File) '; } + - if (!onlyUnknownYearPublications) { - $('#${sparklineContainerID} td.sparkline_text').html(sparksText); - } + $('#${sparklineContainerID} td.sparkline_text').html(sparksText); + } @@ -258,33 +267,33 @@ }); - + - <#if sparklineVO.shortVisMode> - - <#-- Shifted the link to co-author to the individual-sparkline.ftl instead. --> - - <#else> - - - <#if displayTable?? && displayTable> - -

    - <#assign tableID = "publications_sparkline_data_table" /> - <#assign tableCaption = "Publications per year " /> - <#assign tableActivityColumnName = "Publications" /> - <#assign tableContent = sparklineVO.yearToActivityCount /> - <#assign fileDownloadLink = sparklineVO.downloadDataLink /> - - <#include "yearToActivityCountTable.ftl"> - - Download data as .csv file. -
    -

    - - - - + <#if sparklineVO.shortVisMode> - - \ No newline at end of file + <#-- Shifted the link to co-author to the individual-sparkline.ftl instead. --> + + <#else> + + + <#if displayTable?? && displayTable> + +

    + <#assign tableID = "publications_sparkline_data_table" /> + <#assign tableCaption = "Publications per year " /> + <#assign tableActivityColumnName = "Publications" /> + <#assign tableContent = sparklineVO.yearToActivityCount /> + <#assign fileDownloadLink = sparklineVO.downloadDataLink /> + + <#include "yearToActivityCountTable.ftl"> + + Download data as .csv file. +
    +

    + + + + + + + diff --git a/themes/wilma/css/wilma.css b/themes/wilma/css/wilma.css index 32ee17ac..6419b18c 100644 --- a/themes/wilma/css/wilma.css +++ b/themes/wilma/css/wilma.css @@ -1284,9 +1284,10 @@ img.individual-photo { padding-top: .8em; display: block; } -ul#individual-tools-people { - border-bottom: 1px solid #e8ece9; +div#individual-tools-people { + border-bottom: 1px dotted #A6B1B0; /* #e8ece9; */ color: #b2d15a; + text-align:right; } ul#individual-tools-people li a { color: #b2d15a; @@ -1306,14 +1307,6 @@ ul#individual-tools li a { ul.individual-urls { list-style: url(../../../images/individual/arrow-grey.gif); } - -ul#individual-phone { - list-style-type: none; -} -ul#individual-phone li { - line-height: 1.6em; -} - ul.individual-urls li { font-size: .875em; line-height: 1.6em; @@ -1379,7 +1372,7 @@ ul#individual-hasResearchArea li a { color: #2485ae; } /* INDIVIDUAL VISUALIZATION ------> */ -#visualization h3 { +#right-hand-column h3 { font-size: 1.25em; color: #2485ae; } @@ -1395,12 +1388,14 @@ a.all-vivo-publications { color: #2485AE; font-size: .8em !important; text-decoration: underline; + vertical-align:text-top; } /* <------ MAP O' SCIENCE */ #map-of-science h3 a { color: #2485AE; font-size: .8em !important; text-decoration: underline; + vertical-align:text-top; } /* COAUTHORS ------> */ img.co-author { diff --git a/themes/wilma/templates/individual--foaf-person.ftl b/themes/wilma/templates/individual--foaf-person.ftl new file mode 100644 index 00000000..5c1e464f --- /dev/null +++ b/themes/wilma/templates/individual--foaf-person.ftl @@ -0,0 +1,133 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- + Individual profile page template for foaf:Person individuals. This is the default template for foaf persons + in the Wilma theme and should reside in the themes/wilma/templates directory. +--> + +<#include "individual-setup.ftl"> +<#import "individual-qrCodeGenerator.ftl" as qr> +<#import "lib-vivo-properties.ftl" as vp> +<#if !labelCount??> + <#assign labelCount = 0 > + +
    + +
    + + <#assign individualImage> + <@p.image individual=individual + propertyGroups=propertyGroups + namespaces=namespaces + editable=editable + showPlaceholder="always" /> + + + <#if ( individualImage?contains(' + <#assign infoClass = 'class="withThumb"'/> + + +
    ${individualImage}
    + + <#include "individual-contactInfo.ftl"> + + + <#include "individual-webpage.ftl"> +
    + +
    +
    +
    + uri icon + <@qr.renderCode /> +
    + <#include "individual-visualizationFoafPerson.ftl"> +
    + <#include "individual-adminPanel.ftl"> + +
    + <#if relatedSubject??> +

    ${relatedSubject.relatingPredicateDomainPublic} for ${relatedSubject.name}

    +

    ← return to ${relatedSubject.name}

    + <#else> +

    + <#-- Label --> + <@p.label individual editable labelCount/> + + <#-- Display preferredTitle if it exists; otherwise mostSpecificTypes --> + <#assign title = propertyGroups.pullProperty("${core}preferredTitle")!> + <#if title?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> + <@p.addLinkWithLabel title editable /> + <#list title.statements as statement> + ${statement.value} + <@p.editingLinks "${title.name}" statement editable /> + + + <#-- If preferredTitle is unpopulated, display mostSpecificTypes --> + <#if ! (title.statements)?has_content> + <@p.mostSpecificTypes individual /> + +

    + + + <#include "individual-positions.ftl"> +
    + + + <#include "individual-overview.ftl"> + + + <#include "individual-researchAreas.ftl"> + + <#include "individual-openSocial.ftl"> +
    + +
    + +<#assign nameForOtherGroup = "other"> <#-- used by both individual-propertyGroupMenu.ftl and individual-properties.ftl --> + +<#-- Ontology properties --> +<#if !editable> + <#-- We don't want to see the first name and last name unless we might edit them. --> + <#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/firstName")!> + <#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!> + + + +<#-- + With release 1.6 there are now two types of property group displays: the original property group + menu and the horizontal tab display, which is the default. If you prefer to use the property + group menu, simply substitute the include statement below with the one that appears after this + comment section. + + <#include "individual-property-group-menus.ftl"> +--> + +<#include "individual-property-group-tabs.ftl"> + +<#assign rdfUrl = individual.rdfUrl> + +<#if rdfUrl??> + + + + +${stylesheets.add('', + '', + '')} + +${headScripts.add('', + '', + '')} + +${scripts.add('', + '', + '', + '', + '')} + diff --git a/themes/wilma/templates/individual-openSocial.ftl b/themes/wilma/templates/individual-openSocial.ftl new file mode 100644 index 00000000..1b81659e --- /dev/null +++ b/themes/wilma/templates/individual-openSocial.ftl @@ -0,0 +1,18 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#-- Open Social Gadgets --> +<#-- VIVO OpenSocial Extension by UCSF --> +<#if openSocial??> + <#if openSocial.visible> +
    +

    OpenSocial

    + <#-- It would likely make sense to remove the #if logic as it is safe and --> + <#-- arguably better to just have both divs in all conditions --> + <#if editable> +
    + <#else> +
    + +
    + + \ No newline at end of file