mirror of https://github.com/go-gitea/gitea.git
Hide "Create Repo" option if limit is reached
This commit is contained in:
parent
8369e10b8f
commit
300dfae3e5
|
@ -105,18 +105,20 @@
|
||||||
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
{{if .SignedUser.CanCreateRepo}}
|
||||||
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
<a
|
<a
|
||||||
{{if not .SignedUser.CanCreateRepo}}
|
|
||||||
class="disabled-with-tooltip item"
|
class="disabled-with-tooltip item"
|
||||||
data-tooltip-content="{{ctx.Locale.TrN .SignedUser.MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .SignedUser.MaxCreationLimit}}"
|
data-tooltip-content="{{ctx.Locale.TrN .SignedUser.MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .SignedUser.MaxCreationLimit}}"
|
||||||
href="/"
|
href="/"
|
||||||
onclick="event.stopPropagation(); event.preventDefault()"
|
onclick="event.stopPropagation(); event.preventDefault()"
|
||||||
{{else}}
|
|
||||||
class="item" href="{{AppSubUrl}}/repo/create"
|
|
||||||
{{end}}
|
|
||||||
>
|
>
|
||||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
{{if not .DisableMigrations}}
|
{{if not .DisableMigrations}}
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
||||||
|
|
Loading…
Reference in New Issue