mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 21:07:52 +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 class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<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"}}
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
</a>
|
</a>
|
||||||
{{if not .DisableMigrations}}
|
{{if not .DisableMigrations}}
|
||||||
|
@ -1393,6 +1393,12 @@ table th[data-sortt-desc] .svg {
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui.dropdown .menu > .disabled-with-tooltip.item {
|
||||||
|
cursor: default;
|
||||||
|
opacity: var(--opacity-disabled);
|
||||||
|
background: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.ui.dropdown.ellipsis-items-nowrap > .text {
|
.ui.dropdown.ellipsis-items-nowrap > .text {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
justify-content: stretch;
|
justify-content: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar a.item:hover,
|
#navbar a.item:hover:not(.disabled-with-tooltip),
|
||||||
#navbar button.item:hover {
|
#navbar button.item:hover {
|
||||||
background: var(--color-nav-hover-bg);
|
background: var(--color-nav-hover-bg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user