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

52 lines
1.4 KiB
PHTML

<?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> -->
<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>