Arc-hive-omeka-theme/view/common/cross-site-search/site-page-results.phtml

52 lines
1.4 KiB
PHTML
Raw Permalink Normal View History

<?php
$fulltextSearch = $this->params()->fromQuery('fulltext_search');
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
$archive_collections = $archiveSiteHelper->getCollections();
?>
<!-- <h2><?php echo sprintf($this->translate('Site page results for "%s"'), $fulltextSearch); ?></h2> -->
2021-05-08 14:09:02 +02:00
<table>
<thead>
<tr>
<th>Page</th>
<th>Site</th>
<th>Curator</th>
<th>Collection</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php foreach ($sitePages as $sitePage): ?>
<?php $site = $sitePage->site(); ?>
<?php $site_meta_values = $archiveSiteHelper->getSiteMetaValues($site); ?>
<tr>
<td>
<?php echo $this->hyperlink($sitePage->title(), $sitePage->siteUrl()); ?>
</td>
<td>
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>
</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>
<?php endforeach; ?>
</tbody>
</table>