Пример #1
0
        <p><span class="label"><?php 
echo __('Featured');
?>
:</span> <?php 
echo $collection->featured ? __('Yes') : __('No');
?>
</p>
    </div>

    <div class="total-items panel">
        <h4><?php 
echo __('Total Number of Items');
?>
</h4>
        <p><?php 
echo link_to_items_in_collection();
?>
</p>
    </div>

    <div class="contributors panel">
        <h4><?php 
echo __('Contributors');
?>
</h4>
        <ul id="contributor-list">
            <?php 
if ($collection->hasContributor()) {
    ?>
 
            <li><?php 
 /**
  * Appends some more stats to the dashboard
  * 
  * @return void
  **/
 function filterAdminDashboardStats($stats)
 {
     $vvcollection = get_record_by_id('Collection', 1);
     $stats[] = array(link_to_items_in_collection(metadata($vvcollection, 'total_items'), $props = array(), $action = 'browse', $collectionObj = $vvcollection), __('Folktales'));
     $pcollection = get_record_by_id('Collection', 4);
     $stats[] = array(link_to_items_in_collection(metadata($pcollection, 'total_items'), $props = array(), $action = 'browse', $collectionObj = $vvcollection), __('Narrators'));
     $ccollection = get_record_by_id('Collection', 9);
     $stats[] = array(link_to_items_in_collection(metadata($ccollection, 'total_items'), $props = array(), $action = 'browse', $collectionObj = $ccollection), __('Collectors'));
     $tpcollection = get_record_by_id('Collection', 3);
     $stats[] = array(link_to_items_in_collection(metadata($tpcollection, 'total_items'), $props = array(), $action = 'browse', $collectionObj = $tpcollection), __('Folktale Types'));
     $mcollection = get_record_by_id('Collection', 10);
     $stats[] = array(link_to_items_in_collection(metadata($mcollection, 'total_items'), $props = array(), $action = 'browse', $collectionObj = $mcollection), __('Motifs'));
     return $stats;
 }