overrides list-of-sites block

This commit is contained in:
buttle 2021-05-24 18:13:23 +02:00
parent d7dde0ddec
commit 1feb21e597
9 changed files with 64 additions and 201 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
bower_components
node_modules
npm-debug.log
_

View File

@ -0,0 +1,43 @@
<?php
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
$collections = $archiveSiteHelper->getCollections();
?>
<div class="list-of-sites">
<div class="site-list">
<table>
<thead>
<tr>
<th>Site</th>
<th>Curator</th>
<th>Collection</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
foreach($sites as $site):
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
//echo $this->partial('common/index/site-list-item', [
echo $this->partial('common/site-list-entry', [
'site' => $site,
'showSummary' => $summaries,
'site_meta_values' => $site_meta_values,
'archive_collections' => $archiveSiteHelper->getCollections(),
]);
endforeach;
?>
</tbody>
</table>
</div>
<?php
if ($pagination):
echo $this->pagination();
endif;
?>
</div>

View File

@ -1,6 +1,7 @@
<?php
$summary = $showSummary ? $site->summary() : null;
?>
<tr class="_expandable_site_item">
<td>
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>

View File

@ -1,111 +0,0 @@
<?php
$escape = $this->plugin('escapeHtml');
$stylesheet = $this->themeSetting('stylesheet');
$this->htmlElement('html')->setAttribute('lang', $this->lang());
$this->headMeta()->setCharset('utf-8');
$this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1');
$this->headTitle($this->setting('installation_title', 'Omeka S'))->setSeparator(' · ');
if (isset($stylesheet)) {
$this->headLink()->prependStylesheet($this->assetUrl("css/$stylesheet.css"));
} else {
$this->headLink()->prependStylesheet($this->assetUrl('css/default.css'));
}
$this->headLink()->prependStylesheet($this->assetUrl('css/iconfonts.css', 'Omeka'));
$this->headScript()->prependFile('//cdn.jsdelivr.net/npm/foundation-sites@6.5.3/dist/js/foundation.min.js', 'text/javascript', [
'integrity' => 'sha256-/PFxCnsMh+nTuM0k3VJCRch1gwnCfKjaP8rJNq5SoBg= sha384-9ksAFjQjZnpqt6VtpjMjlp2S0qrGbcwF/rvrLUg2vciMhwc1UJJeAAOLuJ96w+Nj sha512-UMSn6RHqqJeJcIfV1eS2tPKCjzaHkU/KqgAnQ7Nzn0mLicFxaVhm9vq7zG5+0LALt15j1ljlg8Fp9PT1VGNmDw==',
'crossorigin' => 'anonymous'
]);
$this->headScript()->prependFile($this->assetUrl('js/global.js', 'Omeka'));
$this->headScript()->prependFile($this->assetUrl('vendor/jquery/jquery.min.js', 'Omeka'));
$this->trigger('view.layout');
$title = $this->pageTitle($site->title());
$userBar = $this->userBar();
$navLayout = ($this->themeSetting('nav_layout')) ? $this->themeSetting('nav_layout') : 'dropdown';
$this->htmlElement('body')->appendAttribute('class', $navLayout . '-menu');
if ($userBar) {
$this->htmlElement('body')->appendAttribute('class', 'user-bar');
}
$logo = $this->themeSettingAssetUrl('logo');
if ($logo):
$title = '<img src="' . $this->escapeHtml($logo) . '">';
endif;
?>
<?php echo $this->doctype(); ?>
<?php echo $this->htmlElement('html'); ?>
<head>
<?php echo $this->headMeta(); ?>
<?php echo $this->headTitle(); ?>
<?php echo $this->headLink(); ?>
<?php echo $this->headStyle(); ?>
<?php echo $this->headScript(); ?>
</head>
<?php echo $this->htmlElement('body'); ?>
<div id="offCanvas" class="off-canvas position-left" data-off-canvas>
<?php echo $site->publicNav()->menu()->setPartial('common/foundation-navigation.phtml')->renderPartialWithParams(['layout' => 'vertical']); ?>
<div class="search">
<?php echo $this->partial('common/search-form'); ?>
</div>
</div>
<div class="off-canvas-content" data-off-canvas-content>
<a id="skipnav" href="#content"><?php echo $this->translate('Skip to main content'); ?></a>
<?php echo $userBar; ?>
EXHIBIT
<img id="archive_header_img" />
<?php
//echo $page;
//echo $this->container;
/*
foreach ($this->container as $page) {
print($page->id);
}
*/
/*
$nav = $site->publicNav();
$container = $nav->getContainer();
$activePage = $nav->findActive($container);
$slug = $activePage['page']->getParams()['page-slug'];
print($slug);
foreach ($activePage['page']->getParams() as $key => $param) {
print($key.' '.$param);
}
#$page_id = $activePage->id();
#print($page_id);
*/
//$header_image = $this->getHelperPluginManager()->get('pageMeta')->getMetaImage($this);
?>
<header>
<?php if ($navLayout == 'vertical'): ?>
<?php echo $this->partial('common/header-vertical'); ?>
<?php else: ?>
<?php echo $this->partial('common/header-dropdown'); ?>
<?php endif; ?>
</header>
<div id="content" role="main">
<?php echo $this->content; ?>
</div>
<footer>
<?php if ($footerContent = $this->themeSetting('footer')): ?>
<?php echo $footerContent; ?>
<?php else: ?>
<?php echo $this->translate('Powered by Omeka S'); ?>
<?php endif; ?>
</footer>
</div>
<script>
$(document).foundation();
</script>
</body>
</html>

