Beispiel #1
0
if ($user->hasPermission('管理自己的客户')) {
    ?>
      <li <?php 
    echo_link_active_class('/^client/', $current_url);
    ?>
>
        <a href="#"><i class="fa fa-users"></i> <span class="nav-label">客户管理</span> <span class="fa arrow"></span></a>
        <ul class="nav nav-second-level collapse">
          <li <?php 
    echo_link_active_class('/^client\\/list/', $current_url);
    ?>
><a href="<?php 
    echo uri('client/list');
    ?>
">列表</a></li>
          <li <?php 
    echo_link_active_class('/^client\\/add/', $current_url);
    ?>
><a href="<?php 
    echo uri('client/add');
    ?>
">添加新客户</a></li>
        </ul>
      </li>
      <?php 
}
?>
    </ul>

  </div>
</nav>
Beispiel #2
0
                      <a href="<?php 
                    echo strpos($cc->getUri(), 'http') === 0 ? $cc->getUri() : uri($cc->getUri());
                    ?>
"><?php 
                    echo $cc->getName();
                    ?>
</a>
                      <?php 
                    if (sizeof($cc->getChildren())) {
                        ?>
                      <ul class="sub-menu">
                        <?php 
                        foreach ($cc->getChildren() as $ccc) {
                            ?>
                          <li class="menu-item <?php 
                            echo_link_active_class('/^' . $ccc->getUri() . '$/', get_cur_page_url(), 'current-menu-item');
                            ?>
 <?php 
                            if (sizeof($ccc->getChildren())) {
                                ?>
menu-item-has-children<?php 
                            }
                            ?>
">
                            <a href="<?php 
                            echo strpos($ccc->getUri(), 'http') === 0 ? $ccc->getUri() : uri($ccc->getUri());
                            ?>
"><?php 
                            echo $ccc->getName();
                            ?>
</a>