Compare commits
No commits in common. "adafaf38b9da1fa07f9f5da2a55dc493ac2367d0" and "efa9584e9ce204f4010f1b0ca0a7c352aa8be1ab" have entirely different histories.
adafaf38b9
...
efa9584e9c
File diff suppressed because one or more lines are too long
|
@ -1,18 +1,8 @@
|
|||
|
||||
$(function(){
|
||||
$("#site-list").on( "click", ".accordion-title", function() {
|
||||
var title = this
|
||||
var content = $(this).closest('.accordion-item')
|
||||
.find('.accordion-content')
|
||||
if ($(content).is(':visible')) {
|
||||
$(content).slideUp('fast')
|
||||
$(this).closest('.accordion-item').removeClass('is-active')
|
||||
$(title).attr('aria-expanded', false)
|
||||
} else {
|
||||
$(content).slideDown('fast')
|
||||
$(this).closest('.accordion-item').addClass('is-active')
|
||||
$(title).attr('aria-expanded', true)
|
||||
}
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('._expand_site_item').click(function() {
|
||||
$(this).next('tr').toggle();
|
||||
return false;
|
||||
});
|
||||
})
|
||||
});
|
||||
})(jQuery)
|
||||
|
|
|
@ -2,38 +2,30 @@
|
|||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
$collections = $archiveSiteHelper->getCollections();
|
||||
$projects = [];
|
||||
$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();
|
||||
if (isset($site_data['collection'])) {
|
||||
$site_data['collection'] = $collections[$site_data['collection']];
|
||||
} else {
|
||||
$site_data['collection'] = "";
|
||||
}
|
||||
$site_data['summary'] = nl2br($this->escapeHtml($site->summary()));
|
||||
if (!isset($site_data['currator'])) {
|
||||
$site_data['currator'] = "";
|
||||
}
|
||||
array_push($projects, $site_data);
|
||||
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');
|
||||
$projects = htmlentities(json_encode($projects, JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
|
||||
//$collections = str_replace("'", "\'", $collections);
|
||||
$collections = htmlentities(json_encode($collections, JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
|
||||
//$collections = json_encode($collections);
|
||||
?>
|
||||
|
||||
<div id="site-list">
|
||||
<div
|
||||
data-vue-component="archive-list"
|
||||
data-collections='<?= $projects ?>'
|
||||
<div data-vue-component="archive-list"
|
||||
data-collections='<?= $collections ?>'
|
||||
data-page_size=3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="/themes/archive/asset/js/archive-list.js"></script>
|
||||
|
|
Loading…
Reference in New Issue