View File

@ -41,7 +41,7 @@ $form->prepare();
<h3><?php echo $translate('Add new block'); ?></h3>
<?php foreach ($this->blockLayout()->getLayouts() as $layout): ?>
<?php if ($layout == "html") { continue; } ?>
<?php if ($layout == "tableOfContents") { continue; } ?>
<?php /* if ($layout == "tableOfContents") { continue; } */ ?>
<?php if ($layout == "searchingForm") { continue; } ?>
<button type="button" value="<?php echo $escape($layout); ?>" class="option">
<?php echo $escape($translate($this->blockLayout()->getLayoutLabel($layout))); ?>

View File

@ -1,80 +0,0 @@
<?php
$translate = $this->plugin('translate');
$this->htmlElement('body')->appendAttribute('class', 'site browse front');
$title = $this->setting('installation_title', 'Omeka S');
$subtitle = $translate('Sites');
$this->headTitle($subtitle);
?>
<h1>
<?php echo $this->hyperlink($title, $this->url('top', ['action' => 'index'])); ?>
</h1>
omeka/site/index.phtml
<?php if ($sites): ?>
<?php echo $this->partial(
'common/cross-site-search/fulltext-form.phtml',
['action' => $this->url('search', ['action' => 'results'], true)]
); ?>
<?php
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
$collections = $archiveSiteHelper->getCollections();
?>
<!--
<h2>Collections</h2>
<hr />
<p>
<?php foreach($collections as $collection_label => $collection_name){ ?>
<a href="/c/<?= $collection_label ?>"><?= $collection_name ?></a>
<br />
<?php } ?>
</p>
-->
<!-- <h2 class="site-list-heading"><?php echo $subtitle; ?></h2> -->
<div class="site-list">
<table>
<thead>
<tr>
<th>Site</th>
<th>Artist</th>
<th>Collection</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
foreach ($sites as $site):
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
echo $this->partial('common/site-list-entry', [
'site' => $site,
'site_meta_values' => $site_meta_values,
'archive_collections' => $archiveSiteHelper->getCollections(),
'showSummary' => true
]);
endforeach;
?>
</tbody>
</table>
</div>
<?php echo $this->pagination(); ?>
<?php endif; ?>
<p><?php echo sprintf(
$translate('Go to the %1$s to start working with %2$s.'),
$this->hyperlink($translate('Admin dashboard'), $this->url('admin')),
$title
); ?></p>

View File

@ -32,22 +32,23 @@ if ($img_src) {
$("#archive_page_title").html('<?= $site->title(); ?>');
</script>
<!--
<div class="resource-title">
<?php echo $this->pageTitle($item->displayTitle(), 2); ?>
</div>
-->
<div class="grid-x">
<?php if ($embedMedia && $itemMedia): ?>
<div class="media-embeds">
<?php foreach ($itemMedia as $media):
echo $media->render();
endforeach;
?>
<?php foreach ($itemMedia as $media):
echo $media->render();
endforeach;
?>
</div>
<?php endif; ?>
<?php if (!$embedMedia && $itemMedia): ?>
<div class="media-list">
<?php foreach ($itemMedia as $media): ?>
@ -56,23 +57,29 @@ endforeach;
</div>
<?php endif; ?>
<div id="resource-values" class="<?php echo ($showLayout == 'inline') ? 'inline' : 'stack'; ?>">
<?php $this->trigger('view.show.before'); ?>
<?php echo $item->displayValues(); ?>
<?php $itemSets = $item->itemSets(); ?>
<!-- remove items sets
<dl>
<?php if (count($itemSets) > 0): ?>
<div class="property">
<dt><?php echo $translate('Item sets'); ?></dt>
<div class="values">
<?php foreach ($itemSets as $itemSet): ?>
<dd class="value"><a href="<?php echo $escape($itemSet->url()); ?>"><?php echo $itemSet->displayTitle(); ?></a></dd>
<dd class="value">
<a href="<?php echo $escape($itemSet->url()); ?>">
<?php echo $itemSet->displayTitle(); ?>
</a>
</dd>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</dl>
-->
<?php
$page = $this->params()->fromQuery('page', 1);
$property = $this->params()->fromQuery('property');

View File

@ -31,7 +31,7 @@ $("#archive_page_title").html('<?= $site->title(); ?>');
<div class="resource-title">
<?php echo $this->pageTitle($media->displayTitle(), 2); ?>
<h3 class="label"><?php echo $translate('Media'); ?></h3>
<!-- <h3 class="label"><?php echo $translate('Media'); ?></h3> -->
</div>
<?php $this->trigger('view.show.before'); ?>
<?php echo $media->render(); ?>

View File

@ -50,6 +50,7 @@ if ($activePage):
<?php endif; ?>
<!--
<?php
$pages = $this->getHelperPluginManager()->get('archiveSiteMeta')->getPages('exhibit');
foreach ($pages as $key => $value) {
@ -59,6 +60,7 @@ if ($activePage):
print('<br />');
}
?>
-->
<!-- archive menu -->
<?php