aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/dashboard/dashboard.tmpl
diff options
context:
space:
mode:
authorJun Hsieh ♞ <junhsieh@users.noreply.github.com>2017-05-12 00:10:25 -0700
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-05-12 15:10:25 +0800
commit2cf80f4b1884e3d52ed9c7b83818b42e22e1d7ec (patch)
tree241cbed49c13d59dab670cff2a282cf50f0817f6 /templates/user/dashboard/dashboard.tmpl
parent397474ecb19ddd7942df5432387e1221d35573c5 (diff)
downloadgitea-2cf80f4b1884e3d52ed9c7b83818b42e22e1d7ec.tar.gz
gitea-2cf80f4b1884e3d52ed9c7b83818b42e22e1d7ec.zip
Hide the create organization button (in dashboard/organization section) (#1705)
when the user has no such permission.
Diffstat (limited to 'templates/user/dashboard/dashboard.tmpl')
-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 014a37bc2f..cd76a45a56 100644
--- a/templates/user/dashboard/dashboard.tmpl
+++ b/templates/user/dashboard/dashboard.tmpl
@@ -76,10 +76,12 @@
<h4 class="ui top attached header">
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
<div class="ui right">
+ {{if .SignedUser.CanCreateOrganization}}
<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>
+ {{end}}
</div>
</h4>
<div class="ui attached table segment">