moves site list item to module
This commit is contained in:
parent
c3c84a418b
commit
111e2218e2
|
@ -0,0 +1,7 @@
|
||||||
|
(function($) {
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('._expandable_site_item').click(function() {
|
||||||
|
alert('expand');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})(jQuery)
|
|
@ -2,6 +2,7 @@
|
||||||
$action = $action ?? $this->url(null, [], true);
|
$action = $action ?? $this->url(null, [], true);
|
||||||
$fulltextSearch = $fulltextSearch ?? $this->params()->fromQuery('fulltext_search');
|
$fulltextSearch = $fulltextSearch ?? $this->params()->fromQuery('fulltext_search');
|
||||||
?>
|
?>
|
||||||
|
view/common/cross-site-search/fulltext-form.phtml
|
||||||
<form action="<?php echo $this->escapeHtml($action); ?>" class="sitewide-search-form">
|
<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="text" name="fulltext_search" value="<?php echo $this->escapeHtml($fulltextSearch); ?>">
|
||||||
<input type="submit" value="<?php echo $this->escapeHtml($this->translate('Search')); ?>">
|
<input type="submit" value="<?php echo $this->escapeHtml($this->translate('Search')); ?>">
|
||||||
|
|
|
@ -5,7 +5,7 @@ $hasResults = false;
|
||||||
|
|
||||||
<h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2>
|
<h2><?php echo sprintf($this->translate('Search results for “%s”'), $fulltextSearch); ?></h2>
|
||||||
|
|
||||||
common/cross-site-search/results.phtml
|
view/common/cross-site-search/results.phtml
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($responseSitePages && $responseSitePages->getTotalResults()):
|
if ($responseSitePages && $responseSitePages->getTotalResults()):
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
<h2><?php echo sprintf($this->translate('Site page results for "%s"'), $fulltextSearch); ?></h2>
|
<h2><?php echo sprintf($this->translate('Site page results for "%s"'), $fulltextSearch); ?></h2>
|
||||||
|
|
||||||
|
view/common/cross-site-search/site-page-results.phtml
|
||||||
|
|
||||||
<div class="site results">
|
<div class="site results">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach ($sitePages as $sitePage): ?>
|
<?php foreach ($sitePages as $sitePage): ?>
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
$summary = $showSummary ? $site->summary() : null;
|
||||||
|
?>
|
||||||
|
<tr class="_expandable_site_item">
|
||||||
|
<td>
|
||||||
|
<!-- <?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?> -->
|
||||||
|
<?= $site->title(); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if ($site_meta_values != null): ?>
|
||||||
|
<?= $site_meta_values['currator']; ?><br />
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if ($site_meta_values != null): ?>
|
||||||
|
<?= $archive_collections[$site_meta_values['collection']]; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if ($site_meta_values != null): ?>
|
||||||
|
<?= $site_meta_values['project_date']; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="display:none">
|
||||||
|
<td>
|
||||||
|
<?php if ($site_meta_values != null): ?>
|
||||||
|
<?= $site_meta_values['thumbnail']; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php if ($summary): ?>
|
||||||
|
<?php echo nl2br($this->escapeHtml($summary)); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
|
@ -16,6 +16,9 @@ $this->headScript()->prependFile('//cdn.jsdelivr.net/npm/foundation-sites@6.5.3/
|
||||||
'crossorigin' => 'anonymous'
|
'crossorigin' => 'anonymous'
|
||||||
]);
|
]);
|
||||||
$this->headScript()->prependFile($this->assetUrl('js/global.js', 'Omeka'));
|
$this->headScript()->prependFile($this->assetUrl('js/global.js', 'Omeka'));
|
||||||
|
|
||||||
|
$this->headScript()->prependFile($this->assetUrl('js/expand-site-list-item.js'));
|
||||||
|
|
||||||
$this->headScript()->prependFile($this->assetUrl('vendor/jquery/jquery.min.js', 'Omeka'));
|
$this->headScript()->prependFile($this->assetUrl('vendor/jquery/jquery.min.js', 'Omeka'));
|
||||||
$this->trigger('view.layout');
|
$this->trigger('view.layout');
|
||||||
$title = $this->pageTitle($site->title());
|
$title = $this->pageTitle($site->title());
|
||||||
|
@ -90,6 +93,8 @@ endif;
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
Hello
|
||||||
|
|
||||||
<div id="content" role="main">
|
<div id="content" role="main">
|
||||||
<?php echo $this->content; ?>
|
<?php echo $this->content; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$translate = $this->plugin('translate');
|
$translate = $this->plugin('translate');
|
||||||
|
|
||||||
$this->htmlElement('body')->appendAttribute('class', 'site browse front');
|
$this->htmlElement('body')->appendAttribute('class', 'site browse front');
|
||||||
|
@ -10,6 +11,8 @@ $this->headTitle($subtitle);
|
||||||
<h1><?php echo $this->hyperlink($title, $this->url('top', ['action' => 'index'])); ?></h1>
|
<h1><?php echo $this->hyperlink($title, $this->url('top', ['action' => 'index'])); ?></h1>
|
||||||
|
|
||||||
|
|
||||||
|
omeka/site/index.phtml
|
||||||
|
|
||||||
<?php if ($sites): ?>
|
<?php if ($sites): ?>
|
||||||
|
|
||||||
<?php echo $this->partial(
|
<?php echo $this->partial(
|
||||||
|
@ -21,6 +24,7 @@ $this->headTitle($subtitle);
|
||||||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||||
$collections = $archiveSiteHelper->getCollections();
|
$collections = $archiveSiteHelper->getCollections();
|
||||||
?>
|
?>
|
||||||
|
<!--
|
||||||
<h2>Collections</h2>
|
<h2>Collections</h2>
|
||||||
<hr />
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
|
@ -29,35 +33,41 @@ $collections = $archiveSiteHelper->getCollections();
|
||||||
<br />
|
<br />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</p>
|
</p>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- <h2 class="site-list-heading"><?php echo $subtitle; ?></h2> -->
|
||||||
|
|
||||||
<h2 class="site-list-heading"><?php echo $subtitle; ?></h2>
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
<div class="site-list">
|
<div class="site-list">
|
||||||
|
|
||||||
<?php
|
<table>
|
||||||
foreach ($sites as $site):
|
<thead>
|
||||||
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
|
<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/site-list-entry', [
|
||||||
|
'site' => $site,
|
||||||
|
'site_meta_values' => $site_meta_values,
|
||||||
|
'archive_collections' => $archiveSiteHelper->getCollections(),
|
||||||
|
'showSummary' => true
|
||||||
|
]);
|
||||||
|
endforeach;
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<?php echo $this->pagination(); ?>
|
<?php echo $this->pagination(); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue