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);
|
||||
$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">
|
||||
<input type="text" name="fulltext_search" value="<?php echo $this->escapeHtml($fulltextSearch); ?>">
|
||||
<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>
|
||||
|
||||
common/cross-site-search/results.phtml
|
||||
view/common/cross-site-search/results.phtml
|
||||
|
||||
<?php
|
||||
if ($responseSitePages && $responseSitePages->getTotalResults()):
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
<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">
|
||||
<ul>
|
||||
<?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'
|
||||
]);
|
||||
$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->trigger('view.layout');
|
||||
$title = $this->pageTitle($site->title());
|
||||
|
@ -90,6 +93,8 @@ endif;
|
|||
</header>
|
||||
|
||||
|
||||
Hello
|
||||
|
||||
<div id="content" role="main">
|
||||
<?php echo $this->content; ?>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
$translate = $this->plugin('translate');
|
||||
|
||||
$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>
|
||||
|
||||
|
||||
omeka/site/index.phtml
|
||||
|
||||
<?php if ($sites): ?>
|
||||
|
||||
<?php echo $this->partial(
|
||||
|
@ -21,6 +24,7 @@ $this->headTitle($subtitle);
|
|||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||
$collections = $archiveSiteHelper->getCollections();
|
||||
?>
|
||||
<!--
|
||||
<h2>Collections</h2>
|
||||
<hr />
|
||||
<p>
|
||||
|
@ -29,35 +33,41 @@ $collections = $archiveSiteHelper->getCollections();
|
|||
<br />
|
||||
<?php } ?>
|
||||
</p>
|
||||
-->
|
||||
|
||||
<!-- <h2 class="site-list-heading"><?php echo $subtitle; ?></h2> -->
|
||||
|
||||
<h2 class="site-list-heading"><?php echo $subtitle; ?></h2>
|
||||
|
||||
|
||||
<hr />
|
||||
<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);
|
||||
?>
|
||||
|
||||
<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
|
||||
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; ?>
|
||||
|
|
Loading…
Reference in New Issue