Skip to content

Commit

Permalink
Fix version notifications for themes
Browse files Browse the repository at this point in the history
I forgot to apply the change in a2e43d2 to themes
  • Loading branch information
zerocrates committed May 28, 2024
1 parent f56afcf commit b08e424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/view/omeka/site-admin/index/theme.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use Omeka\Site\Theme\Manager;
$translate = $this->plugin('translate');
$escape = $this->plugin('escapeHtml');
$this->htmlElement('body')->appendAttribute('class', 'sites theme');
$this->headScript()->prependFile($this->assetUrl('vendor/semver/semver.min.js', 'Omeka'));
$this->headScript()->prependFile($this->assetUrl('vendor/compare-versions/index.js', 'Omeka'));

$fallbackThumbnailUrl = $this->assetUrl('img/theme.jpg', 'Omeka');
?>
Expand Down Expand Up @@ -88,7 +88,7 @@ $.get('https://omeka.org/add-ons/json/s_theme.json')
var addon = $('.version-notification');
var addonId = addon.data('addon-id');
if (addonId in data) {
if (semver.lt(addon.data('current-version'), data[addonId]['latest_version'])) {
if (compareVersions.compareVersions(addon.data('current-version'), data[addonId]['latest_version']) === -1) {
addon.show();
}
}
Expand Down

0 comments on commit b08e424

Please sign in to comment.