Compare commits

..

No commits in common. "eb0f7c6c7e9270c02f66fb951081c1bb1e9e922e" and "c102696a8d2fa43e3976d095abd1cff15dc33313" have entirely different histories.

4 changed files with 99 additions and 9 deletions

View File

@ -1,6 +1,5 @@
<main class=""> <main class="">
<!-- <a href="<?php echo $site->url(); ?>" class="site-brand arc-hive-off"> --> <a href="<?php echo $site->url(); ?>" class="site-brand arc-hive-off">
<a href="/" class="site-brand arc-hive-off">
<?php if ($this->themeSetting('logo')): ?> <?php if ($this->themeSetting('logo')): ?>
<img src="<?php echo $this->themeSettingAssetUrl('logo'); ?>" <img src="<?php echo $this->themeSettingAssetUrl('logo'); ?>"
alt="<?php echo $site->title(); ?>" alt="<?php echo $site->title(); ?>"

View File

@ -18,8 +18,7 @@ $img_src = null;
<!-- arc-hive header-image insert ends --> <!-- arc-hive header-image insert ends -->
<main class=""> <main class="">
<!-- <a href="<?php echo $site->url(); ?>" class="site-brand arc-hive-off"> --> <a href="<?php echo $site->url(); ?>" class="site-brand arc-hive-off">
<a href="/" class="site-brand arc-hive-off">
<?php if ($this->themeSetting('logo')): ?> <?php if ($this->themeSetting('logo')): ?>
<img src="<?php echo $this->themeSettingAssetUrl('logo'); ?>" <img src="<?php echo $this->themeSettingAssetUrl('logo'); ?>"
alt="<?php echo $site->title(); ?>" alt="<?php echo $site->title(); ?>"

View File

@ -1,4 +1,97 @@
<?php
$translate = $this->plugin('translate');
$escape = $this->plugin('escapeHtml');
$this->headScript()->appendFile($this->assetUrl('js/browse.js'));
$this->htmlElement('body')->appendAttribute('class', 'item resource browse');
<script> $query = $this->params()->fromQuery();
window.location.replace("<?= $this->site->url() ?>"); $itemSetShow = isset($itemSet);
</script> if ($itemSetShow):
$this->htmlElement('body')->appendAttribute('class', 'item-set');
$query['item_set_id'] = $itemSet->id();
endif;
$layoutSetting = $this->themeSetting('browse_layout');
$gridState = ($layoutSetting == 'togglegrid') ? 'disabled' : '';
$listState = ($layoutSetting == 'togglelist') ? 'disabled': '';
$isGrid = (!isset($layoutSetting) || strpos($layoutSetting, 'grid') !== false) ? true : false;
$headingTerm = $this->siteSetting('browse_heading_property_term');
$bodyTerm = $this->siteSetting('browse_body_property_term');
$bodyTruncate = $this->themeSetting('truncate_body_property');
$sortHeadings = [
[
'label' => $translate('Title'),
'value' => 'dcterms:title'
],
[
'label' => $translate('Identifier'),
'value' => 'dcterms:identifier'
],
[
'label' => $translate('Class'),
'value' => 'resource_class_label'
],
[
'label' => $translate('Created'),
'value' => 'created'
],
];
?>
<?php if ($itemSetShow): ?>
<?php echo $this->pageTitle($itemSet->displayTitle(), 2); ?>
<h3><?php echo $translate('Item set'); ?></h3>
<div class="metadata">
<?php echo $itemSet->displayValues(); ?>
</div>
<div class="item-set-items">
<?php echo '<h3>' . $escape($translate('Items')) . '</h3>'; ?>
<?php else: ?>
<?php echo $this->pageTitle($translate('Items'), 2); ?>
<?php endif; ?>
<?php echo $this->searchFilters(); ?>
<div class="browse-control-mobile">
<button type="button" class="browse-toggle closed">Tools</button>
</div>
<div class="browse-controls closed">
<?php echo $this->pagination(); ?>
<?php if (strpos($layoutSetting, 'toggle') !== false): ?>
<div class="layout-toggle">
<button type="button" aria-label="<?php echo $translate('Grid'); ?>" class="grid o-icon-grid" <?php echo $gridState; ?>></button>
<button type="button" aria-label="<?php echo $translate('List'); ?>" class="list o-icon-list" <?php echo $listState; ?>></button>
</div>
<?php endif; ?>
<?php echo $this->hyperlink($translate('Advanced search'), $this->url('site/resource', ['controller' => 'item', 'action' => 'search'], ['query' => $query], true), ['class' => 'advanced-search']); ?>
<?php echo $this->sortSelector($sortHeadings); ?>
</div>
<?php $this->trigger('view.browse.before'); ?>
<ul class="resources <?php echo ($isGrid) ? 'resource-grid' : 'resource-list'; ?>">
<?php
foreach ($items as $item):
$heading = $headingTerm ? $item->value($headingTerm, ['default' => $translate('[Untitled]')]) : $item->displayTitle();
$body = $bodyTerm ? $item->value($bodyTerm) : $item->displayDescription();
?>
<li class="item resource <?php echo ($isGrid) ? '' : 'media-object'; ?>">
<?php if ($thumbnail = $this->thumbnail($item, 'medium')): ?>
<div class="resource-image <?php echo ($isGrid) ? '' : 'media-object-section'; ?>">
<?php echo $item->linkRaw($thumbnail, null, ['class' => 'thumbnail']); ?>
</div>
<?php endif; ?>
<div class="resource-meta <?php echo ($isGrid) ? '' : 'media-object-section'; ?>">
<h4><?php echo $item->link($heading); ?></h4>
<?php if ($body): ?>
<div class="description <?php echo ($bodyTruncate) ? $bodyTruncate : ''; ?>"><?php echo $body; ?></div>
<?php endif; ?>
</div>
</li>
<?php endforeach; ?>
</ul>
<?php echo ($itemSetShow) ? '</div>' : ''; ?>
<?php $this->trigger('view.browse.after'); ?>
<div class="browse-controls">
<?php echo $this->pagination(); ?>
</div>

View File

@ -50,8 +50,7 @@ $("#archive_page_title").html('<?php echo $_html ?>');
<?php if (!$embedMedia && $itemMedia): ?> <?php if (!$embedMedia && $itemMedia): ?>
<div class="media-list" style="display: flex;"> <div class="media-list" style="display: flex;">
<?php foreach ($itemMedia as $media): ?> <?php foreach ($itemMedia as $media): ?>
<?php echo $media->linkPretty(); ?> <?php //echo $media->linkPretty(); ?>
<br />
<div style="display: flex; <div style="display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;