Skip to content

Commit

Permalink
Merge branch '24.06.00' into 24.07.00
Browse files Browse the repository at this point in the history
  • Loading branch information
catsoup11789 authored and mdnoble73 committed Jun 25, 2024
1 parent d3af6d2 commit 9df4d5b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,51 @@
{assign var="vSummAuthor" value="by $summAuthor"}
{/if}

{if $accessibleBrowseCategories == '1' && $action != 'Results'}
{if $accessibleBrowseCategories == '1' && $action != 'Results' && !$isForSearchResults}
<div class="swiper-slide browse-thumbnail {$coverStyle}">
<a onclick="return AspenDiscovery.GroupedWork.showGroupedWorkInfo('{$summId}', {if !empty($browseCategoryId)}'{$browseCategoryId}'{/if});" href="{$summUrl}">
<img src="{$bookCoverUrlMedium}" alt="{$summTitle|escape}" class="{$coverStyle}" loading="lazy">
<div class="swiper-lazy-preloader"></div>
</a>
</div>
{else}
{if $browseMode == '1'}
<div class="browse-list grid-item {$coverStyle} {if $browseStyle == 'grid'}browse-grid-style col-tn-6 col-xs-6 col-sm-6 col-md-4 col-lg-3{/if}">
<a onclick="return AspenDiscovery.GroupedWork.showGroupedWorkInfo('{$summId}', '{$browseCategoryId}');" href="{$summUrl}">
<img class="img-responsive" src="{$bookCoverUrl}" alt="{$summTitle|escape} {$vSummAuthor|escape}">
<div class="info">{if !empty($isNew)}<span class="new-result-badge">{translate text="New!" isPublicFacing=true}</span><br/>{/if}<strong>{$summTitle|truncate:40}</strong><span>{$vSummAuthor|truncate:40}</span></div>
</a>
</div>
{if $browseMode == '1'}
<div class="browse-list grid-item {$coverStyle} {if $browseStyle == 'grid'}browse-grid-style col-tn-6 col-xs-6 col-sm-6 col-md-4 col-lg-3{/if}">
<a onclick="return AspenDiscovery.GroupedWork.showGroupedWorkInfo('{$summId}', '{$browseCategoryId}');" href="{$summUrl}">
<img class="img-responsive" src="{$bookCoverUrl}" alt="{$summTitle|escape} {$vSummAuthor|escape}">
<div class="info">{if !empty($isNew)}<span class="new-result-badge">{translate text="New!" isPublicFacing=true}</span><br/>{/if}<strong>{$summTitle|truncate:40}</strong><span>{$vSummAuthor|truncate:40}</span></div>
</a>
</div>

