diff --git a/README.md b/README.md index 85ec290e0a..80d6c2a33a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current version: 0.7.43 Beta +##### Current version: 0.7.44 Beta | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/cmd/web.go b/cmd/web.go index ec8ccd5191..13d7660c76 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -258,10 +258,8 @@ func runWeb(ctx *cli.Context) { m.Group("/users", func() { m.Get("", admin.Users) - m.Get("/new", admin.NewUser) - m.Post("/new", bindIgnErr(auth.AdminCrateUserForm{}), admin.NewUserPost) - m.Get("/:userid", admin.EditUser) - m.Post("/:userid", bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost) + m.Combo("/new").Get(admin.NewUser).Post(bindIgnErr(auth.AdminCrateUserForm{}), admin.NewUserPost) + m.Combo("/:userid").Get(admin.EditUser).Post(bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost) m.Post("/:userid/delete", admin.DeleteUser) }) @@ -276,8 +274,7 @@ func runWeb(ctx *cli.Context) { m.Group("/auths", func() { m.Get("", admin.Authentications) - m.Get("/new", admin.NewAuthSource) - m.Post("/new", bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost) + m.Combo("/new").Get(admin.NewAuthSource).Post(bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost) m.Combo("/:authid").Get(admin.EditAuthSource). Post(bindIgnErr(auth.AuthenticationForm{}), admin.EditAuthSourcePost) m.Post("/:authid/delete", admin.DeleteAuthSource) diff --git a/gogs.go b/gogs.go index d00b2991ef..d4bbefd4e6 100644 --- a/gogs.go +++ b/gogs.go @@ -18,7 +18,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.7.43.1211 Beta" +const APP_VER = "0.7.44.1211 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/auth/org.go b/modules/auth/org.go index 084ad43a8a..8af4ad55d8 100644 --- a/modules/auth/org.go +++ b/modules/auth/org.go @@ -25,11 +25,12 @@ func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) bind } type UpdateOrgSettingForm struct { - Name string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"` - FullName string `binding:"MaxSize(100)"` - Description string `binding:"MaxSize(255)"` - Website string `binding:"Url;MaxSize(100)"` - Location string `binding:"MaxSize(50)"` + Name string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"` + FullName string `binding:"MaxSize(100)"` + Description string `binding:"MaxSize(255)"` + Website string `binding:"Url;MaxSize(100)"` + Location string `binding:"MaxSize(50)"` + MaxRepoCreation int } func (f *UpdateOrgSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { diff --git a/modules/bindata/bindata.go b/modules/bindata/bindata.go index 6013e7dd19..c4ce602aa8 100644 --- a/modules/bindata/bindata.go +++ b/modules/bindata/bindata.go @@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 48293, mode: os.FileMode(420), modTime: time.Unix(1449865728, 0)} + info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 48293, mode: os.FileMode(420), modTime: time.Unix(1449879514, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/public/css/gogs.css b/public/css/gogs.css index 92d10ac734..2ff08242c8 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -2773,7 +2773,6 @@ footer .container .links > *:first-child { width: 50%!important; } .organization.options input { - width: 50%!important; min-width: 300px; } .organization.profile #org-avatar { diff --git a/public/less/_organization.less b/public/less/_organization.less index 4ad3b1dad0..664c464274 100644 --- a/public/less/_organization.less +++ b/public/less/_organization.less @@ -21,7 +21,6 @@ &.options { input { - width: 50%!important; min-width: 300px; } } diff --git a/routers/org/setting.go b/routers/org/setting.go index d82891747a..30f8cabe3e 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -66,6 +66,10 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateOrgSettingForm) { org.Name = form.Name org.LowerName = strings.ToLower(form.Name) + if ctx.User.IsAdmin { + org.MaxRepoCreation = form.MaxRepoCreation + } + org.FullName = form.FullName org.Description = form.Description org.Website = form.Website diff --git a/templates/.VERSION b/templates/.VERSION index 12ab796a51..4aa4da533b 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.7.43.1211 Beta \ No newline at end of file +0.7.44.1211 Beta \ No newline at end of file diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index ad4dd4c25a..3280a6d707 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -92,6 +92,8 @@ +
+{{.i18n.Tr "admin.users.max_repo_creation_desc"}}
+