aboutsummaryrefslogtreecommitdiff
path: root/templates/user
diff options
context:
space:
mode:
authorJakob Lykke Andersen <jakobandersen@users.noreply.github.com>2018-09-11 20:10:09 +0200
committer无闻 <u@gogs.io>2018-09-11 14:10:09 -0400
commit798798f7ab00ae3e43b40253cf7ea388662b539d (patch)
tree13d587dcc486585ecfa4cde18ddc5a779ca52ce5 /templates/user
parent54e9442a14af0064ed75d5a4728eebc411e489c1 (diff)
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.
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/dashboard/dashboard.tmpl2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl
index 4a0c90a2..a366a531 100644
--- a/templates/user/dashboard/dashboard.tmpl
+++ b/templates/user/dashboard/dashboard.tmpl
@@ -76,12 +76,14 @@
<div class="ui tab list" data-tab="orgs">
<div class="ui top attached header">
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
+ {{if .LoggedUser.CanCreateOrganization}}
<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">
<i class="plus icon"></i>
<span class="sr-only">{{.i18n.Tr "new_org"}}</span>
</a>
</div>
+ {{end}}
</div>
<div class="ui attached table segment">
<ul class="repo-owner-name-list">