diff --git a/cmd/web.go b/cmd/web.go index b2521de96..9786576d7 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 7fdde19cc..bb341a8a3 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 21f2a189c..4d9b831de 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 000000000..baa9c9dfa --- /dev/null +++ b/templates/org/new.tmpl @@ -0,0 +1,48 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+
+ {{.CsrfTokenHtml}} +

Create New Organization

+ {{template "base/alert" .}} +
+ +
+

{{.SignedUserName}}

+ +
+
+ +
+ +
+ + Great organization names are short and memorable. +
+
+ +
+ +
+ + Organization's Email receives all notifications and confirmations. +
+
+ + + +
+
+ + Cancel +
+
+
+
+{{template "base/footer" .}} \ No newline at end of file