Browse Source

templates: hide dashboard org creation when not allowed (#5393)

The admin -> DISABLE_REGULAR_ORG_CREATION setting
hides organization creation in the header, but not
in the dashboard.
pull/5340/merge
Jakob Lykke Andersen 6 years ago committed by 无闻
parent
commit
798798f7ab
  1. 2
      templates/user/dashboard/dashboard.tmpl

2
templates/user/dashboard/dashboard.tmpl

@ -76,12 +76,14 @@
<div class="ui tab list" data-tab="orgs"> <div class="ui tab list" data-tab="orgs">
<div class="ui top attached header"> <div class="ui top attached header">
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span> {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
{{if .LoggedUser.CanCreateOrganization}}
<div class="ui right"> <div class="ui right">
<a class="poping up" href="{{AppSubURL}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center"> <a class="poping up" href="{{AppSubURL}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
<i class="plus icon"></i> <i class="plus icon"></i>
<span class="sr-only">{{.i18n.Tr "new_org"}}</span> <span class="sr-only">{{.i18n.Tr "new_org"}}</span>
</a> </a>
</div> </div>
{{end}}
</div> </div>
<div class="ui attached table segment"> <div class="ui attached table segment">
<ul class="repo-owner-name-list"> <ul class="repo-owner-name-list">

Loading…
Cancel
Save