mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 15:25:43 +03:00
minor fix on template
This commit is contained in:
parent
3d9b98fae4
commit
cc83043edc
4 changed files with 2 additions and 6 deletions
|
@ -17,7 +17,7 @@ import (
|
||||||
// \/ /_____/ \/ \/ \/ \/ \/
|
// \/ /_____/ \/ \/ \/ \/ \/
|
||||||
|
|
||||||
type CreateOrgForm struct {
|
type CreateOrgForm struct {
|
||||||
OrgName string `binding:"Required;AlphaDashDot;MaxSize(30)"`
|
OrgName string `binding:"Required;AlphaDashDot;MaxSize(30)" locale:"org.org_name_holder"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||||
|
|
|
@ -30,7 +30,7 @@ const (
|
||||||
func checkContextUser(ctx *middleware.Context, uid int64) *models.User {
|
func checkContextUser(ctx *middleware.Context, uid int64) *models.User {
|
||||||
orgs, err := models.GetOwnedOrgsByUserIDDesc(ctx.User.Id, "updated")
|
orgs, err := models.GetOwnedOrgsByUserIDDesc(ctx.User.Id, "updated")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "GetOwnedOrganizationsByUserIDDesc", err)
|
ctx.Handle(500, "GetOwnedOrgsByUserIDDesc", err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
ctx.Data["Orgs"] = orgs
|
ctx.Data["Orgs"] = orgs
|
||||||
|
|
|
@ -24,13 +24,11 @@
|
||||||
{{.SignedUser.Name}}
|
{{.SignedUser.Name}}
|
||||||
</div>
|
</div>
|
||||||
{{range .Orgs}}
|
{{range .Orgs}}
|
||||||
{{if .IsOwnedBy $.SignedUser.Id}}
|
|
||||||
<div class="item" data-value="{{.Id}}">
|
<div class="item" data-value="{{.Id}}">
|
||||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||||
{{.Name}}
|
{{.Name}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,13 +49,11 @@
|
||||||
{{.SignedUser.Name}}
|
{{.SignedUser.Name}}
|
||||||
</div>
|
</div>
|
||||||
{{range .Orgs}}
|
{{range .Orgs}}
|
||||||
{{if .IsOwnedBy $.SignedUser.Id}}
|
|
||||||
<div class="item" data-value="{{.Id}}">
|
<div class="item" data-value="{{.Id}}">
|
||||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||||
{{.Name}}
|
{{.Name}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue