copies omeka app desault phtml to theme

This commit is contained in:
buttle 2021-05-08 11:44:47 +02:00
parent 9c73160a7d
commit c3c84a418b
16 changed files with 284 additions and 5 deletions

View File

@ -0,0 +1,7 @@
<form id="advanced-search" method="get" action="<?php echo $this->escapeHtml($this->url(null, ['action' => 'items'], true)); ?>">
<?php echo $this->partial('common/advanced-search', ['query' => $this->params()->fromQuery(), 'resourceType' => 'item']); ?>
<div class="advanced-search-actions">
<?php echo $this->hyperlink($this->translate('Reset'), $this->url(null, [], true), ['class' => 'button']); ?>
<input type="submit" name="submit" value="<?php echo $this->escapeHtml($this->translate('Search')); ?>">
</div>
</form>

View File

@ -0,0 +1,7 @@
<form id="advanced-search" method="get" action="<?php echo $this->escapeHtml($this->url(null, ['action' => 'item-sets'], true)); ?>">
<?php echo $this->partial('common/advanced-search', ['query' => $this->params()->fromQuery(), 'resourceType' => 'item_set']); ?>
<div class="advanced-search-actions">
<?php echo $this->hyperlink($this->translate('Reset'), $this->url(null, [], true), ['class' => 'button']); ?>
<input type="submit" name="submit" value="<?php echo $this->escapeHtml($this->translate('Search')); ?>">
</div>
</form>

View File

@ -0,0 +1,8 @@
<?php
$action = $action ?? $this->url(null, [], true);
$fulltextSearch = $fulltextSearch ?? $this->params()->fromQuery('fulltext_search');
?>
<form action="<?php echo $this->escapeHtml($action); ?>" class="sitewide-search-form">
<input type="text" name="fulltext_search" value="<?php echo $this->escapeHtml($fulltextSearch); ?>">
<input type="submit" value="<?php echo $this->escapeHtml($this->translate('Search')); ?>">
</form>

View File

@ -0,0 +1,28 @@
<?php $fulltextSearch = $this->params()->fromQuery('fulltext_search'); ?>
<?php echo $this->hyperlink(
$this->translate('Advanced item search'),
$this->url(null, ['action' => 'items-advanced', 'class' => 'advanced-search'], ['query' => $this->params()->fromQuery()], true),
['class' => 'advanced-search']
); ?>
<h2><?php echo sprintf($this->translate('Item results for "%s"'), $fulltextSearch); ?></h2>
<?php echo $this->pagination(); ?>
<div class="item results">
<ul>
<?php foreach ($items as $item): ?>
<?php $sites = $item->sites(); ?>
<li>
<span class="result-title"><?php echo $item->displayTitle(); ?></span>
<ul>
<?php foreach ($sites as $site): ?>
<li><?php echo $this->hyperlink($site->title(), $item->siteUrl($site->slug())); ?></li>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php echo $this->pagination(); ?>

View File

@ -0,0 +1,28 @@
<?php $fulltextSearch = $this->params()->fromQuery('fulltext_search'); ?>
<?php echo $this->hyperlink(
$this->translate('Advanced item set search'),
$this->url(null, ['action' => 'item-sets-advanced', 'class' => 'advanced-search'], ['query' => $this->params()->fromQuery()], true),
['class' => 'advanced-search']
); ?>
<h2><?php echo sprintf($this->translate('Item set results for "%s"'), $fulltextSearch); ?></h2>
<?php echo $this->pagination(); ?>
<div class="item-set results">
<ul>
<?php foreach ($itemSets as $itemSet): ?>
<?php $sites = $itemSet->sites(); ?>
<li>
<span class="result-title"><?php echo $itemSet->displayTitle(); ?></span>
<ul>
<?php foreach ($sites as $site): ?>
<li><?php echo $this->hyperlink($site->title(), $itemSet->siteUrl($site->slug())); ?></li>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php echo $this->pagination(); ?>

View File

@ -0,0 +1,100 @@
<?php
$fulltextSearch = $this->params()->fromQuery('fulltext_search');
$hasResults = false;
?>
<h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2>
common/cross-site-search/results.phtml
<?php
if ($responseSitePages && $responseSitePages->getTotalResults()):
$hasResults = true;
?>
<div class="site results">
<h3><?php echo $this->translate('Site pages'); ?></h2>
<ul>
<?php foreach ($responseSitePages->getContent() as $sitePage): ?>
<?php $site = $sitePage->site(); ?>
<li>
<span class="result-title"><?php echo $this->hyperlink($sitePage->title(), $sitePage->siteUrl()); ?></span>
<span class="result-site"><?php echo $this->hyperlink($site->title(), $site->siteUrl()); ?></span>
</li>
<?php endforeach; ?>
</ul>
<?php echo $this->hyperlink(
sprintf($this->translate('View all results (%s total)'), $responseSitePages->getTotalResults()),
$this->url(
null,
['action' => 'site-pages'],
['query' => ['fulltext_search' => $fulltextSearch]],
true
)
); ?>
</div>
<?php endif; ?>
<?php
if ($responseItems && $responseItems->getTotalResults()):
$hasResults = true;
?>
<div class="item results">
<h3><?php echo $this->translate('Items'); ?></h2>
<ul>
<?php foreach ($responseItems->getContent() as $item): ?>
<?php $sites = $item->sites(); ?>
<li>
<span class="result-title"><?php echo $item->displayTitle(); ?></span>
<ul>
<?php foreach ($sites as $site): ?>
<li><?php echo $this->hyperlink($site->title(), $item->siteUrl($site->slug())); ?></li>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</ul>
<?php echo $this->hyperlink(
sprintf($this->translate('View all results (%s total)'), $responseItems->getTotalResults()),
$this->url(
null,
['action' => 'items'],
['query' => ['fulltext_search' => $fulltextSearch]],
true
)
); ?>
</div>
<?php endif; ?>
<?php if ($responseItemSets && $responseItemSets->getTotalResults()):
$hasResults = true;
?>
<div class="item-set results">
<h3><?php echo $this->translate('Item sets'); ?></h2>
<ul>
<?php foreach ($responseItemSets->getContent() as $itemSet): ?>
<?php $sites = $itemSet->sites(); ?>
<li>
<span class="result-title"><?php echo $itemSet->displayTitle(); ?></span>
<ul>
<?php foreach ($sites as $site): ?>
<li><?php echo $this->hyperlink($site->title(), $item->siteUrl($site->slug())); ?></li>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</ul>
<?php echo $this->hyperlink(
sprintf($this->translate('View all results (%s total)'), $responseItemSets->getTotalResults()),
$this->url(
null,
['action' => 'item-sets'],
['query' => ['fulltext_search' => $fulltextSearch]],
true
)
); ?>
</div>
<?php endif; ?>
<?php if (!$hasResults): ?>
<p><?php echo $this->translate('No result found'); ?>
<?php endif; ?>

View File

@ -0,0 +1,15 @@
<?php $fulltextSearch = $this->params()->fromQuery('fulltext_search'); ?>
<h2><?php echo sprintf($this->translate('Site page results for "%s"'), $fulltextSearch); ?></h2>
<div class="site results">
<ul>
<?php foreach ($sitePages as $sitePage): ?>
<?php $site = $sitePage->site(); ?>
<li>
<span class="result-title"><?php echo $this->hyperlink($sitePage->title(), $sitePage->siteUrl()); ?></span>
<span class="result-site"><?php echo $this->hyperlink($site->title(), $site->siteUrl()); ?></span>
</li>
<?php endforeach; ?>
</ul>
</div>

View File

@ -0,0 +1,9 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
<h2><?php echo $this->translate('Search'); ?></h2>
omeka/search/index.phtml
<?php echo $this->partial(
'common/cross-site-search/fulltext-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>

View File

@ -0,0 +1,7 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
<h2><?php echo $this->translate('Advanced item set search'); ?></h2>
<?php echo $this->partial(
'common/cross-site-search/advanced-item-set-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>

View File

@ -0,0 +1,8 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
<?php echo $this->partial(
'common/cross-site-search/fulltext-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>
<?php echo $this->partial('common/cross-site-search/item-set-results.phtml'); ?>

View File

@ -0,0 +1,7 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
<h2><?php echo $this->translate('Advanced item search'); ?></h2>
<?php echo $this->partial(
'common/cross-site-search/advanced-item-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>

View File

@ -0,0 +1,8 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
<?php echo $this->partial(
'common/cross-site-search/fulltext-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>
<?php echo $this->partial('common/cross-site-search/item-results.phtml'); ?>

View File

@ -0,0 +1,10 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
<?php echo $this->partial(
'common/cross-site-search/fulltext-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>
omeka/search/results.phtml
<?php echo $this->partial('common/cross-site-search/results.phtml'); ?>

View File

@ -0,0 +1,10 @@
<h1><?php echo $this->hyperlink($this->setting('installation_title', 'Omeka S'), $this->url('top', ['action' => 'index'])); ?></h1>
omeka/search/site-pages.phtml
<?php echo $this->partial(
'common/cross-site-search/fulltext-form.phtml',
['action' => $this->url(null, ['action' => 'results'], true)]
); ?>
<?php echo $this->partial('common/cross-site-search/site-page-results.phtml'); ?>

View File

@ -17,16 +17,43 @@ $this->headTitle($subtitle);
['action' => $this->url('search', ['action' => 'results'], true)]
); ?>
Archive site list
<?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>
<hr />
<div class="site-list">
<?php
foreach ($sites as $site):
echo $this->partial('common/site-list-entry', ['site' => $site, 'showSummary' => true]);
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
?>
<div class="site">
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>
<p class="site-summary"><?php echo nl2br($site->summary()); ?></p>
<p class="site-summary"><?php echo $site->siteUrl(); ?></p>
<?php if ($site_meta_values != null) { ?>
currator = <?= $site_meta_values['currator']; ?><br />
thumbnail = <?= $site_meta_values['thumbnail']; ?><br />
project_date = <?= $site_meta_values['project_date']; ?><br />
collection = <?= $collections[$site_meta_values['collection']]; ?><br />
<?php } ?>
</div>
<?php
endforeach;
?>
</div>

View File

@ -7,7 +7,7 @@ $showPagePagination = $this->siteSetting('show_page_pagination', true);
<?php
// set header images
$img_src = $this->getHelperPluginManager()->get('pageMeta')->getPageImage($page);
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getPageImage($page);
if ($img_src) {
?>
<style>
@ -42,7 +42,7 @@ if ($activePage):
<?php
$pages = $this->getHelperPluginManager()->get('pageMeta')->getPages('exhibit');
$pages = $this->getHelperPluginManager()->get('archiveSiteMeta')->getPages('exhibit');
foreach ($pages as $key => $value) {
print($key);
print('<br />');