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