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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX vivo: <http://vivoweb.org/ontology/core#> PREFIX vivo: <http://vivoweb.org/ontology/core#>
SELECT DISTINCT ?deptURI (str(?label) as ?name) SELECT DISTINCT ?theURI (str(?label) as ?name)
WHERE WHERE
{ {
?deptURI rdf:type vivo:AcademicDepartment . ?theURI rdf:type vivo:AcademicDepartment .
?deptURI rdfs:label ?label ?theURI rdfs:label ?label
} }
""" . """ .

View file

@ -114,28 +114,38 @@
</#macro> </#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> <#macro researchClasses classGroups=vClassGroups>
<#assign foundClassGroup = false /> <#assign foundClassGroup = false />
<section id="home-research" class="home-sections"> <section id="home-research" class="home-sections">
<h4>${i18n().research_capitalized}</h4> <h4>${i18n().research_capitalized}</h4>
<ul> <ul>
<#list classGroups as group> <#list classGroups as group>
<#if (group.individualCount > 0) && group.displayName == "research" > <#if (group.individualCount > 0) && group.displayName == "research" >
<#assign foundClassGroup = true /> <#assign foundClassGroup = true />
<#list group.classes as class> <#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)> <#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")!}'>${class.name}s</a></li> <li role="listitem">
</#if> <span>${class.individualCount!}</span>&nbsp;
</#list> <a href='${urls.base}/individuallist?vclassId=${class.uri?replace("#","%23")!}'>
<li><a href="${urls.base}/research" alt="${i18n().view_all_research}">${i18n().view_all}</a></li> <#if class.name?substring(class.name?length-1) == "s">
</#if> ${class.name}
</#list> <#else>
<#if !foundClassGroup> ${class.name}s
<p><li>${i18n().no_research_content_found}</li></p> </#if>
</a>
</li>
</#if>
</#list>
<li><a href="${urls.base}/research" alt="${i18n().view_all_research}">${i18n().view_all}</a></li>
</#if> </#if>
</ul> </#list>
</section> <#if !foundClassGroup>
<p><li>${i18n().no_research_content_found}</li></p>
</#if>
</ul>
</section>
</#macro> </#macro>
<#-- Renders the html for the academic departments section on the home page. --> <#-- Renders the html for the academic departments section on the home page. -->
@ -154,7 +164,7 @@
var academicDepartments = [ var academicDepartments = [
<#if academicDeptDG?has_content> <#if academicDeptDG?has_content>
<#list academicDeptDG as resultRow> <#list academicDeptDG as resultRow>
<#assign uri = resultRow["deptURI"] /> <#assign uri = resultRow["theURI"] />
<#assign label = resultRow["name"] /> <#assign label = resultRow["name"] />
<#assign localName = uri?substring(uri?last_index_of("/")) /> <#assign localName = uri?substring(uri?last_index_of("/")) />
{"uri": "${localName}", "name": "${label}"}<#if (resultRow_has_next)>,</#if> {"uri": "${localName}", "name": "${label}"}<#if (resultRow_has_next)>,</#if>