当前位置: 首页>>代码示例>>PHP>>正文


PHP link_to_collection函数代码示例

本文整理汇总了PHP中link_to_collection函数的典型用法代码示例。如果您正苦于以下问题:PHP link_to_collection函数的具体用法?PHP link_to_collection怎么用?PHP link_to_collection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了link_to_collection函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: collectionTreeList

 /**
  * 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;
 }
开发者ID:ungc0,项目名称:comp356-mac15,代码行数:31,代码来源:CollectionTreeList.php

示例2: collectionTreeFullList

 /**
  * 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;
 }
开发者ID:ungc0,项目名称:comp356-mac15,代码行数:30,代码来源:CollectionTreeFullList.php

示例3: link_to_collection_for_item

/**
 * 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');
}
开发者ID:KelvinSmithLibrary,项目名称:playhouse,代码行数:20,代码来源:globals.php

示例4: link_to_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 
开发者ID:kent-state-university-libraries,项目名称:MultiCollections,代码行数:31,代码来源:browse.php

示例5: if

    <?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>';
开发者ID:HCDigitalScholarship,项目名称:ticha-scribe,代码行数:31,代码来源:index.php

示例6: __

    <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>
开发者ID:lchen01,项目名称:STEdwards,代码行数:30,代码来源:edit.php

示例7: __

</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>
开发者ID:KelvinSmithLibrary,项目名称:playhouse,代码行数:31,代码来源:index.php

示例8: link_to_collection

         <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 
开发者ID:jeau,项目名称:omeka-starter-theme,代码行数:31,代码来源:browse.php

示例9: hookAdminItemsShowSidebar

 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;
 }
开发者ID:kent-state-university-libraries,项目名称:MultiCollections,代码行数:21,代码来源:MultiCollectionsPlugin.php

示例10: foreach

    <?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 
        }
开发者ID:ricofreak,项目名称:omekaArchiveProject,代码行数:31,代码来源:browse.php

示例11: text_to_paragraphs

            ?>
                </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.';
开发者ID:pyscajor,项目名称:cornishmemory-omeka,代码行数:31,代码来源:browse.php

示例12: url

                                    <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">
开发者ID:BGSU-LITS,项目名称:omeka-theme-bgsu,代码行数:31,代码来源:footer.php

示例13: pagination_links

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 
    }
    ?>
 
开发者ID:AdrienneSerra,项目名称:Digitalsc,代码行数:30,代码来源:browse.php

示例14: get_recent_collections

</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'));
    ?>
开发者ID:lchen01,项目名称:STEdwards,代码行数:31,代码来源:404.php

示例15: foreach

    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)');
            ?>
开发者ID:sgbalogh,项目名称:peddler_clone5,代码行数:31,代码来源:browse.php


注:本文中的link_to_collection函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。