public function hookAdminMenu($type = 1) { switch ($type) { case 1: $gears = new Gears(GEARS, array('remove' => FALSE, 'charge' => TRUE)); new Menu_Tabs(array('name' => 'gears', 'elements' => array(array('label' => t('Все') . ' (' . $gears->count() . ')', 'link' => l('/admin/gears/')), array('label' => t('Активные') . ' (' . $gears->filter(Gears::ENABLED)->count() . ')', 'link' => l('/admin/gears/enabled')), array('label' => t('Неактивные') . ' (' . $gears->filter(Gears::DISABLED)->count() . ')', 'link' => l('/admin/gears/disabled')), array('label' => t('Ядро') . ' (' . $gears->filter(Gears::CORE)->count() . ')', 'link' => l('/admin/gears/core')), array('label' => icon('plus') . ' ' . t('Добавить'), 'class' => 'fl_r', 'link' => l('/admin/gears/add'))))); return $gears; break; case 2: new Menu_Pills(array('name' => 'gears.add', 'elements' => array(array('label' => icon('upload') . ' ' . t('Загрузить'), 'link' => l('/admin/gears/add'))))); break; } }
echo date('H:i d.m.Y', filemtime(ROOT . DS . 'index' . EXT)); ?> <br/> <div class="well"> <span class="left"><b><?php echo t('Всего шестерёнок: '); ?> </b></span><span class="right"><?php echo HTML::a(l('/admin/gears/'), $gears->count(), array('class' => 'label')); ?> </span> <span class="left"><b><?php echo t('Активных: '); ?> </b></span><span class="right"><?php echo HTML::a(l('/admin/gears/enabled'), $gears->filter(Gears::ENABLED)->count(), array('class' => 'label label-success')); ?> </span> <span class="left"><b><?php echo t('Неактивных: '); ?> </b></span><span class="right"><?php echo HTML::a(l('/admin/gears/disabled'), $gears->filter(Gears::DISABLED)->count(), array('class' => 'label label-important')); ?> </span> <span class="left"><b><?php echo t('Ядра: '); ?> </b></span><span class="right"><?php echo HTML::a(l('/admin/gears/core'), $gears->filter(Gears::CORE)->count(), array('class' => 'label label-inverse')); ?>