mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
new webhooks list UI
This commit is contained in:
parent
1cb03135b7
commit
2881456421
28 changed files with 329 additions and 180 deletions
|
@ -111,8 +111,11 @@ func (u *User) DashboardLink() string {
|
|||
return setting.AppSubUrl + "/"
|
||||
}
|
||||
|
||||
// HomeLink returns the user home page link.
|
||||
// HomeLink returns the user or organization home page link.
|
||||
func (u *User) HomeLink() string {
|
||||
if u.IsOrganization() {
|
||||
return setting.AppSubUrl + "/org/" + u.Name
|
||||
}
|
||||
return setting.AppSubUrl + "/" + u.Name
|
||||
}
|
||||
|
||||
|
@ -162,6 +165,15 @@ func (u *User) AvatarLink() string {
|
|||
return setting.GravatarSource + u.Avatar
|
||||
}
|
||||
|
||||
// DisplayName returns full name if it's not empty,
|
||||
// returns username otherwise.
|
||||
func (u *User) DisplayName() string {
|
||||
if len(u.FullName) > 0 {
|
||||
return u.FullName
|
||||
}
|
||||
return u.Name
|
||||
}
|
||||
|
||||
// NewGitSig generates and returns the signature of given user.
|
||||
func (u *User) NewGitSig() *git.Signature {
|
||||
return &git.Signature{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue