diff options
author | zeripath <art27@cantab.net> | 2019-02-10 13:30:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-10 13:30:25 +0000 |
commit | c0adb5ea8bd0b2551a8c414b54ef5bc67882de55 (patch) | |
tree | e6ac234d29cbf8d38296251c025d5ce4cac51bb0 | |
parent | 820e28c9044bbd9d398dd1617323665bb0935e13 (diff) | |
download | gitea-c0adb5ea8bd0b2551a8c414b54ef5bc67882de55.tar.gz gitea-c0adb5ea8bd0b2551a8c414b54ef5bc67882de55.zip |
Create repository on organisation by default on its dashboard (#6026)
* Create repository on organisation by default on its dashboard
* Only show owners the add new repositories to an organisation button.
Fix #3253
Signed-off-by: Andrew Thornton <art27@cantab.net>
-rw-r--r-- | templates/user/dashboard/dashboard.tmpl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index d6237b31f2..27a0a76bc4 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -44,12 +44,14 @@ <div v-show="tab === 'repos'" class="ui tab active list dashboard-repos"> <h4 class="ui top attached header"> {{.i18n.Tr "home.my_repos"}} <span class="ui grey label">${reposTotalCount}</span> + {{if or (not .ContextUser.IsOrganization) .IsOrganizationOwner}} <div class="ui right"> - <a class="poping up" :href="suburl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center"> + <a class="poping up" :href="suburl + '/repo/create{{if .ContextUser.IsOrganization}}?org={{.ContextUser.ID}}{{end}}'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center"> <i class="plus icon"></i> <span class="sr-only">{{.i18n.Tr "new_repo"}}</span> </a> </div> + {{end}} </h4> <div class="ui attached secondary segment repos-search"> <div class="ui fluid icon input" :class="{loading: isLoading}"> |