diff --git a/cmd/web.go b/cmd/web.go index 729a1ba28..bf84d5872 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -194,7 +194,10 @@ func runWeb(*cli.Context) { r.Get("/:org", org.Organization) r.Get("/:org/dashboard", org.Dashboard) r.Get("/:org/members", org.Members) + // organization teams + r.Get("/:org/teams/new",org.NewTeam) r.Get("/:org/teams", org.Teams) + r.Get("/:org/settings", org.Settings) r.Post("/:org/settings", bindIgnErr(auth.OrgSettingForm{}), org.SettingsPost) }, reqSignIn) diff --git a/public/css/gogs.css b/public/css/gogs.css index 960176f58..eb95a1d08 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -375,7 +375,7 @@ html, body { /* gogits repo create */ -#repo-create, #org-create { +#repo-create, #org-create, #org-teams-create { width: 800px; } diff --git a/routers/org/org.go b/routers/org/org.go index 4f57b9a96..c036a8e5d 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -30,10 +30,6 @@ func Members(ctx *middleware.Context, params martini.Params) { 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") -} func New(ctx *middleware.Context) { ctx.Data["Title"] = "Create An Organization" diff --git a/routers/org/teams.go b/routers/org/teams.go new file mode 100644 index 000000000..9585cb272 --- /dev/null +++ b/routers/org/teams.go @@ -0,0 +1,16 @@ +package org + +import ( + "github.com/go-martini/martini" + "github.com/gogits/gogs/modules/middleware" +) + +func Teams(ctx *middleware.Context, params martini.Params) { + ctx.Data["Title"] = "Organization "+params["org"]+" Teams" + ctx.HTML(200, "org/teams") +} + +func NewTeam(ctx *middleware.Context, params martini.Params) { + ctx.Data["Title"] = "Organization "+params["org"]+" New Team" + ctx.HTML(200, "org/new_team") +} diff --git a/templates/org/new_team.tmpl b/templates/org/new_team.tmpl new file mode 100644 index 000000000..752f37d2e --- /dev/null +++ b/templates/org/new_team.tmpl @@ -0,0 +1,74 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+
+
+ + +
+

Organization Name

+
+
+
+
+
+
+
+

Create new team

+
+ +
+ + You'll use this name to mention this team in conversations. +
+
+
+ +
+ +
+
+
+ +
+
+ +

This team will be able to view and clone its repositories.

+
+
+ +

This team will be able to read its repositories, as well as push to them.

+
+
+ +

This team will be able to push/pull to its repositories, as well as add other collaborators to them.

+
+
+
+
+
+ +
+ +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/org/teams.tmpl b/templates/org/teams.tmpl index a8218812c..90aab9440 100644 --- a/templates/org/teams.tmpl +++ b/templates/org/teams.tmpl @@ -21,6 +21,12 @@
+
+
+ +
+
+