mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Remove unnecessary attributes of User struct (#17745)
* Remove unnecessary functions of User struct * Move more database methods out of user struct * Move more database methods out of user struct * Fix template failure * Fix bug * Remove finished FIXME * remove unnecessary code
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
{{end}}
|
||||
]"
|
||||
:is-organization="false"
|
||||
:organizations-total-count="{{.ContextUser.GetOrganizationCount}}"
|
||||
:organizations-total-count="{{.UserOrgsCount}}"
|
||||
:can-create-organization="{{.SignedUser.CanCreateOrganization}}"
|
||||
{{end}}
|
||||
inline-template
|
||||
|
@@ -65,7 +65,7 @@
|
||||
{{end}}
|
||||
{{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
|
||||
<li class="follow">
|
||||
{{if .SignedUser.IsFollowing .Owner.ID}}
|
||||
{{if $.IsFollowing}}
|
||||
<form method="post" action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.i18n.Tr "user.unfollow"}}</button>
|
||||
|
Reference in New Issue
Block a user