From bf703ef61761fc4b09e3cb95672869520eccbc39 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Sun, 22 Jun 2014 14:10:12 +0800 Subject: add dashboard context switch button --- cmd/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/web.go') diff --git a/cmd/web.go b/cmd/web.go index 2fdfe433..f62bc255 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -96,7 +96,7 @@ func runWeb(*cli.Context) { r.Get("/stars", user.Stars) }, reqSignIn) - m.Group("/api", func(r martini.Router) { + m.Group("/api", func(_ martini.Router) { m.Group("/v1", func(r martini.Router) { // Miscellaneous. r.Post("/markdown", bindIgnErr(apiv1.MarkdownForm{}), v1.Markdown) -- cgit v1.2.3 From 514d7e19227555ecd9e38c642d0b7ea63d7883d2 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Sun, 22 Jun 2014 16:53:46 +0800 Subject: 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(-) (limited to 'cmd/web.go') diff --git a/cmd/web.go b/cmd/web.go index f62bc255..30e5b929 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 67d1ebe5..65ec79eb 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 1c02e773..69bf0fc4 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") +} -- cgit v1.2.3 From adda10f4a44005880f881bcb9238b74d561f8a1b Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Sun, 22 Jun 2014 21:53:40 +0800 Subject: add organization teams page --- cmd/web.go | 1 + public/css/gogs.css | 36 ++++++++++++++++++++++++- routers/org/org.go | 6 +++++ templates/org/members.tmpl | 56 +++++++++++++++++++++++++++++++++++++++ templates/org/teams.tmpl | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 templates/org/members.tmpl create mode 100644 templates/org/teams.tmpl (limited to 'cmd/web.go') diff --git a/cmd/web.go b/cmd/web.go index 30e5b929..b2521de9 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -191,6 +191,7 @@ func runWeb(*cli.Context) { m.Group("/o", func(r martini.Router) { r.Get("/:org", org.Organization) r.Get("/:org/members", org.Members) + r.Get("/:org/teams", org.Teams) }) m.Group("/:username/:reponame", func(r martini.Router) { diff --git a/public/css/gogs.css b/public/css/gogs.css index 65ec79eb..7fdde19c 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1898,6 +1898,10 @@ html, body { margin-top: 6px; } +#body-nav.org-nav-auto .nav a:hover { + text-decoration: none; +} + .org-description { font-size: 16px; } @@ -1978,7 +1982,7 @@ html, body { } #org-members { - margin-right: 24px; + margin-right: 30px; } #org-members .member .avatar img { @@ -2013,4 +2017,34 @@ html, body { #org-members .status, #org-members .role { line-height: 48px; text-align: right; +} + +#org-teams .org-team .panel-heading { + margin-top: 0; +} + +#org-teams .org-team .panel-heading a { + color: #444; +} + +#org-teams .org-team-members { + margin-top: 18px; +} + +#org-teams .org-team-members img { + width: 40px; + height: 40px; + margin-right: 12px; +} + +#org-teams .org-team-members a { + display: inline-block; +} + +#org-teams .org-team .panel-footer { + height: 60px; +} + +#org-teams .org-team { + border-bottom: none; } \ No newline at end of file diff --git a/routers/org/org.go b/routers/org/org.go index 69bf0fc4..21f2a189 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -14,3 +14,9 @@ func Members(ctx *middleware.Context,params martini.Params){ ctx.Data["Title"] = "Organization " + params["org"]+" Members" ctx.HTML(200,"org/members") } + +func Teams(ctx *middleware.Context,params martini.Params){ + ctx.Data["Title"] = "Organization " + params["org"]+" Teams" + ctx.HTML(200,"org/teams") +} + diff --git a/templates/org/members.tmpl b/templates/org/members.tmpl new file mode 100644 index 00000000..ba14cb4c --- /dev/null +++ b/templates/org/members.tmpl @@ -0,0 +1,56 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+
+
+ + +
+

Organization Name

+
+
+ +
+
+
+
+
+
  +
+ +
+ +
+ Member +
+
+ Public +
+
+
  +
+ +
+ +
+ Owner +
+
+ Private +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/org/teams.tmpl b/templates/org/teams.tmpl new file mode 100644 index 00000000..a8218812 --- /dev/null +++ b/templates/org/teams.tmpl @@ -0,0 +1,65 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+
+
+ + +
+

Organization Name

+
+
+
+
+
+
+
+
+
+

Team Name

+
+

4 members · 10 repositories

+

+ + + + + + +

+
+ +
+
+
+
+

Team Name

+
+

4 members · 10 repositories

+

+ + + + + + +

+
+ +
+
+
+
+
+{{template "base/footer" .}} -- cgit v1.2.3