Compare commits
3 Commits
1da5e9f4ea
...
551ba6b214
Author | SHA1 | Date |
---|---|---|
buttle | 551ba6b214 | |
buttle | 406a92b3f7 | |
buttle | 78606bad26 |
|
@ -6,3 +6,9 @@
|
|||
.archive-page-title {
|
||||
text-align: center;
|
||||
}
|
||||
._expand_site_item {
|
||||
cursor: pointer;
|
||||
}
|
||||
._expand_site_item:hover {
|
||||
background: #3374C2;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('._expandable_site_item').click(function() {
|
||||
alert('expand');
|
||||
$('._expand_site_item').click(function() {
|
||||
$(this).next('tr').toggle();
|
||||
});
|
||||
});
|
||||
})(jQuery)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||
$collections = $archiveSiteHelper->getCollections();
|
||||
?>
|
||||
|
||||
<div class="list-of-sites">
|
||||
|
@ -17,11 +16,9 @@ $collections = $archiveSiteHelper->getCollections();
|
|||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?php
|
||||
foreach($sites as $site):
|
||||
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
|
||||
//echo $this->partial('common/index/site-list-item', [
|
||||
echo $this->partial('common/site-list-entry', [
|
||||
'site' => $site,
|
||||
'showSummary' => $summaries,
|
||||
|
@ -36,7 +33,8 @@ $collections = $archiveSiteHelper->getCollections();
|
|||
|
||||
</div>
|
||||
<?php
|
||||
if ($pagination):
|
||||
if (1 == 0):
|
||||
//if ($pagination):
|
||||
echo $this->pagination();
|
||||
endif;
|
||||
?>
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
$fulltextSearch = $this->params()->fromQuery('fulltext_search');
|
||||
$hasResults = false;
|
||||
?>
|
||||
|
||||
<?php
|
||||
//$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||
//$collections = $archiveSiteHelper->getCollections();
|
||||
?>
|
||||
|
||||
<!-- arc-hive insert begins -->
|
||||
<?php
|
||||
//$site->pages();
|
||||
// set header image
|
||||
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
|
||||
if (!$img_src) {
|
||||
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
|
||||
|
@ -24,11 +25,14 @@ if (!$img_src) {
|
|||
|
||||
<script>
|
||||
<?php
|
||||
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
|
||||
/*
|
||||
if ($this->site->title() != "Collections") {
|
||||
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
|
||||
} else {
|
||||
$_html = $this->site->title();
|
||||
}
|
||||
*/
|
||||
?>
|
||||
$("#archive_page_title").html('<?php echo $_html ?>');
|
||||
</script>
|
||||
|
@ -38,6 +42,34 @@ $("#archive_page_title").html('<?php echo $_html ?>');
|
|||
|
||||
|
||||
<div class="results">
|
||||
<?php
|
||||
if ($this->site->title() == "Collections") {
|
||||
/* convert all the results into sites and display the list of sites */
|
||||
$result = array();
|
||||
if ($responseSitePages && $responseSitePages->getTotalResults()) {
|
||||
$hasResults = true;
|
||||
foreach ($responseSitePages->getContent() as $sitePage) {
|
||||
$site = $sitePage->site();
|
||||
array_push($result, $site);
|
||||
}
|
||||
}
|
||||
if ($responseItems && $responseItems->getTotalResults()) {
|
||||
$hasResults = true;
|
||||
foreach ($responseSitePages->getContent() as $sitePage) {
|
||||
$site = $sitePage->site();
|
||||
if (!in_array ($site , $result)) {
|
||||
array_push($result, $site);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $this->partial('common/block-layout/list-of-sites', [
|
||||
'sites' => $result,
|
||||
'summaries' => 1,
|
||||
]);
|
||||
} else {
|
||||
/* display the results as normal */
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($responseSitePages && $responseSitePages->getTotalResults()):
|
||||
$hasResults = true;
|
||||
|
@ -52,6 +84,7 @@ if ($responseSitePages && $responseSitePages->getTotalResults()):
|
|||
]);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ($responseItems && $responseItems->getTotalResults()):
|
||||
$hasResults = true;
|
||||
|
@ -66,8 +99,10 @@ if ($responseItems && $responseItems->getTotalResults()):
|
|||
]);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if (!$hasResults): ?>
|
||||
<p><?php echo $this->translate('No result found'); ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -4,6 +4,8 @@ $archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
|||
$archive_collections = $archiveSiteHelper->getCollections();
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- <h2><?php echo sprintf($this->translate('Site page results for "%s"'), $fulltextSearch); ?></h2> -->
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
$summary = $showSummary ? $site->summary() : null;
|
||||
?>
|
||||
|
||||
<tr class="_expandable_site_item">
|
||||
<tr class="_expand_site_item">
|
||||
<td>
|
||||
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>
|
||||
<?= $site->title() ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($site_meta_values != null): ?>
|
||||
|
@ -25,12 +25,14 @@ $summary = $showSummary ? $site->summary() : null;
|
|||
<tr style="display:none">
|
||||
<td>
|
||||
<?php if ($site_meta_values != null): ?>
|
||||
<?= $site_meta_values['thumbnail']; ?>
|
||||
<img src="<?= $site_meta_values['thumbnail']; ?>" />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<?php if ($summary): ?>
|
||||
<?php echo nl2br($this->escapeHtml($summary)); ?>
|
||||
<br />
|
||||
<?php endif; ?>
|
||||
<?php echo $this->hyperlink($site->title(), $site->siteUrl(), ['class' => 'site-link']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -7,11 +7,14 @@ $itemMedia = $item->media();
|
|||
$showLayout = $this->themeSetting('show_layout');
|
||||
?>
|
||||
|
||||
<!-- arc-hive insert begins -->
|
||||
<?php
|
||||
$site->pages();
|
||||
//$site->pages();
|
||||
// set header image
|
||||
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
|
||||
if ($img_src) {
|
||||
if (!$img_src) {
|
||||
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
#archive_header_img {
|
||||
|
@ -20,16 +23,7 @@ if ($img_src) {
|
|||
height:100px;
|
||||
}
|
||||
</style>
|
||||
<?php } else { ?>
|
||||
<style>
|
||||
#archive_header_img {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
/*
|
||||
<?php
|
||||
if ($this->site->title() != "Collections") {
|
||||
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
|
||||
|
@ -38,8 +32,8 @@ if ($img_src) {
|
|||
}
|
||||
?>
|
||||
$("#archive_page_title").html('<?php echo $_html ?>');
|
||||
*/
|
||||
</script>
|
||||
<!-- arc-hive insert ends -->
|
||||
|
||||
|
||||
<div class="resource-title">
|
||||
|
|
|
@ -3,11 +3,13 @@ $translate = $this->plugin('translate');
|
|||
?>
|
||||
<?php $this->htmlElement('body')->appendAttribute('class', 'media resource show'); ?>
|
||||
|
||||
<!-- arc-hive insert begins -->
|
||||
<?php
|
||||
$site->pages();
|
||||
// set header image
|
||||
//$site->pages();
|
||||
$img_src = $this->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
|
||||
if ($img_src) {
|
||||
if (!$img_src) {
|
||||
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
#archive_header_img {
|
||||
|
@ -16,15 +18,6 @@ if ($img_src) {
|
|||
height:100px;
|
||||
}
|
||||
</style>
|
||||
<?php } else { ?>
|
||||
<style>
|
||||
#archive_header_img {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<script>
|
||||
<?php
|
||||
if ($this->site->title() != "Collections") {
|
||||
|
@ -35,7 +28,7 @@ if ($img_src) {
|
|||
?>
|
||||
$("#archive_page_title").html('<?php echo $_html ?>');
|
||||
</script>
|
||||
|
||||
<!-- arc-hive insert ends -->
|
||||
|
||||
|
||||
<div class="resource-title">
|
||||
|
|
|
@ -7,10 +7,11 @@ $showPagePagination = $this->siteSetting('show_page_pagination', true);
|
|||
|
||||
<!-- arc-hive insert begins -->
|
||||
<?php
|
||||
$site->pages();
|
||||
// set header image
|
||||
//$site->pages();
|
||||
$img_src = $this->getHelperPluginManager()->get('headerImage')->getImage($page);
|
||||
if ($img_src) {
|
||||
if (!$img_src) {
|
||||
$img_src = '/themes/archive/asset/img/default-header-image.jpg';
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
#archive_header_img {
|
||||
|
@ -19,20 +20,16 @@ if ($img_src) {
|
|||
height:100px;
|
||||
}
|
||||
</style>
|
||||
<?php } else { ?>
|
||||
<style>
|
||||
#archive_header_img {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<?php } ?>
|
||||
<script>
|
||||
<?php
|
||||
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
|
||||
/*
|
||||
if ($this->site->title() != "Collections") {
|
||||
$_html = '<a href="'.$this->site->url().'">'.$this->site->title().'</a>';
|
||||
} else {
|
||||
$_html = $this->site->title();
|
||||
}
|
||||
*/
|
||||
?>
|
||||
$("#archive_page_title").html('<?php echo $_html ?>');
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue