From ecc61ced413a60fcfdc432b921dc2c1b3cab0366 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Fri, 21 Mar 2014 21:06:05 +0800 Subject: [PATCH] update admin nav ui --- public/css/gogs.css | 21 +++++++++++++++++++++ routers/admin/user.go | 2 ++ templates/admin/nav.tmpl | 2 +- templates/base/footer.tmpl | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/public/css/gogs.css b/public/css/gogs.css index b799882352d..aec8f1b328a 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -324,6 +324,27 @@ html, body { color: #444; } +.gogs-admin-nav{ + background-color: #FFF; + padding-top: 10px; + padding-left: 0; + padding-right: 0; + border:1px solid #D8D8D8; +} + +.gogs-admin-nav li{ + margin-bottom: 8px; + border-left: 4px solid transparent; +} + +.gogs-admin-nav li:hover{ + border-left-color: #EEE; +} + +.gogs-admin-nav li.active:hover{ + border-left: 4px solid #DD4B39; +} + /* gogits user ssh keys */ #gogs-ssh-keys .list-group-item { diff --git a/routers/admin/user.go b/routers/admin/user.go index 47eec5c9140..d6f85232186 100644 --- a/routers/admin/user.go +++ b/routers/admin/user.go @@ -18,6 +18,7 @@ import ( func NewUser(ctx *middleware.Context, form auth.RegisterForm) { ctx.Data["Title"] = "New Account" + ctx.Data["PageIsUsers"] = true if ctx.Req.Method == "GET" { ctx.HTML(200, "admin/users/new") @@ -67,6 +68,7 @@ func NewUser(ctx *middleware.Context, form auth.RegisterForm) { func EditUser(ctx *middleware.Context, params martini.Params, form auth.AdminEditUserForm) { ctx.Data["Title"] = "Edit Account" + ctx.Data["PageIsUsers"] = true uid, err := base.StrTo(params["userid"]).Int() if err != nil { diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl index bb704ee3fb4..72f008acc73 100644 --- a/templates/admin/nav.tmpl +++ b/templates/admin/nav.tmpl @@ -1,4 +1,4 @@ -
+
  • Dashboard
  • Users
  • diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index 5ae5c96d688..6c2da63e5da 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -4,7 +4,7 @@