[后台-前端]修改后台右上角用户区域,增加退出,我的提交等链接[CI SKIP]

This commit is contained in:
esp 2015-09-01 15:37:19 +08:00
parent fe7d429dba
commit 83d63d7721
2 changed files with 7 additions and 5 deletions

View File

@ -72,6 +72,7 @@ define("admin", ["jquery", "avalon"], function ($, avalon) {
var vm = avalon.define({
$id: "admin",
template_url: "template/" + hash + ".html",
username: "",
groupId: -1,
problemId: -1,
adminNavList: [],
@ -93,6 +94,7 @@ define("admin", ["jquery", "avalon"], function ($, avalon) {
dataType: "json",
success: function(data){
if(!data.code){
vm.username = data.data.username;
if (data.data.admin_type == 2){
vm.adminNavList = superAdminNav;
}

View File

@ -15,7 +15,7 @@
</head>
<body>
<body ms-controller="admin">
<!-- nav begin -->
<nav class="navbar navbar-masthead navbar-default navbar-static-top">
@ -39,13 +39,13 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
李扬
{{ username }}
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">我的提交</a></li>
<li><a href="/submissions/">我的提交</a></li>
<li><a href="#">我的资料</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">退出</a></li>
<li><a href="/logout/">退出</a></li>
</ul>
</li>
</ul>
@ -62,7 +62,7 @@
<![endif]-->
<!-- browser happy end -->
<div class="container main" ms-controller="admin">
<div class="container main">
<div class="row">
<!-- admin left begin-->
<div class="col-md-2">