mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 11:18:04 +01:00
Hide "Create Repo" option if limit is reached
This commit is contained in:
parent
df27846628
commit
9d3a2feeba
@ -105,7 +105,16 @@
|
||||
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||
<a
|
||||
{{if not .SignedUser.CanCreateRepo}}
|
||||
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}}"
|
||||
href="/"
|
||||
onclick="event.stopPropagation(); event.preventDefault()"
|
||||
{{else}}
|
||||
class="item" href="{{AppSubUrl}}/repo/create"
|
||||
{{end}}
|
||||
>
|
||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||
</a>
|
||||
{{if not .DisableMigrations}}
|
||||
|
@ -1393,6 +1393,12 @@ table th[data-sortt-desc] .svg {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ui.dropdown .menu > .disabled-with-tooltip.item {
|
||||
cursor: default;
|
||||
opacity: var(--opacity-disabled);
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.ui.dropdown.ellipsis-items-nowrap > .text {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
@ -51,7 +51,7 @@
|
||||
justify-content: stretch;
|
||||
}
|
||||
|
||||
#navbar a.item:hover,
|
||||
#navbar a.item:hover:not(.disabled-with-tooltip),
|
||||
#navbar button.item:hover {
|
||||
background: var(--color-nav-hover-bg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user