{else}{*Default Browse Mode (covers) *}
<div class="browse-thumbnail grid-item {$coverStyle} {if $browseStyle == 'grid'}col-tn-6 col-xs-4 col-sm-4 col-md-3 col-lg-2{/if}">
<a onclick="return AspenDiscovery.GroupedWork.showGroupedWorkInfo('{$summId}', {if !empty($browseCategoryId)}'{$browseCategoryId}'{/if});" href="{$summUrl}">
{if !empty($isNew)}<span class="browse-cover-badge">{translate text="New!" isPublicFacing=true}</span> {/if}
<div>
<img src="{$bookCoverUrlMedium}" alt="{$summTitle|escape} {$vSummAuthor|escape}" class="{$coverStyle} browse-{$browseStyle} {if $browseCategoryRatingsMode != 0}ratings-on{/if}">
</div>
</a>
{if !empty($showRatings) && $browseCategoryRatingsMode != 0}
<div class="browse-rating{if $browseCategoryRatingsMode == 2} rater{/if}"
{if $browseCategoryRatingsMode == 1 && (empty($offline) || $enableEContentWhileOffline)} onclick="return AspenDiscovery.GroupedWork.showReviewForm(this, '{$summId}');" onkeypress="return AspenDiscovery.GroupedWork.showReviewForm(this, '{$summId}');" style="cursor: pointer" title="{translate text="Write a Review" inAttribute=true isPublicFacing=true}" role="button" tabindex="0" {/if}
{if $browseCategoryRatingsMode == 2}
{* AJAX rater data fields *}
{*{if !empty($ratingData.user)}data-user_rating="{$ratingData.user}" {/if}*}{* Don't show user ratings in browse results because the results get cached so shouldn't be particular to a single user.*}
data-average_rating="{$ratingData.average}" data-id="{$summId}"
data-show_review="{$showComments}"
{else}{*Default Browse Mode (covers) *}
<div class="browse-thumbnail grid-item {$coverStyle} {if $browseStyle == 'grid'}col-tn-6 col-xs-4 col-sm-4 col-md-3 col-lg-2{/if}">
<a onclick="return AspenDiscovery.GroupedWork.showGroupedWorkInfo('{$summId}', {if !empty($browseCategoryId)}'{$browseCategoryId}'{/if});" href="{$summUrl}">
{if !empty($isNew)}<span class="browse-cover-badge">{translate text="New!" isPublicFacing=true}</span> {/if}
<div>
<img src="{$bookCoverUrlMedium}" alt="{$summTitle|escape} {$vSummAuthor|escape}" class="{$coverStyle} browse-{$browseStyle} {if $browseCategoryRatingsMode != 0}ratings-on{/if}">
</div>
</a>
{if !empty($showRatings) && $browseCategoryRatingsMode != 0}
<div class="browse-rating{if $browseCategoryRatingsMode == 2} rater{/if}"
{if $browseCategoryRatingsMode == 1} onclick="return AspenDiscovery.GroupedWork.showReviewForm(this, '{$summId}');" onkeypress="return AspenDiscovery.GroupedWork.showReviewForm(this, '{$summId}');" style="cursor: pointer" title="{translate text="Write a Review" inAttribute=true isPublicFacing=true}" role="button" tabindex="0" {/if}
{if $browseCategoryRatingsMode == 2}
{* AJAX rater data fields *}
{*{if !empty($ratingData.user)}data-user_rating="{$ratingData.user}" {/if}*}{* Don't show user ratings in browse results because the results get cached so shouldn't be particular to a single user.*}
data-average_rating="{$ratingData.average}" data-id="{$summId}"
data-show_review="{$showComments}"
{/if}
>
<span class="ui-rater-starsOff" style="width:90px">
{* Don't show a user's ratings in browse results because the results get cached so shouldn't be particular to a single user.*}
{* {if !empty($ratingData.user)}
<span class="ui-rater-starsOn userRated" style="width:{math equation="90*rating/5" rating=$ratingData.user}px"></span>
{else}*}
<span class="ui-rater-starsOn" style="width:{math equation="90*rating/5" rating=$ratingData.average}px"></span>
{*{/if}*}
</span>
</div>
{/if}
>
<span class="ui-rater-starsOff" style="width:90px">
{* Don't show a user's ratings in browse results because the results get cached so shouldn't be particular to a single user.*}
{* {if !empty($ratingData.user)}
<span class="ui-rater-starsOn userRated" style="width:{math equation="90*rating/5" rating=$ratingData.user}px"></span>
{else}*}
<span class="ui-rater-starsOn" style="width:{math equation="90*rating/5" rating=$ratingData.average}px"></span>
{*{/if}*}
</span>
</div>
{/if}
</div>
{/if}
</div>
{/if}
{/if}
{/strip}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{strip}
{if $accessibleBrowseCategories == '1' && $action != 'Results'}
{if $accessibleBrowseCategories == '1' && $action != 'Results' && !$isForSearchResults}
<div class="swiper-slide browse-thumbnail {$coverStyle}">
<a href="{$summUrl}">
<img src="{$bookCoverUrlMedium}" alt="{$summTitle}" class="{$coverStyle}" loading="lazy">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{strip}
{if $accessibleBrowseCategories == '1' && $action != 'Results'}
{if $accessibleBrowseCategories == '1' && $action != 'Results' && !$isForSearchResults}
<div class="swiper-slide browse-thumbnail {$coverStyle}">
<a href="{$summUrl}">
<img src="{$bookCoverUrlMedium}" alt="{$summTitle|escape}" class="{$coverStyle}" loading="lazy">
Expand Down
1 change: 0 additions & 1 deletion code/web/interface/themes/responsive/js/aspen.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/web/interface/themes/responsive/js/aspen/searches.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ AspenDiscovery.Searches = (function(){
});
}
}
}(AspenDiscovery.Searches || {}));
}(AspenDiscovery.Searches || {}));
5 changes: 3 additions & 2 deletions code/web/services/Search/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ function getMoreSearchResults($displayMode = 'covers') {
}
$searchObject->close();

global $interface;
$interface->assign('isForSearchResults', true);
// Process for Display //
$recordSet = $searchObject->getResultRecordHTML();
$displayTemplate = 'Search/covers-list.tpl'; // structure for bookcover tiles
Expand All @@ -377,7 +379,6 @@ function getMoreSearchResults($displayMode = 'covers') {
$recordSet[] = '<script type="text/javascript">AspenDiscovery.Ratings.initializeRaters()</script>';
}

global $interface;
$interface->assign('recordSet', $recordSet);
$records = $interface->fetch($displayTemplate);
$result = [
Expand Down Expand Up @@ -784,4 +785,4 @@ function searchFacetTerms() : array {
function getBreadcrumbs(): array {
return [];
}
}
}
2 changes: 2 additions & 0 deletions code/web/sys/Interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ function __construct() {
$this->assign('debugCss', true);
}

$this->assign('isForSearchResults', false);

// Detect Internet Explorer 8 to include respond.js for responsive css support
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$ie8 = stristr($_SERVER['HTTP_USER_AGENT'], 'msie 8') || stristr($_SERVER['HTTP_USER_AGENT'], 'trident/5'); //trident/5 should catch ie9 compatibility modes
Expand Down

0 comments on commit 9df4d5b

Please sign in to comment.