Merge branch 'maint-rel-1.6' into develop
This commit is contained in:
commit
417e449b87
2 changed files with 19 additions and 5 deletions
|
@ -123,11 +123,25 @@ $(document).ready(function(){
|
|||
+ i18nStrings.noDepartmentsFound + "</li></p></ul>";
|
||||
}
|
||||
else if ( deptNbr > 6 ) {
|
||||
for ( var i=0;i<6;i++) {
|
||||
html += "<li><a href='" + urlsBase + "/individual"
|
||||
+ academicDepartments[index].uri + "'>"
|
||||
+ academicDepartments[index].name + "</a></li>";
|
||||
//if there are more than 6 departments, we want to choose a random subset and display
|
||||
//and also to make sure the same department is not repeated twice
|
||||
var indicesUsed = {};//utilizing a hash since easier
|
||||
var indicesCount = 0;
|
||||
while(indicesCount < 6) {
|
||||
index = Math.floor((Math.random()*deptNbr)+1)-1;
|
||||
//if the index has already been used, this will be true
|
||||
var indexFound = (index in indicesUsed);
|
||||
//Check to see if this index hasn't already been employed
|
||||
if(!indexFound) {
|
||||
//if this index hasn't already been employed then utilize it
|
||||
html += "<li><a href='" + urlsBase + "/individual"
|
||||
+ academicDepartments[index].uri + "'>"
|
||||
+ academicDepartments[index].name + "</a></li>";
|
||||
//add this index to the set of already used indices
|
||||
indicesUsed[index] = true;
|
||||
//keep count
|
||||
indicesCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
<#if (group.individualCount > 0) && group.displayName == "research" >
|
||||
<#assign foundClassGroup = true />
|
||||
<#list group.classes as class>
|
||||
<#if (class.individualCount > 0) && (class.uri?contains("Academic Article") || class.uri?contains("Book") || class.uri?contains("Chapter") ||class.uri?contains("Conference Paper") || class.uri?contains("Proceedings") || class.uri?contains("Report")) >
|
||||
<#if (class.individualCount > 0) && (class.uri?contains("AcademicArticle") || class.uri?contains("Book") || class.uri?contains("Chapter") ||class.uri?contains("ConferencePaper") || class.uri?contains("Proceedings") || class.uri?contains("Report")) >
|
||||
<li role="listitem">
|
||||
<span>${class.individualCount!}</span>
|
||||
<a href='${urls.base}/individuallist?vclassId=${class.uri?replace("#","%23")!}'>
|
||||
|
|
Loading…
Add table
Reference in a new issue