Skip to content

Commit c0adb5e

Browse files
authored
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 <[email protected]>
1 parent 820e28c commit c0adb5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/user/dashboard/dashboard.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@
4444
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos">
4545
<h4 class="ui top attached header">
4646
{{.i18n.Tr "home.my_repos"}} <span class="ui grey label">${reposTotalCount}</span>
47+
{{if or (not .ContextUser.IsOrganization) .IsOrganizationOwner}}
4748
<div class="ui right">
48-
<a class="poping up" :href="suburl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
49+
<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">
4950
<i class="plus icon"></i>
5051
<span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
5152
</a>
5253
</div>
54+
{{end}}
5355
</h4>
5456
<div class="ui attached secondary segment repos-search">
5557
<div class="ui fluid icon input" :class="{loading: isLoading}">

0 commit comments

Comments
 (0)