2021-05-24 18:13:23 +02:00
|
|
|
<?php
|
|
|
|
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
|
|
|
?>
|
|
|
|
|
2021-10-26 12:22:55 +02:00
|
|
|
<?php
|
2021-11-24 13:21:57 +01:00
|
|
|
$collections = $archiveSiteHelper->getCollections();
|
|
|
|
$projects = [];
|
2021-10-26 12:22:55 +02:00
|
|
|
foreach($sites as $site){
|
2021-10-29 11:21:26 +02:00
|
|
|
$site_data = $archiveSiteHelper->getSiteMetaValues($site);
|
2021-11-03 23:07:21 +01:00
|
|
|
$site_data['id'] = $site->id();
|
2021-10-29 11:21:26 +02:00
|
|
|
$site_data['url'] = $site->siteUrl();
|
|
|
|
$site_data['title'] = $site->title();
|
2021-11-24 13:21:57 +01:00
|
|
|
if (isset($site_data['collection'])) {
|
|
|
|
$site_data['collection'] = $collections[$site_data['collection']];
|
|
|
|
} else {
|
|
|
|
$site_data['collection'] = "";
|
|
|
|
}
|
2021-10-29 11:21:26 +02:00
|
|
|
$site_data['summary'] = nl2br($this->escapeHtml($site->summary()));
|
2021-11-24 13:21:57 +01:00
|
|
|
if (!isset($site_data['currator'])) {
|
|
|
|
$site_data['currator'] = "";
|
|
|
|
}
|
|
|
|
array_push($projects, $site_data);
|
2021-10-26 12:22:55 +02:00
|
|
|
}
|
2021-10-29 11:21:26 +02:00
|
|
|
//$collections = json_encode($collections, JSON_UNESCAPED_SLASHES);
|
|
|
|
//$collections = json_encode($collections, JSON_HEX_APOS);
|
|
|
|
//$collections = htmlspecialchars(json_encode($collections), ENT_QUOTES, 'UTF-8');
|
2021-11-24 13:21:57 +01:00
|
|
|
$projects = htmlentities(json_encode($projects, JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
|
2021-10-26 12:22:55 +02:00
|
|
|
?>
|
|
|
|
|
2021-11-24 11:02:30 +01:00
|
|
|
<div id="site-list">
|
|
|
|
<div
|
|
|
|
data-vue-component="archive-list"
|
2021-11-24 13:21:57 +01:00
|
|
|
data-collections='<?= $projects ?>'
|
2021-11-24 11:02:30 +01:00
|
|
|
data-page_size=3>
|
|
|
|
</div>
|
2021-10-26 12:22:55 +02:00
|
|
|
</div>
|
|
|
|
|
2021-05-24 18:13:23 +02:00
|
|
|
|
2021-10-29 11:21:26 +02:00
|
|
|
<script src="/themes/archive/asset/js/archive-list.js"></script>
|