123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?php
- # 项目列表中的管理选项:
- # 数据库基本配置与数据管理、模板列表与生成、项目基本配置与管理等
- # 这里面很多都是demo
- $view
- # 项目管理的链接
- /*
- ->fetch('#project-url@href', function()
- {
- return Dever::load('manage/menu.link#project');//这里可以改写成Dever::object('manage/menu.link')->project
- })
- # 日志的链接
- ->fetch('#log-url@href', function()
- {
- return Dever::load('manage/menu.link#log');
- })
- */
- ->fetch('#manage-name', 'manage/auth.info#username', 'none')
- ->fetch('#manage-group', 'manage/auth.info#rolename', 'none')
- ->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('.banner', 'manage/database.banner', 'none')
- ->fetch('.topbar', 'manage/auth.test', array
- (
- 'style' => array('height:70px;border-top:1px solid #eeeeee;', 'display:none;'),
- 'test' => '<{$v.name}>',
- 'span|$v.data' => '<{$v1.name}>',
- ))
- */
- /*
- ->render('manage/auth.test', array
- (
- '.topbar@style' => array('height:70px;border-top:1px solid #eeeeee;', 'none'),
- '#menu@test' => '<{$v.name}>',
- '.topbar span|$v.check' => array('test', 'none'),
- '.topbar span' => array
- (
- 'self|$v.data' => '<{$v1.name}>',
- )
- ))
- */
- # 项目列表
- ->loop
- (
- '.project-list',
- 'manage/menu.left',
- array
- (
- 'a' => array
- (
- 'data-target' => '.<{$v.key}>-menu',
- 'class++' => '<{if(Dever::input("menu") != $v.key && $v.type != 1):?> collapsed<{endif;}> <{if(Dever::input("menu") == $v.key):?> active<{endif;}>',
- ),
-
- '.project-name' => array
- (
- 'html' => '<{$v.name}>',
- ),
-
- 'i' => array
- (
- 'class' => '<{$v.icon ? $v.icon : "glyphicon glyphicon-folder-close"}>',
- ),
- 'ul' => array
- (
- 'id' => '<{$v.key}>-menu',
- //'class' => '<{$v.key}>-menu',
- # 此处实际上是个例子,处理多个classname的问题
- 'class--' => ' in', //菜单关闭状态
- # 第一个默认打开
- //'class++' => ' <{Dever::first("am-in", $i)}>',
- //'class++' => ' am-in', //菜单打开状态
- //根据当前url打开
- 'class++' => ' <{$v.key}>-menu <{if(Dever::input("menu") == $v.key || $v.type == 1):?> ins<{endif;}>',
-
- 'li|$v.child' => array
- (
- 'class--' => 'active', //菜单关闭状态
- 'class++' => '<{if(Dever::input("menu_id") == $v1.id):?>active<{endif;}>',
- 'a' => array
- (
- 'href' => '<{$v1.link}>',
- 'class' => '<{if(Dever::input("menu_id") == $v1.id):?>subdrop<{endif;}>',
- 'html' => '<span class="glyphicon glyphicon-chevron-right"></span> <{$v1.name}>',
- )
- ),
- ),
- )
- )
- //->fetch('#menu@style', '<{Dever::load("manage/auth.loading") ? "display:none;" : (Dever::load("manage/database.banner") ? "top:120px;" : "")}>')
- # display
- ->display();
|