Skip to content

Commit

Permalink
Create repository on organisation by default on its dashboard (go-git…
Browse files Browse the repository at this point in the history
…ea#6026)

* Create repository on organisation by default on its dashboard
* Only show owners the add new repositories to an organisation button.

Fix go-gitea#3253

Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed Feb 12, 2019
1 parent 7f7c451 commit d9db8b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/user/dashboard/dashboard.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}">
Expand Down

0 comments on commit d9db8b1

Please sign in to comment.