123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | home
- |--------------------------------------------------------------------------
- */
- # 项目列表中的管理选项:
- # 数据库基本配置与数据管理、模板列表与生成、项目基本配置与管理等
- $view
- # 项目管理的链接
- /*
- ->fetch('#project-url@href', function()
- {
- return Maze::load('manage/menu.link#project');//这里可以改写成Maze::object('manage/menu.link')->project
- })
- # 日志的链接
- ->fetch('#log-url@href', function()
- {
- return Maze::load('manage/menu.link#log');
- })
- */
- ->fetch(array('.admin-manage@style', 0), 'manage/auth.manage')
- ->fetch(array('.admin-manage@style', 1), 'manage/auth.manage')
- # 另外一种形式
- # 退出的链接
- //->fetch('#logout-url@href', 'manage/menu.link#logout')
- # 首页的链接
- ->fetch('#index-url@href', 'manage/menu.link#index')
- # 项目列表
- ->fetch
- (
- '.project-list',
- 'manage/menu.left',
- array
- (
-
- 'a' => array
- (
- 'data-target' => '.<{$v.key}>-menu',
- 'class++' => '<{if(Maze::input("menu") != $v.key && $v.type != 1):?> collapsed<{endif;}>',
- ),
-
- '.project-name' => array
- (
- 'html' => '<{$v.name}>',
- ),
-
- 'i' => array
- (
- 'class' => 'glyphicon glyphicon-folder-close',
- ),
-
- /*
- ul的内容还可以这样写,但是拼写太痛苦
- 'ul' => array
- (
- 'id' => '#collapse-nav-<{$k}>',
- 'html' => '<{foreach($v["child"] as $i => $j){echo \'<li><a href="admin-user.html" class="am-cf"><span class="am-icon-check"></span> \' . $j["lang"] . \' </a></li>\';}}>',
- ),
- */
- 'ul' => array
- (
- 'id' => '<{$v.key}>-menu',
- 'class' => '<{$v.key}>-menu nav nav-list collapse',
- # 此处实际上是个例子,处理多个classname的问题
- 'class--' => ' in', //菜单关闭状态
- # 第一个默认打开
- //'class++' => ' <{Maze::first("am-in", $i)}>',
- //'class++' => ' am-in', //菜单打开状态
- //根据当前url打开
- 'class++' => '<{if(Maze::input("menu") == $v.key || $v.type == 1):?> in<{endif;}>',
-
- 'li' => array
- (
- # 数据处理
- '{data}' => '$v.child',
- 'class--' => 'active', //菜单关闭状态
- 'class++' => '<{if(Maze::input("menu_id") == $vi.id):?>active<{endif;}>',
- 'a' => array
- (
- 'href' => '<{$vi.link}>',
- 'html' => '<span class="glyphicon glyphicon-chevron-right"></span> <{$vi.name}>',
- )
- ),
- ),
- )
- )
- # display
- ->display();
|