hide "create repo" option if limit is reached #11873

Open
opened 2025-11-02 09:50:24 -06:00 by GiteaMirror · 13 comments
Owner

Originally created by @6543 on GitHub (Oct 17, 2023).

Originally assigned to: @hrshkshri on GitHub.

we currently show:
image
and
image

but it would be better if this menue option do disapear if the limit is reached

Originally created by @6543 on GitHub (Oct 17, 2023). Originally assigned to: @hrshkshri on GitHub. we currently show: ![image](https://github.com/go-gitea/gitea/assets/24977596/1bcd9545-7037-492b-93cd-79c6c3cd70c9) and ![image](https://github.com/go-gitea/gitea/assets/24977596/fd49b9de-35dc-4909-855c-9da57c5106d8) but it would be better if this menue option do disapear if the limit is reached
GiteaMirror added the topic/ui-interactiontopic/ui labels 2025-11-02 09:50:24 -06:00
Author
Owner

@delvh commented on GitHub (Oct 17, 2023):

Not disappear, disable

@delvh commented on GitHub (Oct 17, 2023): Not disappear, disable
Author
Owner

@JakobDev commented on GitHub (Oct 17, 2023):

I think we need to tell them user somehow why he can't create a repo

@JakobDev commented on GitHub (Oct 17, 2023): I think we need to tell them user somehow why he can't create a repo
Author
Owner

@delvh commented on GitHub (Oct 17, 2023):

That's why I meant disable.
That way, we can display a tooltip

@delvh commented on GitHub (Oct 17, 2023): That's why I meant `disable`. That way, we can display a tooltip
Author
Owner

@lng2020 commented on GitHub (Oct 18, 2023):

typo in the title: reaced -> reached

@lng2020 commented on GitHub (Oct 18, 2023): typo in the title: reaced -> reached
Author
Owner

@Manish-Giri commented on GitHub (Oct 18, 2023):

Hi, can I take this up?

@Manish-Giri commented on GitHub (Oct 18, 2023): Hi, can I take this up?
Author
Owner

@denyskon commented on GitHub (Oct 18, 2023):

@Manish-Giri Hi, sure :)

@denyskon commented on GitHub (Oct 18, 2023): @Manish-Giri Hi, sure :)
Author
Owner

@6543 commented on GitHub (Oct 19, 2023):

if you need help just tell us here or via matrix/discord :)

@6543 commented on GitHub (Oct 19, 2023): if you need help just tell us here or via matrix/discord :)
Author
Owner

@Manish-Giri commented on GitHub (Oct 24, 2023):

@6543 Sorry for the delay, took a while to get caught up with templates in Go!

  1. I've managed to locate and temporarily disable the "New Repository" link as below.
Screenshot 2023-10-23 at 6 07 57 PM

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 -

6352114a77/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?

  1. 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?
Screenshot 2023-10-23 at 7 08 04 PM

If static message is allowed, any preference on the tooltip text? I can add the new text to the locale file then.

Thank you!

@Manish-Giri commented on GitHub (Oct 24, 2023): @6543 Sorry for the delay, took a while to get caught up with templates in Go! 1. I've managed to locate and temporarily disable the "New Repository" link as below. <img width="853" alt="Screenshot 2023-10-23 at 6 07 57 PM" src="https://github.com/go-gitea/gitea/assets/11348778/9b40a641-fd1a-4b00-9216-e0d8255b2b51"> This is currently set to disabled always just to get a screenshot, but to disable it conditionally, the `head_navbar` template [here](https://github.com/go-gitea/gitea/blob/main/templates/base/head_navbar.tmpl) will need access to the `CanCreateRepo` data - similar to how the `repo/create` template [here](https://github.com/go-gitea/gitea/blob/main/templates/repo/create.tmpl) 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? 2. 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? <img width="564" alt="Screenshot 2023-10-23 at 7 08 04 PM" src="https://github.com/go-gitea/gitea/assets/11348778/eee73248-4ffe-4e11-9bec-01ee7b48c1d3"> If static message is allowed, any preference on the tooltip text? I can add the new text to the locale file then. Thank you!
Author
Owner

@Manish-Giri commented on GitHub (Nov 1, 2023):

@denyskon / @6543 Any thoughts?

@Manish-Giri commented on GitHub (Nov 1, 2023): @denyskon / @6543 Any thoughts?
Author
Owner

@hrshkshri commented on GitHub (May 26, 2024):

Hey @delvh
Can i take this up (cc/ @Manish-Giri -- let me if you are looking forward to work on this)

@hrshkshri commented on GitHub (May 26, 2024): Hey @delvh Can i take this up (cc/ @Manish-Giri -- let me if you are looking forward to work on this)
Author
Owner

@delvh commented on GitHub (May 26, 2024):

@hrshkshri sure.

@delvh commented on GitHub (May 26, 2024): @hrshkshri sure.
Author
Owner

@sebluy commented on GitHub (Aug 11, 2024):

I added my fix here https://github.com/go-gitea/gitea/pull/31818. Let me know if it needs any adjustments.

@sebluy commented on GitHub (Aug 11, 2024): I added my fix here https://github.com/go-gitea/gitea/pull/31818. Let me know if it needs any adjustments.
Author
Owner

@wxiaoguang commented on GitHub (Dec 22, 2024):

The problem is more complicated than it looks (not a "good first issue"). There are more logics for "creating repositories in an org"

@wxiaoguang commented on GitHub (Dec 22, 2024): The problem is more complicated than it looks (not a "good first issue"). There are more logics for "creating repositories in an org"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11873