/** * Append an Exhibits section to admin dashboard * * @param array $stats Array of "statistics" displayed on dashboard * @return array */ function exhibit_builder_dashboard_stats($stats) { if (is_allowed('ExhibitBuilder_Exhibits', 'browse')) { $stats[] = array(link_to('exhibits', array(), total_records('Exhibits')), __('exhibits')); } return $stats; }
<?php $pageTitle = __('Browse Collections') . ' ' . __('(%s total)', $total_results); echo head(array('title' => $pageTitle, 'bodyclass' => 'collections')); echo flash(); ?> <?php if (total_records('Collection') > 0) { ?> <div class="table-actions"> <?php if (is_allowed('Collections', 'add')) { ?> <a href="<?php echo html_escape(url('collections/add')); ?> " class="small green button"> <?php echo __('Add a Collection'); ?> </a> <?php } ?> </div> <?php echo pagination_links(); ?> <?php if (has_loop_records('collections')) {
/** * Get the navigation for items. * * @package Omeka\Function\View\Navigation * @uses nav() * @param array $navArray * @param integer|null $maxDepth * @return string */ function public_nav_items(array $navArray = null, $maxDepth = 0) { if (!$navArray) { $navArray = array(array('label' => __('Browse All'), 'uri' => url('items/browse'))); if (total_records('Tag')) { $navArray[] = array('label' => __('Browse by Tag'), 'uri' => url('items/tags')); } $navArray[] = array('label' => __('Search Items'), 'uri' => url('items/search')); } return nav($navArray, 'public_navigation_items'); }
<?php $query = array(); if (!empty($collection)) { $pageNav[] = array('label' => __('Home'), 'uri' => record_url($collection)); $query['collection'] = $collection->id; } $pageNav[] = array('label' => __('Browse Items'), 'uri' => url('items/browse', $query)); if (empty($collection) && total_records('Tag')) { $pageNav[] = array('label' => __('Item Tags'), 'uri' => url('items/tags', $query)); } $pageNav[] = array('label' => __('Advanced Search'), 'uri' => url('items/search', $query)); return nav($pageNav)->setUlClass('nav nav-pills');
<?php } else { ?> <?php if (total_records('ContributionContributedItem') == 0) { ?> <h2><?php echo __('There is no contribution yet.'); ?> </h2> <?php } else { ?> <p><?php echo __('The query searched %d contributions and returned no results.', total_records('ContributionContributedItem')); ?> </p> <p><a href="<?php echo url('contribution/items'); ?> "><?php echo __('See all contributions.'); ?> </a></p> <?php } } ?> </div> <?php
<?php $totalRecords = total_records('ArchiveFolder_Folder'); $pageTitle = __('Archive Folders (%d total)', $total_results); queue_css_file('archive-folder'); queue_js_file('archive-folder-browse'); echo head(array('title' => $pageTitle, 'bodyclass' => 'archive-folder browse')); ?> <div id="primary"> <?php if (is_allowed('ArchiveFolder_Index', 'add')) { ?> <div class="right"> <a href="<?php echo html_escape(url('archive-folder/index/add')); ?> " class="add button small green"><?php echo __('Add a new archive folder'); ?> </a> </div> <?php } ?> <h2><?php echo __('Status of Archive Folders'); ?> </h2> <?php echo flash(); if (iterator_count(loop('ArchiveFolder_Folder'))) {
<?php echo head(array('bodyid' => 'home', 'bodyclass' => 'two-col')); ?> <div class="homepage-about"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="content-block extra-padding"> <div class="welcomebox"> <p style="font-size: 3em">Cornish life as captured on camera and recorded on reel.</p> <p>Find photos, watch films, and listen to the stories of Cornwall's rich history from Victorian times to the present day.</p> <p class="homepageitemtotal"><strong><?php echo total_records('Item'); ?> </strong> items and growing.</p> </div> </div> </div> </div> </div> </div> <?php $featured = get_theme_option('Homepage: Featured Content'); if ($featured && !empty($featured)) { ?> <div class="homepage-featured"> <div class="container"> <div class="row"> <div class="col-sm-12">
<?php $totalRecords = total_records('OaiPmhStaticRepository'); $pageTitle = __('OAI-PMH Static Repositories (%d total)', $total_results); queue_css_file('oai-pmh-static-repository'); queue_js_file('oai-pmh-static-repository-browse'); if (plugin_is_active('OaiPmhGateway')) { queue_css_file('oai-pmh-gateway'); queue_js_file('oai-pmh-gateway'); queue_js_file('oai-pmh-gateway-browse'); } echo head(array('title' => $pageTitle, 'bodyclass' => 'oai-pmh-static-repository browse')); ?> <div id="primary"> <?php if (is_allowed('OaiPmhStaticRepository_Index', 'add')) { ?> <div class="right"> <a href="<?php echo html_escape(url('oai-pmh-static-repository/index/add')); ?> " class="add button small green"><?php echo __('Create a new OAI-PMH Static Repository'); ?> </a> </div> <?php } ?> <h2><?php echo __('Status of Static Repositories');
</p> <a href="<?php echo html_escape(url('items/add')); ?> " class="add big green button"><?php echo __('Add an Item'); ?> </a> <?php } ?> <?php } else { ?> <p><?php echo __('The query searched %s items and returned no results.', total_records('Item')); ?> <?php echo __('Would you like to %s?', link_to_item_search(__('refine your search'))); ?> </p> <?php } } ?> <?php fire_plugin_hook('admin_items_browse', array('items' => $items, 'view' => $this)); ?> <?php
<?php echo js_escape(__('Show Details')); ?> , <?php echo js_escape(__('Hide Details')); ?> ]); Omeka.addReadyCallback(Omeka.ItemsBrowse.setupBatchEdit); </script> <?php } else { ?> <?php $total_items = total_records('Item'); ?> <?php if ($total_items === 0) { ?> <h2><?php echo __('You have no items.'); ?> </h2> <?php if (is_allowed('Items', 'add')) { ?> <p><?php echo __('Get started by adding your first item.'); ?> </p>
<?php echo head(array('maptype' => 'focusarea', 'title' => 'Browse by Tag', 'bodyid' => 'items', 'bodyclass' => 'browse tags')); ?> <div id="content"> <section class="browse tags"> <h2>Tags: <?php echo total_records('Tags'); ?> </h2> <div id="page-col-left"> <aside> <!-- add left sidebar content here --> </aside> </div> <div id="primary" class="browse"> <section id="tags"> <nav class="secondary-nav" id="tag-browse"> <?php mh_item_browse_subnav(); ?> </nav> <?php
include_once 'stealth-index.php'; } else { //if not stealth mode, do everything else echo head(array('maptype' => 'focusarea', 'bodyid' => 'home', 'bodyclass' => 'home')); ?> <div id="content"> <article id="homepage"> <div id="desktop-block"> <section id="custom-block"> <?php mh_custom_content(); echo random_item_link("View A Random " . mh_item_label('singular'), 'big-button'); $text = 'View all <span>' . total_records('Item') . ' ' . mh_item_label('plural') . '</span>'; echo '<p class="view-more-link">' . link_to_items_browse($text) . '</p>'; ?> </section> <section id="featured-story"> <?php echo mh_display_random_featured_item(true); ?> </section> </div> <section id="home-tours"> <?php mh_display_random_tours(11);
function list_tables($service) { $tables = $service->table->listTable(); echo "\nNo. of tables: " . count($tables) . "\n"; foreach ($tables as $table) { echo "\n" . $table['name'] . " - " . $table['tableId'] . " = " . total_records($table['tableId'], $service); } }
<?php $pageTitle = __('Dashboard'); echo head(array('bodyclass' => 'index primary-secondary', 'title' => $pageTitle)); ?> <?php $stats = array(array(link_to('items', null, total_records('Item')), __('items')), array(link_to('collections', null, total_records('Collection')), __('collections')), array(link_to('tags', null, total_records('Tag')), __('tags'))); if (is_allowed('Plugins', 'edit')) { $stats[] = array(link_to('plugins', null, total_records('Plugin')), __('plugins')); } if (is_allowed('Users', 'edit')) { $stats[] = array(link_to('users', null, total_records('User')), __('users')); } if (is_allowed('Themes', 'edit')) { $themeName = Theme::getTheme(Theme::getCurrentThemeName('public'))->title; $stats[] = array(link_to('themes', null, $themeName), __('theme')); } $stats = apply_filters('admin_dashboard_stats', $stats, array('view' => $this)); ?> <?php // Retrieve the latest version of Omeka by pinging the Omeka server. $userRole = current_user()->role; if ($userRole == 'super' || $userRole == 'admin') { $latestVersion = latest_omeka_version(); ?> <?php if ($latestVersion and version_compare(OMEKA_VERSION, $latestVersion, '<')) { ?> <div id="flash">
Omeka.addReadyCallback(Omeka.TaggingsBrowse.setupBatchEdit); </script> <?php } else { ?> <?php if (total_records('Tagging') == 0) { ?> <h2><?php echo __('There is no tagging yet.'); ?> </h2> <?php } else { ?> <p><?php echo __('The query searched %d items and returned no results.', total_records('Tagging')); ?> </p> <p><a href="<?php echo url('tagging'); ?> "><?php echo __('See all taggings.'); ?> </p> <?php } } echo foot();
$pageTitle = __('Dashboard'); echo head(array('bodyclass' => 'index primary-secondary', 'title' => $pageTitle)); ?> <?php $total_items = total_records('Item'); $total_collections = total_records('Collection'); $total_tags = total_records('Tag'); $stats = array(array(link_to('items', null, $total_items), __(plural('item', 'items', $total_items))), array(link_to('collections', null, $total_collections), __(plural('collection', 'collections', $total_collections))), array(link_to('tags', null, $total_tags), __(plural('tag', 'tags', $total_tags)))); if (is_allowed('Plugins', 'edit')) { $total_plugins = total_records('Plugin'); $stats[] = array(link_to('plugins', null, $total_plugins), __(plural('plugin', 'plugins', $total_plugins))); } if (is_allowed('Users', 'edit')) { $total_users = total_records('User'); $stats[] = array(link_to('users', null, $total_users), __(plural('user', 'users', $total_users))); } if (is_allowed('Themes', 'edit')) { $themeName = Theme::getTheme(Theme::getCurrentThemeName('public'))->title; $stats[] = array(link_to('themes', null, $themeName), __('theme')); } $stats = apply_filters('admin_dashboard_stats', $stats, array('view' => $this)); ?> <?php // Retrieve the latest version of Omeka by pinging the Omeka server. $userRole = current_user()->role; if ($userRole == 'super' || $userRole == 'admin') { $latestVersion = latest_omeka_version(); ?>