Skip to content

Commit e0ad80f

Browse files
committed
Use 'browse' short view for search enchanced pages
1 parent c675d83 commit e0ad80f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

api/src/main/java/edu/cornell/mannlib/vitro/webapp/web/templatemodels/searchresult/IndividualSearchResult.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public class IndividualSearchResult extends BaseTemplateModel {
2828
protected final VitroRequest vreq;
2929
protected final Individual individual;
3030

31+
public String getThumbUrl() {
32+
String thumbUrl = individual.getThumbUrl();
33+
return thumbUrl == null ? null : getUrl(thumbUrl);
34+
}
35+
3136
public IndividualSearchResult(Individual individual, VitroRequest vreq) {
3237
this.vreq = vreq;
3338
this.individual = individual;

webapp/src/main/webapp/templates/freemarker/body/menupage/browseSearchFilterValues.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
<#if individuals??>
107107
<#list individuals as individual>
108108
<li class="individual" role="listitem">
109-
<@shortView uri=individual.uri viewContext="index" />
109+
<@shortView uri=individual.uri viewContext="browse" />
110110
</li>
111111
</#list>
112112
</#if>

webapp/src/main/webapp/templates/freemarker/body/partials/shortview/view-browse-default.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</h1>
1818
</#if>
1919

20-
<#assign cleanTypes = 'edu.cornell.mannlib.vitro.webapp.web.TemplateUtils$DropFromSequence'?new()(individual.mostSpecificTypes, vclass) />
20+
<#assign cleanTypes = 'edu.cornell.mannlib.vitro.webapp.web.TemplateUtils$DropFromSequence'?new()(individual.mostSpecificTypes, vclass!"") />
2121
<#if cleanTypes?size == 1>
2222
<span class="title">${cleanTypes[0]}</span>
2323
<#elseif (cleanTypes?size > 1) >

0 commit comments

Comments
 (0)