Skip to content

Commit

Permalink
Use 'browse' short view for search enchanced pages
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinovg committed Feb 19, 2025
1 parent c675d83 commit e0ad80f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public class IndividualSearchResult extends BaseTemplateModel {
protected final VitroRequest vreq;
protected final Individual individual;

public String getThumbUrl() {
String thumbUrl = individual.getThumbUrl();
return thumbUrl == null ? null : getUrl(thumbUrl);
}

public IndividualSearchResult(Individual individual, VitroRequest vreq) {
this.vreq = vreq;
this.individual = individual;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<#if individuals??>
<#list individuals as individual>
<li class="individual" role="listitem">
<@shortView uri=individual.uri viewContext="index" />
<@shortView uri=individual.uri viewContext="browse" />
</li>
</#list>
</#if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</h1>
</#if>

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

0 comments on commit e0ad80f

Please sign in to comment.