ID int64 `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
+ Email string `json:"email"`
AvatarURL string `json:"avatar_url"`
Description string `json:"description"`
Website string `json:"website"`
// required: true
UserName string `json:"username" binding:"Required;Username;MaxSize(40)"`
FullName string `json:"full_name" binding:"MaxSize(100)"`
+ Email string `json:"email" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(255)"`
Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
Location string `json:"location" binding:"MaxSize(50)"`
// EditOrgOption options for editing an organization
type EditOrgOption struct {
FullName string `json:"full_name" binding:"MaxSize(100)"`
+ Email string `json:"email" binding:"MaxSize(255)"`
Description string `json:"description" binding:"MaxSize(255)"`
Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
Location string `json:"location" binding:"MaxSize(50)"`
settings = Settings
settings.options = Organization
settings.full_name = Full Name
+settings.email = Contact Email
settings.website = Website
settings.location = Location
settings.permission = Permissions
org := &organization.Organization{
Name: form.UserName,
FullName: form.FullName,
+ Email: form.Email,
Description: form.Description,
Website: form.Website,
Location: form.Location,
ctx.NotFound("HasOrgOrUserVisible", nil)
return
}
- ctx.JSON(http.StatusOK, convert.ToOrganization(ctx, ctx.Org.Organization))
+
+ org := convert.ToOrganization(ctx, ctx.Org.Organization)
+
+ // Don't show Mail, when User is not logged in
+ if ctx.Doer == nil {
+ org.Email = ""
+ }
+
+ ctx.JSON(http.StatusOK, org)
}
// Edit change an organization's information
form := web.GetForm(ctx).(*api.EditOrgOption)
org := ctx.Org.Organization
org.FullName = form.FullName
+ org.Email = form.Email
org.Description = form.Description
org.Website = form.Website
org.Location = form.Location
}
org.FullName = form.FullName
+ org.Email = form.Email
org.Description = form.Description
org.Website = form.Website
org.Location = form.Location
Name: org.Name,
UserName: org.Name,
FullName: org.FullName,
+ Email: org.Email,
Description: org.Description,
Website: org.Website,
Location: org.Location,
type UpdateOrgSettingForm struct {
Name string `binding:"Required;Username;MaxSize(40)" locale:"org.org_name_holder"`
FullName string `binding:"MaxSize(100)"`
+ Email string `binding:"MaxSize(255)"`
Description string `binding:"MaxSize(255)"`
Website string `binding:"ValidUrl;MaxSize(255)"`
Location string `binding:"MaxSize(50)"`
</div>
{{if $.RenderedDescription}}<div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>{{end}}
<div class="text grey meta">
- {{if .Org.Location}}<div class="item">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
- {{if .Org.Website}}<div class="item">{{svg "octicon-link"}} <a target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
+ {{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
+ {{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
+ {{if $.IsSigned}}
+ {{if .Org.Email}}<div class="flex-text-block">{{svg "octicon-mail"}} <a class="muted" href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></div>{{end}}
+ {{end}}
</div>
</div>
<div class="right menu">
<label for="full_name">{{.locale.Tr "org.org_full_name_holder"}}</label>
<input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100">
</div>
+ <div class="field {{if .Err_Email}}error{{end}}">
+ <label for="email">{{.locale.Tr "org.settings.email"}}</label>
+ <input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255">
+ </div>
<div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{$.locale.Tr "org.org_desc"}}</label>
<textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea>
"type": "string",
"x-go-name": "Description"
},
+ "email": {
+ "type": "string",
+ "x-go-name": "Email"
+ },
"full_name": {
"type": "string",
"x-go-name": "FullName"
"type": "string",
"x-go-name": "Description"
},
+ "email": {
+ "type": "string",
+ "x-go-name": "Email"
+ },
"full_name": {
"type": "string",
"x-go-name": "FullName"
"type": "string",
"x-go-name": "Description"
},
+ "email": {
+ "type": "string",
+ "x-go-name": "Email"
+ },
"full_name": {
"type": "string",
"x-go-name": "FullName"
Name: user17.Name,
UserName: user17.Name,
FullName: user17.FullName,
+ Email: user17.Email,
AvatarURL: user17.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Name: user3.Name,
UserName: user3.Name,
FullName: user3.FullName,
+ Email: user3.Email,
AvatarURL: user3.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Name: user17.Name,
UserName: user17.Name,
FullName: user17.FullName,
+ Email: user17.Email,
AvatarURL: user17.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Name: user3.Name,
UserName: user3.Name,
FullName: user3.FullName,
+ Email: user3.Email,
AvatarURL: user3.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
margin-bottom: 10px;
}
-.organization.profile #org-info .meta .item {
- display: inline-block;
- margin-right: 10px;
-}
-
-.organization.profile #org-info .meta .item .icon {
- margin-right: 5px;
+.organization.profile #org-info .meta {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 8px;
}
.organization.profile .ui.top.header .ui.right {