NIHVIVO-650 Display image on new (Freemarker) individual profile page. Add <@url /> directive to generate img src value.

This commit is contained in:
rjy7 2010-09-21 16:05:36 +00:00
parent 7004af4f73
commit 72d43f05a5
11 changed files with 216 additions and 118 deletions

View file

@ -0,0 +1,7 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for help on individual page -->
<h2>Quick Notes on Using Individual:</h2>
<p>id is the id of the entity to query for. netid also works.</p>

View file

@ -0,0 +1,75 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for individual profile page -->
<#import "lib-property.ftl" as p>
<#assign editingClass>
<#if editStatus.showEditLinks>editing<#else></#if>
</#assign>
<div id="personWrap">
<#if editStatus.showAdminPanel>
<#include "individual-adminPanel.ftl">
</#if>
<div class="contents entity ${editingClass}">
<div id="labelAndMoniker">
<#if relatedSubject??>
<h2>${relatedSubject.relatingPredicateDomainPublic} for ${relatedSubject.name}</h2>
<p><a href="${relatedSubject.url}">&larr; return to ${relatedSubject.name}</a></p>
<#else>
<#-- Label -->
<@p.dataPropWrapper id="label">
<h2>${individual.name}</h2>
</@p.dataPropWrapper>
<#-- Moniker -->
<#if individual.moniker?has_content>
<@p.dataPropsWrapper id="moniker">
<em class="moniker">${individual.moniker}</em>
</@p.dataPropsWrapper>
</#if>
</#if>
</div> <!-- labelAndMoniker -->
<#include "individual-sparklineVisualization.ftl">
<div id="dprop-vitro-image" class="propsItem ${editingClass}">
<#if individual.thumbUrl??>
<@p.dataPropsWrapper id="thumbnail">
<a class="image" href="${individual.imageUrl}">
<img src="${individual.thumbUrl}"
title="click to view larger image"
alt="${individual.name}" width="115" />
</a>
</@p.dataPropsWrapper>
<#elseif individual.person>
<@p.dataPropsWrapper id="thumbnail">
<img src="<@url path='/images/dummyImages/person.thumbnail.jpg' />" "
alt="placeholder image" width="115" />
</@p.dataPropsWrapper>
</#if>
</div>
</div> <!-- #contents -->
</div> <!-- #personWrap -->
${stylesheets.addFromTheme("/entity.css")}
<#-- RY Figure out which of these scripts really need to go into the head, and which are needed at all (e.g., tinyMCE??) -->
${headScripts.add("/js/jquery.js",
"/js/jquery_plugins/getUrlParam.js",
"/js/jquery_plugins/colorAnimations.js",
"/js/propertyGroupSwitcher.js",
"/js/jquery_plugins/jquery.form.js",
"/js/tiny_mce/tiny_mce.js",
"/js/controls.js",
"http://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22areachart%22%2C%22imagesparkline%22%5D%7D%5D%7D",
"/js/toggle.js")}
${scripts.add("/js/imageUpload/imageUploadUtils.js")}