2015-08-28 16:44:04 +08:00
|
|
|
{{template "base/head" .}}
|
2023-02-01 19:56:10 -03:00
|
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository new repo">
|
2021-09-12 21:24:57 +03:00
|
|
|
<div class="ui middle very relaxed page one column grid">
|
2015-12-07 23:30:52 +01:00
|
|
|
<div class="column">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<h3 class="ui top attached header">
|
2024-08-07 16:54:05 +00:00
|
|
|
{{ctx.Locale.Tr "new_repo.title"}}
|
2015-12-07 23:30:52 +01:00
|
|
|
</h3>
|
|
|
|
<div class="ui attached segment">
|
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:

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:

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:

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
|
|
|
{{if or .CanCreateRepo .Orgs}}
|
|
|
|
{{template "base/alert" .}}
|
|
|
|
{{template "repo/create_helper" .}}
|
2021-02-21 16:59:31 +07:00
|
|
|
|
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:

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:

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:

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
|
|
|
{{if and (not .CanCreateRepo) (ne .MaxCreationLimit 0)}}
|
|
|
|
<div class="ui negative message">
|
|
|
|
<p>{{ctx.Locale.TrN .MaxCreationLimit "repo.form.reach_limit_of_creation_1" "repo.form.reach_limit_of_creation_n" .MaxCreationLimit}}</p>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2024-12-27 16:11:45 +01:00
|
|
|
<fieldset>
|
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:

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:

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:

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
|
|
|
{{template "repo/create_basic" .}}
|
2024-12-27 16:11:45 +01:00
|
|
|
</fieldset>
|
|
|
|
|
2024-12-27 14:21:46 +01:00
|
|
|
<fieldset>
|
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:

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:

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:

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
|
|
|
<legend>
|
|
|
|
{{ctx.Locale.Tr "repo.new_from_template"}}
|
|
|
|
<span class="help">{{ctx.Locale.Tr "repo.new_from_template_description"}}</span>
|
|
|
|
</legend>
|
|
|
|
{{template "repo/create_from_template" .}}
|
2024-12-27 14:21:46 +01:00
|
|
|
</fieldset>
|
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:

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:

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:

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
|
|
|
|
|
|
|
<div id="non_template">
|
|
|
|
<fieldset>
|
|
|
|
<legend>{{ctx.Locale.Tr "repo.auto_init"}}</legend>
|
|
|
|
{{template "repo/create_init" .}}
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<legend>{{ctx.Locale.Tr "repo.new_advanced"}}</legend>
|
|
|
|
<details><summary>{{ctx.Locale.Tr "repo.new_advanced_expand"}}</summary>
|
|
|
|
{{template "repo/create_advanced" .}}
|
|
|
|
</details>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
<button class="ui primary button">
|
|
|
|
{{ctx.Locale.Tr "repo.create_repo"}}
|
|
|
|
</button>
|
|
|
|
{{else}}
|
|
|
|
<div class="ui negative message">
|
|
|
|
{{ctx.Locale.Tr "repo.form.cannot_create"}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-12-07 23:30:52 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-02-19 21:45:43 -05:00
|
|
|
</div>
|
2015-12-07 23:30:52 +01:00
|
|
|
{{template "base/footer" .}}
|