minor change, renamed a variable

This commit is contained in:
tworrall 2013-06-28 10:15:32 -04:00
parent 04b3bb864f
commit c3bdcb6676
2 changed files with 34 additions and 24 deletions

View file

@ -20,11 +20,11 @@ display:academicDeptsDataGetter
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX vivo: <http://vivoweb.org/ontology/core#>
SELECT DISTINCT ?deptURI (str(?label) as ?name)
SELECT DISTINCT ?theURI (str(?label) as ?name)
WHERE
{
?deptURI rdf:type vivo:AcademicDepartment .
?deptURI rdfs:label ?label
?theURI rdf:type vivo:AcademicDepartment .
?theURI rdfs:label ?label
}
""" .

View file

@ -114,7 +114,8 @@
</#macro>
<#-- builds the "research" box on the home page -->
<#-- Renders the html for the research section on the home page. -->
<#-- Works in conjunction with the homePageUtils.js file -->
<#macro researchClasses classGroups=vClassGroups>
<#assign foundClassGroup = false />
<section id="home-research" class="home-sections">
@ -124,8 +125,17 @@
<#if (group.individualCount > 0) && group.displayName == "research" >
<#assign foundClassGroup = true />
<#list group.classes as class>
<#if (class.name == "Academic Article" || class.name == "Book" || class.name == "Conference Paper" ||class.name == "Media Contribution" || class.name == "Report" || class.name == "Library Collection") && (class.individualCount > 0)>
<li role="listitem"><span>${class.individualCount!}</span>&nbsp;<a href='${urls.base}/individuallist?vclassId=${class.uri?replace("#","%23")!}'>${class.name}s</a></li>
<#if (class.individualCount > 0) && (class.name == "Academic Article" || class.name == "Book" || class.name == "Chapter" ||class.name == "Conference Paper" || class.name == "Proceedings" || class.name == "Report") >
<li role="listitem">
<span>${class.individualCount!}</span>&nbsp;
<a href='${urls.base}/individuallist?vclassId=${class.uri?replace("#","%23")!}'>
<#if class.name?substring(class.name?length-1) == "s">
${class.name}
<#else>
${class.name}s
</#if>
</a>
</li>
</#if>
</#list>
<li><a href="${urls.base}/research" alt="${i18n().view_all_research}">${i18n().view_all}</a></li>
@ -154,7 +164,7 @@
var academicDepartments = [
<#if academicDeptDG?has_content>
<#list academicDeptDG as resultRow>
<#assign uri = resultRow["deptURI"] />
<#assign uri = resultRow["theURI"] />
<#assign label = resultRow["name"] />
<#assign localName = uri?substring(uri?last_index_of("/")) />
{"uri": "${localName}", "name": "${label}"}<#if (resultRow_has_next)>,</#if>