NIHVIVO-1073 Menu page refactoring. Removed temporary placeholder files and introduced pie charts on menu pages. UI team will compare with bar graphs on home page and determine whether we'll stick with one type over the other or throw them both into the mix.

This commit is contained in:
nac26 2011-01-28 18:25:21 +00:00
parent 81813bcb83
commit dd839ebd18
10 changed files with 322 additions and 8 deletions

View file

@ -21,12 +21,22 @@ template variable with the domain name for an AJAX request with visualizations.
</#if>
</#list>
<#-- classGroupIndividualCount is assigned in menupage-vClassesInClassGroup.ftl -->
<script type="text/javascript">
var menupageData = {
baseUrl: '${domainName + urls.base}',
dataServiceUrl: '${domainName + urls.base}/dataservice?getLuceneIndividualsByVClass=1&vclassId=',
defaultBrowseVClassUri: '${firstNonEmptyVClass}'
};
var browseData = {
classGroupUri: '${classGroupUri!}',
classGroupIndividualCount: '${classGroupIndividualCount!}'
};
</script>
${scripts.add("/js/menupage/browseByVClass.js")}
<#-- Script to enable browsing individuals within a class -->
${scripts.add("/js/menupage/browseByVClass.js")}
<#-- Scripts required to create the visual graphs -->
${scripts.add("/js/raphael/raphael.js", "/js/raphael/g.raphael.js", "/js/raphael/g.pie.js", "/js/browseClassGroupsPie.js")}

View file

@ -7,6 +7,12 @@
<#list vClassGroup as vClass>
<#-- Only display vClasses with individuals -->
<#if (vClass.entityCount > 0)>
<#-- Calculate the individual count for the group since it's not currently provided to menu page templates -->
<#if !classGroupIndividualCount??>
<#assign classGroupIndividualCount = vClass.entityCount />
<#else>
<#assign classGroupIndividualCount = classGroupIndividualCount + vClass.entityCount />
</#if>
<li role="listitem"><a href="#browse-by" title="Browse all individuals in this class" data-uri="${vClass.URI}">${vClass.name} <span class="count-classes">(${vClass.entityCount})</span></a></li>
</#if>
</#list>