Skip to content

Commit

Permalink
Add theme versions to site admin
Browse files Browse the repository at this point in the history
  • Loading branch information
zerocrates committed Oct 5, 2017
1 parent 5a5555c commit bc3fa1f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/asset/css/advanced-search.css

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

2 changes: 1 addition & 1 deletion application/asset/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion application/asset/css/user-bar.css

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

4 changes: 4 additions & 0 deletions application/asset/sass/_screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3644,6 +3644,10 @@ body.sidebar-open #content {
margin-bottom: $spacing-small;
}

.theme-version {
display: block;
}

/* @end */

/* @end */
Expand Down
6 changes: 6 additions & 0 deletions application/view/omeka/site-admin/index/theme-selector.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $this->headScript()->appendFile($this->assetUrl('js/site-theme.js', 'Omeka'));
$author = $theme->getIni('author');
$authorLink = $theme->getIni('author_link');
$description = $theme->getIni('description');
$version = $theme->getIni('version');
$selected = isset($defaultThemeId) && $defaultThemeId == $theme->getId();
?>
<div class="theme<?php echo Manager::STATE_ACTIVE !== $state ? ' invalid' : ''; ?>">
Expand All @@ -30,6 +31,11 @@ $this->headScript()->appendFile($this->assetUrl('js/site-theme.js', 'Omeka'));

<h4><?php echo $this->escapeHtml($theme->getName()); ?></h4>
<div class="theme-meta">
<?php if(!empty($version)): ?>
<span class="theme-version">
<?php echo sprintf($this->translate('version %s'), $version); ?>
</span>
<?php endif; ?>
<span class="theme-author">
<?php if (isset($authorLink)): ?>
<a href="<?php echo $this->escapeHtml($authorLink); ?>" target="_blank"><?php echo $this->escapeHtml($author); ?></a>
Expand Down
6 changes: 6 additions & 0 deletions application/view/omeka/site-admin/index/theme.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ $fallbackThumbnailUrl = $this->assetUrl('img/theme.jpg', 'Omeka');
</h3>
<?php if (Manager::STATE_ACTIVE === $currentTheme->getState()): ?>
<p>
<?php $currentVersion = $currentTheme->getIni('version'); ?>
<?php if (!empty($currentVersion)): ?>
<span class="theme-version">
<?php echo sprintf($this->translate('version %s'), $currentVersion); ?>
</span>
<?php endif; ?>
<span class="current-theme-author"><a href="<?php echo $escape($currentTheme->getIni('author_link')); ?>" target="_blank"><?php echo $escape($currentTheme->getIni('author')); ?></a></span>
<?php if (($currentDescription = $currentTheme->getIni('description')) && ($currentDescription !== '')): ?>
<span class="current-theme-description"><?php echo $escape($currentDescription); ?></span>
Expand Down

0 comments on commit bc3fa1f

Please sign in to comment.