From 514d7e19227555ecd9e38c642d0b7ea63d7883d2 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Sun, 22 Jun 2014 16:53:46 +0800 Subject: [PATCH] add organization memebers page --- cmd/web.go | 1 + public/css/gogs.css | 66 +++++++++++++++++++++++++++++++++++++++++++++ routers/org/org.go | 7 ++++- 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/cmd/web.go b/cmd/web.go index f62bc2550..30e5b929a 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -190,6 +190,7 @@ func runWeb(*cli.Context) { m.Group("/o", func(r martini.Router) { r.Get("/:org", org.Organization) + r.Get("/:org/members", org.Members) }) m.Group("/:username/:reponame", func(r martini.Router) { diff --git a/public/css/gogs.css b/public/css/gogs.css index 67d1ebe58..65ec79eb2 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1864,16 +1864,40 @@ html, body { padding: 16px 0; } +#body-nav.org-nav.org-nav-auto { + height: auto; +} + +.org-nav > .container { + padding-left: 0; + padding-left: 0; +} + .org-nav .org-logo { margin-right: 16px; width: 100px; height: 100px; } +.org-nav .org-small-logo { + margin-right: 16px; + width: 50px; + height: 50px; +} + .org-nav .org-name { margin-top: 0; } +.org-nav-auto .org-name { + font-size: 1.4em; + line-height: 48px; +} + +#body-nav.org-nav-auto .nav { + margin-top: 6px; +} + .org-description { font-size: 16px; } @@ -1894,6 +1918,10 @@ html, body { margin-left: 0; } +.org-main { + padding-left: 0; +} + .org-sidebar { margin-top: -100px; } @@ -1947,4 +1975,42 @@ html, body { .org-team a:hover .org-team-name { color: #0079bc !important; +} + +#org-members { + margin-right: 24px; +} + +#org-members .member .avatar img { + width: 50px; + height: 50px; +} + +#org-members .member { + padding-bottom: 20px; + margin-bottom: 20px; + border-bottom: 1px solid #DDD; + height: 70px; +} + +#org-members .member .name { + padding-top: 4px; +} + +#org-members .member .nick { + display: block; + color: #888; +} + +#org-members .member .name a { + color: #444; +} + +#org-members .member .name strong { + font-size: 1.2em; +} + +#org-members .status, #org-members .role { + line-height: 48px; + text-align: right; } \ No newline at end of file diff --git a/routers/org/org.go b/routers/org/org.go index 1c02e7733..69bf0fc48 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -6,6 +6,11 @@ import ( ) func Organization(ctx *middleware.Context, params martini.Params) { - ctx.Data["Title"] = "Organization Name" + params["org"] + ctx.Data["Title"] = "Organization " + params["org"] ctx.HTML(200, "org/org") } + +func Members(ctx *middleware.Context,params martini.Params){ + ctx.Data["Title"] = "Organization " + params["org"]+" Members" + ctx.HTML(200,"org/members") +}