/** * Recursively build a nested HTML unordered list from the provided * collection tree. * * @see CollectionTreeTable::getCollectionTree() * @see CollectionTreeTable::getAncestorTree() * @see CollectionTreeTable::getDescendantTree() * @param array $collectionTree * @param bool $linkToCollectionShow * @return string */ public function collectionTreeList($collectionTree, $linkToCollectionShow = true) { if (!$collectionTree) { return; } $collectionTable = get_db()->getTable('Collection'); $html = '<ul>'; foreach ($collectionTree as $collection) { $html .= '<li>'; if ($linkToCollectionShow && !isset($collection['current'])) { $html .= link_to_collection(null, array(), 'show', $collectionTable->find($collection['id'])); } else { $html .= $collection['name'] ? $collection['name'] : '[Untitled]'; } $html .= $this->collectionTreeList($collection['children'], $linkToCollectionShow); $html .= '</li>'; } $html .= '</ul>'; return $html; }
/** * Build a nested HTML unordered list of the full collection tree, starting * at root collections. * * @param bool $linkToCollectionShow * @return string|null */ public function collectionTreeFullList($linkToCollectionShow = true) { $rootCollections = get_db()->getTable('CollectionTree')->getRootCollections(); // Return NULL if there are no root collections. if (!$rootCollections) { return null; } $collectionTable = get_db()->getTable('Collection'); $html = '<div id="collection-tree"><ul>'; foreach ($rootCollections as $rootCollection) { $html .= '<li>'; if ($linkToCollectionShow) { $html .= link_to_collection(null, array(), 'show', $collectionTable->find($rootCollection['id'])); } else { $html .= $rootCollection['name'] ? $rootCollection['name'] : '[Untitled]'; } $collectionTree = get_db()->getTable('CollectionTree')->getDescendantTree($rootCollection['id']); $html .= $this->view->collectionTreeList($collectionTree, $linkToCollectionShow); $html .= '</li>'; } $html .= '</ul></div>'; return $html; }
/** * Get a link to the collection to which the item belongs. * * The default text displayed for this link will be the name of the collection, * but that can be changed by passing a string argument. * * @package Omeka\Function\View\Navigation * @uses link_to_collection() * @param string|null $text Text for the link. * @param array $props HTML attributes for the <a> tag. * @param string $action 'show' by default. * @return string */ function link_to_collection_for_item($text = null, $props = array(), $action = 'show') { if ($collection = get_collection_for_item()) { return link_to_collection($text, $props, $action, $collection); } return __('No Collection'); }
} ?> <?php echo link_to_collection(); ?> <?php if (!$collection->public) { echo __('(Private)'); } ?> <?php if (is_allowed($collection, 'edit')) { ?> <ul class="action-links"> <li><?php echo link_to_collection(__('Edit'), array('class' => 'edit'), 'edit'); ?> </li> </ul> <?php } ?> <?php fire_plugin_hook('admin_collections_browse_each', array('collection' => $collection, 'view' => $this)); ?> </td> <td> <?php if ($collection->hasContributor()) { ?> <?php
<?php } ?> <?php echo "\n<script text=javascript>\nconsole.log('we did it boyz');\nvar url = window.location.href\nconsole.log(url);\n if (url.indexOf('/documents/') > -1) {\n jQuery('#language-button').hide();\n jQuery('#language-button').text('Site Not Available in Spanish');\n jQuery('#language-button').css('fontSize, 5px');\n }\n</script>\n"; ?> <?php $collectionTitle = ''; $collectionIDs = collection_order_array(); $num_of_collections = count($collectionIDs); $div_counter = 1; foreach ($collectionIDs as $collectionID) { $collection = get_record_by_id('collection', $collectionID); $collection_link = link_to_collection($collectionTitle, array(), 'show', $collection); $collection_items = get_records('Item', array('collection' => $collection['id'], 'sort_field' => 'Scripto,Weight', 'sort_dir' => 'a'), 999); $num_of_collection_items = count($collection_items); set_loop_records('items', $collection_items); $collection_item_list = array(); foreach (loop('items') as $item) { set_current_record('item', $item); array_push($collection_item_list, array('thumb' => item_image('square_thumbnail', array('alt' => metadata($item, array('Dublin Core', 'Title')))), 'link' => record_url($item), 'name' => metadata($item, array('Dublin Core', 'Title')))); } echo '<h1 style="display: inline;">' . $collection_link . '</h1>'; echo '<hr style="visibility: hidden; margin-top: 2px; margin-bottom: 4px;" />'; echo '<ul id="collection' . $div_counter . '" class="slider">'; for ($i = 0; $i < $num_of_collection_items; $i++) { echo '<li>'; echo '<a href="' . $collection_item_list[$i]['link'] . '" rel="tooltip" title="' . $collection_item_list[$i]['name'] . '">' . $collection_item_list[$i]['thumb'] . '</a>'; echo '</li>';
<section class="three columns omega"> <div id="save" class="panel"> <input type="submit" name="submit" class="big green button" id="save-changes" value="<?php echo __('Save Changes'); ?> " /> <a href="<?php echo html_escape(public_url('collections/show/' . metadata('collection', 'id'))); ?> " class="big blue button" target="_blank"><?php echo __('View Public Page'); ?> </a> <?php echo link_to_collection(__('Delete'), array('class' => 'big red button delete-confirm'), 'delete-confirm'); ?> <?php fire_plugin_hook("admin_collections_panel_buttons", array('view' => $this, 'record' => $collection, 'collection' => $collection)); ?> <div id="public-featured"> <div class="public"> <?php echo $this->formLabel('public', __('Public')); ?> <?php echo $this->formCheckbox('public', $collection->public, array(), array('1', '0')); ?> </div>
</a> </div> </td> <td> <div id="number-search-cell"> <?php echo __($record->id); ?> </div> </td> <td> <div id="collection-search-cell"> <?php if ($recordType === 'Item' && ($collectionTitle = metadata('item', 'Collection Name'))) { if ($collection = get_collection_for_item()) { echo __(link_to_collection($collectionTitle, array(), 'show', $collection)); } } else { echo 'No Collection'; } ?> </div> </td> <td> <div id="description-search-cell"> <?php if ($recordType === 'Item') { echo __(metadata($record, array('Dublin Core', 'Description'), array('snippet' => 300))); } ?> </div>
<div class="collection"> <div class="row"> <div class="col-sm-2"> <?php if ($collectionImage = record_image('collection', 'square_thumbnail')) { ?> <?php echo link_to_collection($collectionImage, array('class' => 'image')); ?> <?php } ?> </div> <div class="col-sm-3"> <?php echo link_to_collection(); ?> </div> <div class="col-sm-3"> <?php if ($collection->hasContributor()) { ?> <?php echo metadata('collection', array('Dublin Core', 'Contributor'), array('all' => true, 'delimiter' => ', ')); ?> <?php } ?> </div> <div class="col-sm-4"> <?php
public function hookAdminItemsShowSidebar($args) { $item = $args['item']; $html = '<div class="info panel">'; $html .= '<h4>' . __('Multiple Collections') . '</h4>'; $collections = multicollections_get_collections_for_item($item); // No collection. if (empty($collections)) { $html .= '<p>' . __('No multiple collections') . '</p>'; } else { $html .= '<ul>'; foreach ($collections as $collection) { $html .= '<li>'; $html .= __('%s [Items count: %d]', link_to_collection(null, array(), 'show', $collection), multicollections_total_items_in_collection($collection)); $html .= '</li>'; } $html .= '</ul>'; } $html .= '</div>'; echo $html; }
<?php if (total_records('collection') > 0) { ?> <?php foreach (loop('collection') as $collection) { ?> <div class="collection"> <h2><?php echo link_to_collection(); ?> </h2> <?php if ($collectionImage = record_image('collection', 'square_thumbnail')) { ?> <?php echo link_to_collection($collectionImage, array('class' => 'image')); ?> <?php } ?> <?php if (metadata('collection', array('Dublin Core', 'Description'))) { ?> <div class="collection-description"> <?php echo text_to_paragraphs(metadata('collection', array('Dublin Core', 'Description'), array('snippet' => 150))); ?> </div> <?php }
?> </div> <?php } //endif; ?> <?php if (metadata('collection', array('Dublin Core', 'Description'))) { ?> <hr> <?php echo text_to_paragraphs(metadata('collection', array('Dublin Core', 'Description'), array('snippet' => 150))); ?> <?php echo link_to_collection('View this collection', array('class' => 'link-to-exhibit')); ?> <?php } ?> </div> <?php } ?> <?php } else { ?> <div class="content-block browse-page"> <h1>Browse all collections</h1> <p><?php echo 'No collections added, yet.';
<span class="text-nowrap"><a href="<?php echo url('/'); ?> "><?php echo option('site_title'); ?> </a> at BGSU.</a> </div> </div> <?php } elseif (!empty($collection)) { ?> <div class="col-sm-8 text-right"> <div> The <?php echo link_to_collection(null, array(), 'show', $collection); ?> collection is part of the <span class="text-nowrap"><a href="<?php echo url('/'); ?> "><?php echo option('site_title'); ?> </a> at BGSU.</a> </div> </div> <?php } else { ?> <div class="col-sm-4 col-sm-push-4 text-right">
echo $pageTitle; ?> </h1> <?php echo pagination_links(); ?> <?php foreach (loop('collections') as $collection) { ?> <div class="collection-panel"> <div id="collection-container"> <div class="item-meta"> <h2><?php echo link_to_collection(metadata('collection', array('Dublin Core', 'Title')), array('class' => 'permalink')); ?> </h2> <?php if (metadata('collection', array('Dublin Core', 'Description'))) { ?> <div class="item-description"> <?php echo text_to_paragraphs(metadata('collection', array('Dublin Core', 'Description'), array('snippet' => 150))); ?> </div> <?php } ?>
</h2> <?php $collections = get_recent_collections(5); set_loop_records('collections', $collections); foreach (loop('collections') as $collection) { ?> <div class="recent-row"> <p class="recent"><?php echo link_to_collection(); ?> </p> <?php if (is_allowed($collection, 'edit')) { ?> <p class="dash-edit"><?php echo link_to_collection(__('Edit'), array(), 'edit'); ?> </p> <?php } ?> </div> <?php } ?> <?php if (is_allowed('Collections', 'add')) { ?> <div class="add-new-link"><p><a class="add-collection" href="<?php echo html_escape(url('collections/add')); ?>
foreach (loop('collections') as $collection) { ?> <div class="collection"> <h2><?php echo link_to_collection(); ?> </h2> <?php if ($description = snippet_by_word_count(metadata('collection', array('Dublin Core', 'Description')), 50)) { ?> <div class="description collection-description"> <div class="element-text"><?php echo $description; echo link_to_collection('show more.'); ?> </div> </div> <?php } ?> <div class="meta collection-meta"> <?php if ($collection->hasContributor()) { ?> <div class="element"> <h3><?php echo __('Contributors(s)'); ?>