forgejo/templates/repo
Ryan Lerch a0f902f635 fix(ui): make limits clearer in create repo form (#7402)
Resolves: #7341

Previously, the Create Repository button was only enabled if a user was able to create a repo in their own namespace. However, if they had reached the global repo limit, but were stlll able to create a repo in an org, the button would still be disabled.

In this pull request, the create repo form now:

1. Behaves like it always did previously if the user has not reached the repo limit.

2. If the User has reached the repo limit, and they are unable to create a repo in any of their orgs (or they have no orgs), the create repo form is displayed as:
![Screenshot](/attachments/9f22f43d-0036-4c48-b794-54302c0f241c)

3. If the User has reached the repo limit, and the **limit is greater than zero**, an alert appears at the top of the form, and they are only allowed to choose from the orgs that they are allowed to create repos in:
![Screenshot](/attachments/f5508e05-74fd-4858-9e95-967bd7017abd)

4. If the User has reached the repo limit, and the **limit is equal to zero**, no alert is displayed, as no user can create repos on that instance, and they are only allowed to choose from the orgs that they are allowed to create repos in:
![localhost_3000_repo_create (4).png](/attachments/e7a87da8-c19c-47e1-845e-2afc3667ab02)

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7402
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Ryan Lerch <rlerch@redhat.com>
Co-committed-by: Ryan Lerch <rlerch@redhat.com>
2025-05-20 16:37:15 +02:00
..
actions feat(ui): Automatically refresh workflows in the "Actions" list (#7361) 2025-04-04 14:38:54 +00:00
branch fix: Remove "create branch" button on mirrored repos (#7640) 2025-05-14 23:26:12 +00:00
cite
code fix(ui): multiple fixes of sync fork UI (#7740) 2025-05-02 14:25:05 +00:00
diff ui: improve branch/tag dropdown selector consistency (#7187) 2025-03-13 18:11:01 +00:00
editor
find
graph Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
issue feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
migrate feat(ui): redesign migration selection screen (#6795) 2025-04-19 13:51:35 +00:00
projects
pulls
release
settings fix(i18n): fix several usages of i18n (#7422) 2025-04-02 14:50:02 +00:00
tag
wiki Fix two missed null value checks on the wiki page. (#34205) 2025-04-22 10:04:41 +02:00
activity.tmpl
admin_flags.tmpl
blame.tmpl
branch_dropdown.tmpl fix(ui): show commit icon in branch dropdown button when viewing a commit (#7571) 2025-04-19 04:33:07 +00:00
clone_buttons.tmpl
clone_script.tmpl
code_frequency.tmpl
commit_load_branches_and_tags.tmpl
commit_page.tmpl
commit_status.tmpl
commit_statuses.tmpl
commits.tmpl
commits_list.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
commits_list_small.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
commits_search_dropdown.tmpl
commits_table.tmpl
contributors.tmpl
create.tmpl fix(ui): make limits clearer in create repo form (#7402) 2025-05-20 16:37:15 +02:00
create_advanced.tmpl
create_basic.tmpl fix(ui): make limits clearer in create repo form (#7402) 2025-05-20 16:37:15 +02:00
create_from_template.tmpl
create_helper.tmpl
create_init.tmpl
empty.tmpl fix(ui): clarify repo init instruction for sha256 (#7394) 2025-03-30 18:08:05 +00:00
file_info.tmpl
flags.tmpl
forks.tmpl
graph.tmpl fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
header.tmpl feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
header_fork.tmpl
home.tmpl feat(ui): make fork related banners more consistent (#7577) 2025-04-23 16:48:26 +00:00
icon.tmpl
latest_commit.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
navbar.tmpl Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053) 2025-04-01 02:28:02 +02:00
packages.tmpl
pulse.tmpl chore(ui): cleanup unused color CSS (#7898) 2025-05-19 14:04:28 +02:00
recent_commits.tmpl
release_tag_header.tmpl
search.tmpl
search_name.tmpl
shabox.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
shabox_badge.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
star_unstar.tmpl
sub_menu.tmpl
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl
view_file.tmpl
view_list.tmpl
watch_unwatch.tmpl
watchers.tmpl