List collections with vue component #40
File diff suppressed because one or more lines are too long
|
@ -1,60 +1,30 @@
|
|||
<?php
|
||||
//
|
||||
// as for 2021 07 28 this template is not being used
|
||||
// consider deleting it
|
||||
//
|
||||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||
?>
|
||||
|
||||
<section class="collections-list">
|
||||
|
||||
<header>
|
||||
<h2> Latest in collections</h2>
|
||||
</header>
|
||||
<main class="">
|
||||
<article class="">
|
||||
<ul class="accordion" data-responsive-accordion-tabs="accordion small-accordion" data-multi-expand="true" data-allow-all-closed="true" data-deep-link="true">
|
||||
<li class="accordion-item title" data-accordion-item disabled>
|
||||
<a href="#" class="accordion-title">
|
||||
<ul class="">
|
||||
<li class="title">Title</li>
|
||||
<li class="curator">Artist</li>
|
||||
<li class="collection-name">Collection</li>
|
||||
<li class="date">Date</li>
|
||||
</ul>
|
||||
</a>
|
||||
<div class="accordion-content" data-tab-content>
|
||||
<figure>
|
||||
</figure>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
$collections = [];
|
||||
foreach($sites as $site){
|
||||
$site_data = $archiveSiteHelper->getSiteMetaValues($site);
|
||||
$site_data['id'] = $site->id();
|
||||
$site_data['url'] = $site->siteUrl();
|
||||
$site_data['title'] = $site->title();
|
||||
$site_data['summary'] = nl2br($this->escapeHtml($site->summary()));
|
||||
array_push($collections, $site_data);
|
||||
}
|
||||
//$collections = json_encode($collections, JSON_UNESCAPED_SLASHES);
|
||||
//$collections = json_encode($collections, JSON_HEX_APOS);
|
||||
//$collections = htmlspecialchars(json_encode($collections), ENT_QUOTES, 'UTF-8');
|
||||
//$collections = str_replace("'", "\'", $collections);
|
||||
$collections = htmlentities(json_encode($collections, JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
|
||||
//$collections = json_encode($collections);
|
||||
?>
|
||||
|
||||
<?php
|
||||
// read each omeka site to publish
|
||||
foreach($sites as $site):
|
||||
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
|
||||
// table body build file
|
||||
echo $this->partial('common/site-list-entry', [
|
||||
'site' => $site,
|
||||
'showSummary' => $summaries,
|
||||
'site_meta_values' => $site_meta_values,
|
||||
'archive_collections' => $archiveSiteHelper->getCollections(),
|
||||
]);
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</article>
|
||||
</main>
|
||||
<aside>
|
||||
<nav>
|
||||
<?php
|
||||
if (1 == 0):
|
||||
//if ($pagination):
|
||||
echo $this->pagination();
|
||||
endif;
|
||||
?>
|
||||
</nav>
|
||||
</aside>
|
||||
</section>
|
||||
<div data-vue-component="archive-list"
|
||||
data-collections='<?= $collections ?>'>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="/themes/archive/asset/js/archive-list.js"></script>
|
||||
|
|
|
@ -27,8 +27,5 @@
|
|||
<?= $this->site->title() ?>
|
||||
</a>
|
||||
</h2>
|
||||
<nav class="">
|
||||
<?php echo $this->partial('common/search-form.phtml'); ?>
|
||||
</nav>
|
||||
</aside>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue