hide "create repo" option if limit is reached
we currently show:
and
but it would be better if this menue option do disapear if the limit is reached
Not disappear, disable
I think we need to tell them user somehow why he can't create a repo
That's why I meant disable.
That way, we can display a tooltip
typo in the title: reaced -> reached
Hi, can I take this up?
@Manish-Giri Hi, sure :)
if you need help just tell us here or via matrix/discord :)
@6543 Sorry for the delay, took a while to get caught up with templates in Go!
- I've managed to locate and temporarily disable the "New Repository" link as below.
This is currently set to disabled always just to get a screenshot, but to disable it conditionally, the head_navbar template here will need access to the CanCreateRepo data - similar to how the repo/create template here is assigned that info -
https://github.com/go-gitea/gitea/blob/6352114a77cb67e8797f2c8552328f684092c42d/routers/web/repo/repo.go#L179
Any suggestions on where the head_navbar template is normally assigned all its data, so I can look to pass the CanCreateRepo info too?
- Does a tooltip also need to be added with a short message on why it's disabled? If so, will a static message like this be sufficient?
If static message is allowed, any preference on the tooltip text? I can add the new text to the locale file then.
Thank you!
@denyskon / @6543 Any thoughts?
Hey @delvh Can i take this up (cc/ @Manish-Giri -- let me if you are looking forward to work on this)
@hrshkshri sure.
I added my fix here https://github.com/go-gitea/gitea/pull/31818. Let me know if it needs any adjustments.
The problem is more complicated than it looks (not a "good first issue"). There are more logics for "creating repositories in an org"