Exemple #1
0
<ul class="nav nav-pills nav-stacked well">
<?php 
    if (!empty($header)) {
        ?>
	<li class="nav-header disabled"><a><?php 
        echo $header;
        ?>
</a></li>
<?php 
    }
    foreach ($list as $name => $path) {
        if (IS_ADMIN && !Site_Util::check_ext_uri($path, IS_ADMIN) && Auth::check() && !\Admin\Site_Util::check_exists_accessible_uri($path)) {
            continue;
        }
        ?>
	<li<?php 
        if (check_current_uri($path)) {
            ?>
 class="active"<?php 
        }
        ?>
><?php 
        echo anchor_icon($path, $name, null, null, false, null, IS_ADMIN);
        ?>
</li>
<?php 
    }
    ?>
</ul>
<?php 
}
Exemple #2
0
    foreach ($menus as $menu) {
        $li_class = !empty($is_ajax_loaded) ? ' class="ajax_loaded"' : '';
        if (empty($menu['tag']) || $menu['tag'] == 'a' || $menu['tag'] == 'anchor') {
            $href = isset($menu['href']) ? $menu['href'] : '#';
            $attr = isset($menu['attr']) ? $menu['attr'] : array();
            $label = isset($menu['label']) ? $menu['label'] : '';
            if (isset($menu['icon_term'])) {
                if (empty($attr['data-msg']) && ($msg = Site_Util::get_confirm_msg(str_replace('form.', '', $menu['icon_term'])))) {
                    $attr['data-msg'] = $msg;
                }
                ?>
		<li<?php 
                echo $li_class;
                ?>
><?php 
                echo anchor_icon($href, $menu['icon_term'], $attr);
                ?>
</li>
<?php 
            } else {
                ?>
		<li<?php 
                echo $li_class;
                ?>
><?php 
                echo anchor($href, $label, false, $attr);
                ?>
</li>
<?php 
            }
        } elseif ($menu['tag'] == 'disabled') {
    ?>
</span>
					<span class="caret"></span>
				</button>
				<ul class="dropdown-menu" role="menu">
<?php 
    foreach (Config::get('navigation.site.secure_user_dropdown') as $name => $path) {
        ?>
					<li<?php 
        if (check_current_uri($path)) {
            ?>
 class="active"<?php 
        }
        ?>
><?php 
        echo anchor_icon($path, $name);
        ?>
</li>
<?php 
    }
    ?>
				</ul>
			</div>
<?php 
    if (!IS_ADMIN) {
        echo render('_parts/template/navbar_user_button_notice');
    }
    ?>
		</div>

<?php 
Exemple #4
0
function navigation_link($label, $values, $is_admin = false)
{
    $href = $values;
    $attr = array();
    $acl_method = 'GET';
    if (is_array($values)) {
        $href = isset($values['href']) ? $values['href'] : '';
        if (isset($values['attr'])) {
            $attr = $values['attr'];
        }
        if (isset($values['method'])) {
            $acl_method = $values['method'];
        }
    }
    return $is_admin ? anchor($href, $label, true, $attr, false, $acl_method) : anchor_icon($href, $label, $attr);
}