<div class="sections-list"> <?php if (!empty($tree)) { ?> <?php foreach ($tree as $type => $data) { ?> <?php if (empty($data)) { continue; } ?> <div class="mail-nav-header" data-type="section" data-icon="<?php echo Datasource_Data_Manager::get_icon($type); ?> "> <?php echo __(ucfirst($type)); ?> </div> <ul class="sections"> <?php foreach ($data as $id => $section) { ?> <?php echo recurse_menu($id, $section, $datasource->id()); ?> <?php }
<div class="panel-footer"> <?php if (ACL::check($section->has_access('document.create', TRUE))) { ?> <?php echo UI::button(__('Create Document'), array('href' => Route::get('datasources')->uri(array('controller' => 'document', 'directory' => $section->type(), 'action' => 'create')) . URL::query(array('ds_id' => $section->id())), 'icon' => UI::icon('plus'))); ?> <?php } ?> <?php if (ACL::check($section->has_access_view())) { ?> <?php echo UI::button(__('Goto section'), array('href' => Route::get('datasources')->uri(array('controller' => 'data', 'directory' => 'datasources')) . URL::query(array('ds_id' => $section->id())), 'icon' => UI::icon(Datasource_Data_Manager::get_icon($section->type())), 'class' => 'btn-xs btn-inverse')); ?> <?php } ?> </div> <?php } else { ?> <div class="note note-warning"> <?php echo UI::icon('lightbulb-o fa-lg'); ?> <?php echo __('You need select hybrid section'); ?>