Skip to content

Commit

Permalink
add item-set show.phtml
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvitale committed Nov 24, 2022
1 parent 70ec8c9 commit 9395290
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions view/omeka/site/item-set/show.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
$this->htmlElement('body')->appendAttribute('class', 'page');
$this->pageTitle($page->title(), 2);
$showPagePagination = $this->siteSetting('show_page_pagination', true);
?>

<?php
$nav = $site->publicNav();
$container = $nav->getContainer();
$activePage = $nav->findActive($container);


$path = $_SERVER["REQUEST_URI"];
$parts = explode('/', $path);
$re = '/page\/view(.*)/';
$item = "";
$is_view = false;
preg_match($re, $path, $matches, PREG_OFFSET_CAPTURE, 0);
if ($matches):
$is_view = true;
$groups = array_values($matches);
$item = $matches[1][0];
endif;
?>


<?php if ($activePage): ?>
<?php if ($this->displayNavigation && $activePage['page']->hasPages()): ?>
<nav class="sub-menu"><?php echo $nav->menu()->renderSubMenu(); ?></nav>
<?php endif; ?>
<?php endif; ?>


<ul id="simple-pages-breadcrumbs" class="breadcrumb">
<li class="breadcrumb-link"<?php echo link_to_home_page(__('Home')); ?></li>
<li class="breadcrumb-link"<?php echo link_to_collection_for_item(); ?></li>
<li class="breadcrumb-link"<?php echo link_to_item(); ?></li>
</ul>



<?php
//echo "active page: ".$activePage['page'];
if ($activePage['page'] == "Home"):

$itemNum = $this->api()->search('items', ['limit' => 0])->getTotalResults();
$item_setsNum = $this->api()->search('item_sets', ['limit' => 0])->getTotalResults();
//$itemNum = "5";

echo '<div id="main_jumbotron" class="jumbotron">
<div id="search_container">
<div id="search_pre">
<span class="fixed-txt">Search within our Digital Library over </span>
<span class="var-txt">'.$itemNum.'</span><span class="fixed-txt"> items and
<span class="var-txt">'.$item_setsNum.'</span> collections:</span>
</div>
<div id="jumbotron_search">';
echo $this->partial('common/search-form');
echo '</div></div></div>';

endif;
?>

<?php $this->trigger('view.show.before'); ?>
<div class="blocks">
<?php echo $this->content; ?>
</div>
<?php $this->trigger('view.show.after'); ?>
<?php if ($showPagePagination): ?>
<?php echo $this->sitePagePagination(); ?>
<?php endif; ?>

<?php if ($is_view === true): ?>
<script>init_view();</script>
<?php endif; ?>

0 comments on commit 9395290

Please sign in to comment.