diff --git a/cmd/web.go b/cmd/web.go index b2521de968..9786576d78 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -189,6 +189,7 @@ func runWeb(*cli.Context) { reqOwner := middleware.RequireOwner() m.Group("/o", func(r martini.Router) { + r.Get("/create",org.New) r.Get("/:org", org.Organization) r.Get("/:org/members", org.Members) r.Get("/:org/teams", org.Teams) diff --git a/public/css/gogs.css b/public/css/gogs.css index 7fdde19ccc..bb341a8a35 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -372,7 +372,7 @@ html, body { /* gogits repo create */ -#repo-create { +#repo-create, #org-create { width: 800px; } diff --git a/routers/org/org.go b/routers/org/org.go index 21f2a189cf..4d9b831deb 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -6,17 +6,21 @@ import ( ) func Organization(ctx *middleware.Context, params martini.Params) { - ctx.Data["Title"] = "Organization " + 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") +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") +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" + ctx.HTML(200, "org/new") +} diff --git a/templates/org/new.tmpl b/templates/org/new.tmpl new file mode 100644 index 0000000000..baa9c9dfa0 --- /dev/null +++ b/templates/org/new.tmpl @@ -0,0 +1,48 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +