mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-29 09:31:11 -05:00
c2ab19888f
* Add pagination for user setting orgs * Use FindOrgs instead of GetOrgsByUserID * Remove unnecessary functions and fix test * remove unnecessary code
39 lines
1.2 KiB
Handlebars
39 lines
1.2 KiB
Handlebars
{{template "base/head" .}}
|
|
<div class="page-content user settings organization">
|
|
{{template "user/settings/navbar" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<h4 class="ui top attached header">
|
|
{{.i18n.Tr "settings.orgs"}}
|
|
{{if .SignedUser.CanCreateOrganization}}
|
|
<div class="ui right">
|
|
<a class="ui blue tiny button" href="{{AppSubUrl}}/org/create">{{.i18n.Tr "admin.orgs.new_orga"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</h4>
|
|
<div class="ui attached segment orgs">
|
|
{{if .Orgs}}
|
|
<div class="ui middle aligned divided list">
|
|
{{range .Orgs}}
|
|
<div class="item">
|
|
<div class="right floated content">
|
|
<form method="post" action="{{.OrganisationLink}}/members/action/leave">
|
|
{{$.CsrfTokenHtml}}
|
|
<button type="submit" class="ui blue small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button>
|
|
</form>
|
|
</div>
|
|
{{avatar . 28 "mini"}}
|
|
<div class="content">
|
|
<a href="{{.HomeLink}}">{{.Name}}</a>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{template "base/paginate" .}}
|
|
{{else}}
|
|
{{.i18n.Tr "settings.orgs_none"}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|