2015-08-29 19:21:59 +00:00
|
|
|
{{template "base/head" .}}
|
2020-12-01 04:00:14 +00:00
|
|
|
<div class="page-content repository settings options">
|
2015-08-29 19:21:59 +00:00
|
|
|
{{template "repo/header" .}}
|
2017-03-15 22:39:38 +00:00
|
|
|
{{template "repo/settings/navbar" .}}
|
2015-08-29 19:21:59 +00:00
|
|
|
<div class="ui container">
|
2017-03-15 22:39:38 +00:00
|
|
|
{{template "base/alert" .}}
|
|
|
|
<h4 class="ui top attached header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.basic_settings"}}
|
2017-03-15 22:39:38 +00:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
2021-10-18 22:08:41 +00:00
|
|
|
{{template "base/disable_form_autofill"}}
|
2017-03-15 22:39:38 +00:00
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="update">
|
|
|
|
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
2017-03-15 22:39:38 +00:00
|
|
|
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
|
|
|
|
</div>
|
2019-11-13 00:45:19 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.repo_size"}}</label>
|
2021-12-03 03:33:34 +00:00
|
|
|
<span>{{FileSize .Repository.Size}}</span>
|
2019-11-13 00:45:19 +00:00
|
|
|
</div>
|
2019-11-11 15:15:29 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.template"}}</label>
|
2019-11-11 15:15:29 +00:00
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="template" type="checkbox" {{if .Repository.IsTemplate}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.template_helper"}}</label>
|
2019-11-11 15:15:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
{{if not .Repository.IsFork}}
|
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.visibility"}}</label>
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui checkbox">
|
2019-04-11 08:32:42 +00:00
|
|
|
{{if .IsAdmin}}
|
|
|
|
<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
|
|
|
|
{{else}}
|
2019-02-22 21:56:05 +00:00
|
|
|
<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}{{if and $.ForcePrivate .Repository.IsPrivate}} readonly{{end}}>
|
2019-04-11 08:32:42 +00:00
|
|
|
{{end}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.visibility_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.locale.Tr "repo.visibility_fork_helper"}}</span>{{end}}</label>
|
2017-02-21 15:02:10 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<div class="field {{if .Err_Description}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="description">{{$.locale.Tr "repo.repo_desc"}}</label>
|
2022-09-16 07:19:16 +00:00
|
|
|
<textarea id="description" name="description" rows="2" maxlength="2048">{{.Repository.Description}}</textarea>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
<div class="field {{if .Err_Website}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="website">{{.locale.Tr "repo.settings.site"}}</label>
|
2022-09-16 07:19:16 +00:00
|
|
|
<input id="website" name="website" type="url" maxlength="1024" value="{{.Repository.Website}}">
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2016-08-30 23:18:33 +00:00
|
|
|
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
|
2016-08-30 23:18:33 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</form>
|
2019-05-30 02:22:26 +00:00
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
|
2019-05-30 02:22:26 +00:00
|
|
|
<input name="avatar" type="file" >
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
|
|
|
|
<a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</a>
|
2019-05-30 02:22:26 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2016-08-30 23:18:33 +00:00
|
|
|
|
2021-09-07 15:49:36 +00:00
|
|
|
{{if .MirrorsEnabled}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<h4 class="ui top attached header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.mirror_settings"}}
|
2017-03-15 22:39:38 +00:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{$.locale.Tr "repo.settings.mirror_settings.docs" | Safe}}
|
2021-06-14 17:20:43 +00:00
|
|
|
<table class="ui table">
|
2021-12-10 01:27:50 +00:00
|
|
|
{{if or .Repository.IsMirror .PushMirrors}}
|
2021-06-14 17:20:43 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-06-27 20:58:46 +00:00
|
|
|
<th style="width:40%">{{$.locale.Tr "repo.settings.mirror_settings.mirrored_repository"}}</th>
|
|
|
|
<th>{{$.locale.Tr "repo.settings.mirror_settings.direction"}}</th>
|
|
|
|
<th>{{$.locale.Tr "repo.settings.mirror_settings.last_update"}}</th>
|
2021-06-14 17:20:43 +00:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2021-04-08 22:25:57 +00:00
|
|
|
{{end}}
|
2021-06-14 17:20:43 +00:00
|
|
|
{{if .Repository.IsMirror}}
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
2022-08-15 03:12:01 +00:00
|
|
|
<td>{{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}</td>
|
2022-06-27 20:58:46 +00:00
|
|
|
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
|
2022-10-17 04:08:21 +00:00
|
|
|
<td><time data-format="date-time" datetime="{{.Mirror.UpdatedUnix.FormatLong}}">{{.Mirror.UpdatedUnix.AsTime}}</time></td>
|
2021-06-14 17:20:43 +00:00
|
|
|
<td class="right aligned">
|
|
|
|
<form method="post" style="display: inline-block">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="mirror-sync">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui primary tiny button inline text-thin">{{$.locale.Tr "repo.settings.sync_mirror"}}</button>
|
2021-06-14 17:20:43 +00:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="4">
|
|
|
|
<form class="ui form" method="post">
|
2021-10-18 22:08:41 +00:00
|
|
|
{{template "base/disable_form_autofill"}}
|
2021-06-14 17:20:43 +00:00
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="mirror">
|
|
|
|
<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.mirror_prune"}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
<div class="ui checkbox">
|
|
|
|
<input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.mirror_prune_desc"}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="inline field {{if .Err_Interval}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="interval">{{.locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
<input id="interval" name="interval" value="{{.MirrorInterval}}">
|
|
|
|
</div>
|
2022-08-15 03:12:01 +00:00
|
|
|
{{$address := MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false}}
|
2021-06-14 17:20:43 +00:00
|
|
|
<div class="field {{if .Err_MirrorAddress}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="mirror_address">{{.locale.Tr "repo.mirror_address"}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
<input id="mirror_address" name="mirror_address" value="{{$address.Address}}" required>
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.mirror_address_desc"}}</p>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
|
|
|
<details class="ui optional field" {{if or .Err_Auth $address.Username}}open{{end}}>
|
|
|
|
<summary class="p-2">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.need_auth"}}
|
2021-06-14 17:20:43 +00:00
|
|
|
</summary>
|
|
|
|
<div class="p-2">
|
|
|
|
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="mirror_username">{{.locale.Tr "username"}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
<input id="mirror_username" name="mirror_username" value="{{$address.Username}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
|
|
|
|
</div>
|
|
|
|
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="mirror_password">{{.locale.Tr "password"}}</label>
|
|
|
|
<input id="mirror_password" name="mirror_password" type="password" placeholder="{{if $address.Password}}{{.locale.Tr "repo.mirror_password_placeholder"}}{{else}}{{.locale.Tr "repo.mirror_password_blank_placeholder"}}{{end}}" value="" {{if not .mirror_password}}data-need-clear="true"{{end}} autocomplete="off">
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.mirror_password_help"}}</p>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
|
|
|
</details>
|
2021-04-08 22:25:57 +00:00
|
|
|
|
2021-06-14 17:20:43 +00:00
|
|
|
{{if .LFSStartServer}}
|
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.mirror_lfs"}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
<div class="ui checkbox">
|
|
|
|
<input id="mirror_lfs" name="mirror_lfs" type="checkbox" {{if .Mirror.LFS}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.mirror_lfs_desc"}}</label>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field {{if .Err_LFSEndpoint}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="mirror_lfs_endpoint">{{.locale.Tr "repo.mirror_lfs_endpoint"}}</label>
|
|
|
|
<input id="mirror_lfs_endpoint" name="mirror_lfs_endpoint" value="{{.Mirror.LFSEndpoint}}" placeholder="{{.locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
|
|
|
|
<p class="help">{{.locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}</p>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
<thead><tr><th colspan="4"></th></tr></thead>
|
|
|
|
{{end}}
|
|
|
|
<tbody>
|
2021-12-10 01:27:50 +00:00
|
|
|
{{range .PushMirrors}}
|
2021-06-14 17:20:43 +00:00
|
|
|
<tr>
|
2022-08-15 03:12:01 +00:00
|
|
|
{{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName true}}
|
2021-06-14 17:20:43 +00:00
|
|
|
<td>{{$address.Address}}</td>
|
2022-06-27 20:58:46 +00:00
|
|
|
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}</td>
|
2022-10-17 04:08:21 +00:00
|
|
|
<td>{{if .LastUpdateUnix}}<time data-format="date-time" datetime="{{.LastUpdateUnix.FormatLong}}">{{.LastUpdateUnix.AsTime}}</time>{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label tooltip" data-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td>
|
2021-06-14 17:20:43 +00:00
|
|
|
<td class="right aligned">
|
|
|
|
<form method="post" style="display: inline-block">
|
|
|
|
{{$.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="push-mirror-remove">
|
|
|
|
<input type="hidden" name="push_mirror_id" value="{{.ID}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui basic red tiny button inline text-thin">{{$.locale.Tr "remove"}}</button>
|
2021-06-14 17:20:43 +00:00
|
|
|
</form>
|
|
|
|
<form method="post" style="display: inline-block">
|
|
|
|
{{$.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="push-mirror-sync">
|
|
|
|
<input type="hidden" name="push_mirror_id" value="{{.ID}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui primary tiny button inline text-thin">{{$.locale.Tr "repo.settings.sync_mirror"}}</button>
|
2021-06-14 17:20:43 +00:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{else}}
|
|
|
|
<tr>
|
2022-06-27 20:58:46 +00:00
|
|
|
<td>{{$.locale.Tr "repo.settings.mirror_settings.push_mirror.none"}}</td>
|
2021-06-14 17:20:43 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
2021-09-07 15:49:36 +00:00
|
|
|
{{if (not .DisableNewPushMirrors)}}
|
|
|
|
<tr>
|
|
|
|
<td colspan="4">
|
|
|
|
<form class="ui form" method="post">
|
2021-10-18 22:08:41 +00:00
|
|
|
{{template "base/disable_form_autofill"}}
|
2021-09-07 15:49:36 +00:00
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="push-mirror-add">
|
|
|
|
<div class="field {{if .Err_PushMirrorAddress}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="push_mirror_address">{{.locale.Tr "repo.settings.mirror_settings.push_mirror.remote_url"}}</label>
|
2021-10-18 22:08:41 +00:00
|
|
|
<input id="push_mirror_address" name="push_mirror_address" value="{{.push_mirror_address}}" required>
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.mirror_address_desc"}}</p>
|
2021-09-07 15:49:36 +00:00
|
|
|
</div>
|
|
|
|
<details class="ui optional field" {{if or .Err_PushMirrorAuth .push_mirror_username}}open{{end}}>
|
|
|
|
<summary class="p-2">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.need_auth"}}
|
2021-09-07 15:49:36 +00:00
|
|
|
</summary>
|
|
|
|
<div class="p-2">
|
|
|
|
<div class="inline field {{if .Err_PushMirrorAuth}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="push_mirror_username">{{.locale.Tr "username"}}</label>
|
2021-09-07 15:49:36 +00:00
|
|
|
<input id="push_mirror_username" name="push_mirror_username" value="{{.push_mirror_username}}">
|
|
|
|
</div>
|
|
|
|
<div class="inline field {{if .Err_PushMirrorAuth}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="push_mirror_password">{{.locale.Tr "password"}}</label>
|
2021-09-07 15:49:36 +00:00
|
|
|
<input id="push_mirror_password" name="push_mirror_password" type="password" value="{{.push_mirror_password}}" autocomplete="off">
|
|
|
|
</div>
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
2021-09-07 15:49:36 +00:00
|
|
|
</details>
|
2022-07-08 19:45:12 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
2022-10-01 13:07:05 +00:00
|
|
|
<input id="push_mirror_sync_on_commit" name="push_mirror_sync_on_commit" type="checkbox" {{if .push_mirror_sync_on_commit}}checked{{end}}>
|
2022-07-08 19:45:12 +00:00
|
|
|
<label for="push_mirror_sync_on_commit">{{.locale.Tr "repo.mirror_sync_on_commit"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-07 15:49:36 +00:00
|
|
|
<div class="inline field {{if .Err_PushMirrorInterval}}error{{end}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="push_mirror_interval">{{.locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
|
2021-09-07 15:49:36 +00:00
|
|
|
<input id="push_mirror_interval" name="push_mirror_interval" value="{{if .push_mirror_interval}}{{.push_mirror_interval}}{{else}}{{.DefaultMirrorInterval}}{{end}}">
|
2021-06-14 17:20:43 +00:00
|
|
|
</div>
|
2021-09-07 15:49:36 +00:00
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "repo.settings.mirror_settings.push_mirror.add"}}</button>
|
2021-09-07 15:49:36 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
2021-06-14 17:20:43 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2017-03-15 22:39:38 +00:00
|
|
|
<h4 class="ui top attached header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.advanced_settings"}}
|
2017-03-15 22:39:38 +00:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="advanced">
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2022-12-12 05:29:27 +00:00
|
|
|
{{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}}
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.locale.Tr "repo.code"}}</label>
|
|
|
|
{{if .UnitTypeCode.UnitGlobalDisabled}}
|
|
|
|
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
|
|
|
{{else}}
|
|
|
|
<div class="ui checkbox">
|
|
|
|
{{end}}
|
|
|
|
<input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}>
|
|
|
|
<label>{{.locale.Tr "repo.code.desc"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-12-10 02:46:31 +00:00
|
|
|
{{$isWikiEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeWiki) (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.wiki"}}</label>
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if and (.UnitTypeWiki.UnitGlobalDisabled) (.UnitTypeExternalWiki.UnitGlobalDisabled)}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2017-04-03 02:19:51 +00:00
|
|
|
<input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.wiki_desc"}}</label>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-03 02:19:51 +00:00
|
|
|
<div class="field {{if not $isWikiEnabled}}disabled{{end}}" id="wiki_box">
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="field">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if .UnitTypeWiki.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui radio checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui radio checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2022-12-10 02:46:31 +00:00
|
|
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}/>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label>
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
<div class="field">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if .UnitTypeExternalWiki.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui radio checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui radio checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2022-12-10 02:46:31 +00:00
|
|
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}/>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label>
|
2015-12-11 09:55:08 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2022-12-10 02:46:31 +00:00
|
|
|
<div class="field {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}disabled{{end}}" id="external_wiki_box">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="external_wiki_url">{{.locale.Tr "repo.settings.external_wiki_url"}}</label>
|
2022-12-10 02:46:31 +00:00
|
|
|
<input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.settings.external_wiki_url_desc"}}</p>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui divider"></div>
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2022-12-10 02:46:31 +00:00
|
|
|
{{$isIssuesEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeIssues) (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.issues"}}</label>
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if and (.UnitTypeIssues.UnitGlobalDisabled) (.UnitTypeExternalTracker.UnitGlobalDisabled)}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2017-04-03 02:19:51 +00:00
|
|
|
<input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.issues_desc"}}</label>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-03 02:19:51 +00:00
|
|
|
<div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box">
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="field">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if .UnitTypeIssues.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui radio checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui radio checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2022-12-10 02:46:31 +00:00
|
|
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}/>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-10 02:46:31 +00:00
|
|
|
<div class="field {{if (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}disabled{{end}}" id="internal_issue_box">
|
2018-04-09 15:15:32 +00:00
|
|
|
{{if .Repository.CanEnableTimetracker}}
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
2022-12-10 02:46:31 +00:00
|
|
|
<input name="enable_timetracker" class="enable-system" data-target="#only_contributors" type="checkbox" {{if .Repository.IsTimetrackerEnabled $.Context}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.enable_timetracker"}}</label>
|
2018-04-09 15:15:32 +00:00
|
|
|
</div>
|
2017-09-12 06:48:13 +00:00
|
|
|
</div>
|
2022-12-10 02:46:31 +00:00
|
|
|
<div class="field {{if not (.Repository.IsTimetrackerEnabled $.Context)}}disabled{{end}}" id="only_contributors">
|
2018-04-09 15:15:32 +00:00
|
|
|
<div class="ui checkbox">
|
2022-12-10 02:46:31 +00:00
|
|
|
<input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime $.Context}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.allow_only_contributors_to_track_time"}}</label>
|
2018-04-09 15:15:32 +00:00
|
|
|
</div>
|
2017-09-12 06:48:13 +00:00
|
|
|
</div>
|
2018-04-09 15:15:32 +00:00
|
|
|
{{end}}
|
2021-03-16 01:00:52 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
2022-12-10 02:46:31 +00:00
|
|
|
<input name="enable_issue_dependencies" type="checkbox" {{if (.Repository.IsDependenciesEnabled $.Context)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.issues.dependency.setting"}}</label>
|
2018-07-17 21:23:58 +00:00
|
|
|
</div>
|
2021-03-16 01:00:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="ui checkbox">
|
2022-08-31 15:58:54 +00:00
|
|
|
<input name="enable_close_issues_via_commit_in_any_branch" type="checkbox" {{if .Repository.CloseIssuesViaCommitInAnyBranch}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.admin_enable_close_issues_via_commit_in_any_branch"}}</label>
|
2021-03-16 01:00:52 +00:00
|
|
|
</div>
|
2017-09-12 06:48:13 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="field">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if .UnitTypeExternalTracker.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui radio checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui radio checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2022-12-10 02:46:31 +00:00
|
|
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}/>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-10 02:46:31 +00:00
|
|
|
<div class="field {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box">
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="external_tracker_url">{{.locale.Tr "repo.settings.external_tracker_url"}}</label>
|
2022-12-10 02:46:31 +00:00
|
|
|
<input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.settings.external_tracker_url_desc"}}</p>
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="tracker_url_format">{{.locale.Tr "repo.settings.tracker_url_format"}}</label>
|
2022-12-10 02:46:31 +00:00
|
|
|
<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
<div class="inline fields">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="issue_style">{{.locale.Tr "repo.settings.tracker_issue_style"}}</label>
|
2016-04-22 22:28:08 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
2022-12-10 02:46:31 +00:00
|
|
|
{{$externalTracker := (.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker)}}
|
2017-03-15 22:39:38 +00:00
|
|
|
{{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}}
|
2022-06-10 05:39:53 +00:00
|
|
|
<input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="numeric" {{if eq $externalTrackerStyle "numeric"}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.tracker_issue_style.numeric"}} <span class="ui light grey text">#1234</span></label>
|
2016-04-22 22:28:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
2022-06-10 05:39:53 +00:00
|
|
|
<input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="alphanumeric" {{if eq $externalTrackerStyle "alphanumeric"}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.tracker_issue_style.alphanumeric"}} <span class="ui light grey text">ABC-123 , DEFG-234</span></label>
|
2016-04-22 22:28:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-10 05:39:53 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input class="js-tracker-issue-style" name="tracker_issue_style" type="radio" value="regexp" {{if eq $externalTrackerStyle "regexp"}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.tracker_issue_style.regexp"}} <span class="ui light grey text">(ISSUE-\d+) , ISSUE-(\d+)</span></label>
|
2022-06-10 05:39:53 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field {{if ne $externalTrackerStyle "regexp"}}disabled{{end}}" id="tracker-issue-style-regex-box">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="external_tracker_regexp_pattern">{{.locale.Tr "repo.settings.tracker_issue_style.regexp_pattern"}}</label>
|
2022-12-10 02:46:31 +00:00
|
|
|
<input id="external_tracker_regexp_pattern" name="external_tracker_regexp_pattern" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerRegexpPattern}}">
|
2022-06-27 20:58:46 +00:00
|
|
|
<p class="help">{{.locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc" | Str2html}}</p>
|
2016-04-22 22:28:08 +00:00
|
|
|
</div>
|
2016-02-14 20:12:00 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2016-02-14 20:12:00 +00:00
|
|
|
|
2020-08-17 03:07:38 +00:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
2022-12-10 02:46:31 +00:00
|
|
|
{{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}}
|
2020-08-17 03:07:38 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.project_board"}}</label>
|
2020-08-17 03:07:38 +00:00
|
|
|
{{if .UnitTypeProjects.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-08-17 03:07:38 +00:00
|
|
|
{{else}}
|
|
|
|
<div class="ui checkbox">
|
|
|
|
{{end}}
|
|
|
|
<input class="enable-system" name="enable_projects" type="checkbox" {{if $isProjectsEnabled}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.projects_desc"}}</label>
|
2020-08-17 03:07:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-12-10 02:46:31 +00:00
|
|
|
{{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}}
|
2022-05-08 15:51:50 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.packages"}}</label>
|
2022-05-08 15:51:50 +00:00
|
|
|
{{if .UnitTypePackages.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2022-05-08 15:51:50 +00:00
|
|
|
{{else}}
|
|
|
|
<div class="ui checkbox">
|
|
|
|
{{end}}
|
|
|
|
<input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.packages_desc"}}</label>
|
2022-05-08 15:51:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-10-30 16:27:01 +00:00
|
|
|
{{if not .IsMirror}}
|
2016-02-14 20:12:00 +00:00
|
|
|
<div class="ui divider"></div>
|
2022-12-10 02:46:31 +00:00
|
|
|
{{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}}
|
|
|
|
{{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="inline field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.pulls"}}</label>
|
2020-01-17 07:34:37 +00:00
|
|
|
{{if .UnitTypePullRequests.UnitGlobalDisabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui checkbox tooltip disabled" data-content="{{.locale.Tr "repo.unit_disabled"}}">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{else}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui checkbox">
|
2020-01-17 07:34:37 +00:00
|
|
|
{{end}}
|
2018-01-05 18:56:50 +00:00
|
|
|
<input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls_desc"}}</label>
|
2015-08-29 19:21:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-05 18:56:50 +00:00
|
|
|
<div class="field{{if not $pullRequestEnabled}} disabled{{end}}" id="pull_box">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_ignore_whitespace" type="checkbox" {{if and $pullRequestEnabled ($prUnit.PullRequestsConfig.IgnoreWhitespaceConflicts)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.ignore_whitespace"}}</label>
|
2018-01-05 18:56:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_allow_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowMerge)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.allow_merge_commits"}}</label>
|
2018-01-05 18:56:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_allow_rebase" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebase)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.allow_rebase_merge"}}</label>
|
2018-01-05 18:56:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-27 10:27:08 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_allow_rebase_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebaseMerge)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.allow_rebase_merge_commit"}}</label>
|
2018-12-27 10:27:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-05 18:56:50 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_allow_squash" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowSquash)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.allow_squash_commits"}}</label>
|
2018-01-05 18:56:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-04 03:41:23 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_allow_manual_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowManualMerge)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.allow_manual_merge"}}</label>
|
2021-03-04 03:41:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_autodetect_manual_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AutodetectManualMerge)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.enable_autodetect_manual_merge"}}</label>
|
2021-03-04 03:41:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-04 08:30:49 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="pulls_allow_rebase_update" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebaseUpdate)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.allow_rebase_update"}}</label>
|
2022-03-04 08:30:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-12 23:26:25 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="default_delete_branch_after_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.DefaultDeleteBranchAfterMerge)}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.pulls.default_delete_branch_after_merge"}}</label>
|
2021-07-12 23:26:25 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-27 14:55:40 +00:00
|
|
|
<div class="field">
|
|
|
|
<p>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.default_merge_style_desc"}}
|
2021-03-27 14:55:40 +00:00
|
|
|
</p>
|
|
|
|
<div class="ui dropdown selection" tabindex="0">
|
|
|
|
<select name="pulls_default_merge_style">
|
2022-06-27 20:58:46 +00:00
|
|
|
<option value="merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}}selected{{end}}>{{.locale.Tr "repo.pulls.merge_pull_request"}}</option>
|
|
|
|
<option value="rebase" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}}selected{{end}}>{{.locale.Tr "repo.pulls.rebase_merge_pull_request"}}</option>
|
|
|
|
<option value="rebase-merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase-merge")}}selected{{end}}>{{.locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</option>
|
|
|
|
<option value="squash" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "squash")}}selected{{end}}>{{.locale.Tr "repo.pulls.squash_merge_pull_request"}}</option>
|
2021-03-27 14:55:40 +00:00
|
|
|
</select>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
|
|
<div class="default text">
|
|
|
|
{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.pulls.merge_pull_request"}}
|
2021-03-27 14:55:40 +00:00
|
|
|
{{end}}
|
|
|
|
{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.pulls.rebase_merge_pull_request"}}
|
2021-03-27 14:55:40 +00:00
|
|
|
{{end}}
|
|
|
|
{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase-merge")}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
|
2021-03-27 14:55:40 +00:00
|
|
|
{{end}}
|
|
|
|
{{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "squash")}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.pulls.squash_merge_pull_request"}}
|
2021-03-27 14:55:40 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="item" data-value="merge">{{.locale.Tr "repo.pulls.merge_pull_request"}}</div>
|
|
|
|
<div class="item" data-value="rebase">{{.locale.Tr "repo.pulls.rebase_merge_pull_request"}}</div>
|
|
|
|
<div class="item" data-value="rebase-merge">{{.locale.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</div>
|
|
|
|
<div class="item" data-value="squash">{{.locale.Tr "repo.pulls.squash_merge_pull_request"}}</div>
|
2021-03-27 14:55:40 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-05 18:56:50 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
{{end}}
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-03-03 20:38:25 +00:00
|
|
|
|
2020-09-19 16:44:55 +00:00
|
|
|
<h4 class="ui top attached header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.signing_settings"}}
|
2020-09-19 16:44:55 +00:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="signing">
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.trust_model"}}</label><br>
|
2020-09-19 16:44:55 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input type="radio" id="trust_model_default" name="trust_model" {{if eq .Repository.TrustModel.String "default"}}checked="checked"{{end}} value="default">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="trust_model_default">{{.locale.Tr "repo.settings.trust_model.default"}}</label>
|
|
|
|
<p class="help">{{.locale.Tr "repo.settings.trust_model.default.desc"}}</p>
|
2020-09-19 16:44:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input type="radio" id="trust_model_collaborator" name="trust_model" {{if eq .Repository.TrustModel.String "collaborator"}}checked="checked"{{end}} value="collaborator">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="trust_model_collaborator">{{.locale.Tr "repo.settings.trust_model.collaborator.long"}}</label>
|
|
|
|
<p class="help">{{.locale.Tr "repo.settings.trust_model.collaborator.desc"}}</p>
|
2020-09-19 16:44:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input type="radio" name="trust_model" id="trust_model_committer" {{if eq .Repository.TrustModel.String "committer"}}checked="checked"{{end}} value="committer">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="trust_model_committer">{{.locale.Tr "repo.settings.trust_model.committer.long"}}</label>
|
|
|
|
<p class="help">{{.locale.Tr "repo.settings.trust_model.committer.desc"}}</p>
|
2020-09-19 16:44:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui radio checkbox">
|
|
|
|
<input type="radio" name="trust_model" id="trust_model_collaboratorcommitter" {{if eq .Repository.TrustModel.String "collaboratorcommitter"}}checked="checked"{{end}} value="collaboratorcommitter">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="trust_model_collaboratorcommitter">{{.locale.Tr "repo.settings.trust_model.collaboratorcommitter.long"}}</label>
|
|
|
|
<p class="help">{{.locale.Tr "repo.settings.trust_model.collaboratorcommitter.desc"}}</p>
|
2020-09-19 16:44:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
|
2020-09-19 16:44:55 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2018-03-27 14:13:20 +00:00
|
|
|
{{if .IsAdmin}}
|
|
|
|
<h4 class="ui top attached header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.admin_settings"}}
|
2018-03-27 14:13:20 +00:00
|
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
|
|
<form class="ui form" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="admin">
|
|
|
|
<div class="field">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input name="enable_health_check" type="checkbox" {{if .Repository.IsFsckEnabled}}checked{{end}}>
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.admin_enable_health_check"}}</label>
|
2018-03-27 14:13:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button">{{$.locale.Tr "repo.settings.update_settings"}}</button>
|
2018-03-27 14:13:20 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
2021-12-16 15:55:12 +00:00
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
<form class="ui form" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="admin_index">
|
|
|
|
{{if .CodeIndexerEnabled}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<h4 class="ui header">{{.locale.Tr "repo.settings.admin_code_indexer"}}</h4>
|
2021-12-16 15:55:12 +00:00
|
|
|
<div class="inline fields">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label>
|
2021-12-16 15:55:12 +00:00
|
|
|
<span class="field">
|
|
|
|
{{if .CodeIndexerStatus}}
|
|
|
|
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}">
|
|
|
|
<span class="shortsha">{{ShortSha .CodeIndexerStatus.CommitSha}}</span>
|
|
|
|
</a>
|
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<span>{{.locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
|
2021-12-16 15:55:12 +00:00
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button" name="request_reindex_type" value="code">{{$.locale.Tr "repo.settings.reindex_button"}}</button>
|
2021-12-16 15:55:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<h4 class="ui header">{{.locale.Tr "repo.settings.admin_stats_indexer"}}</h4>
|
2021-12-16 15:55:12 +00:00
|
|
|
<div class="inline fields">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label>{{.locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label>
|
2021-12-16 15:55:12 +00:00
|
|
|
<span class="field">
|
|
|
|
{{if .StatsIndexerStatus}}
|
|
|
|
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}">
|
|
|
|
<span class="shortsha">{{ShortSha .StatsIndexerStatus.CommitSha}}</span>
|
|
|
|
</a>
|
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<span>{{.locale.Tr "repo.settings.admin_indexer_unindexed"}}</span>
|
2021-12-16 15:55:12 +00:00
|
|
|
{{end}}
|
|
|
|
</span>
|
|
|
|
<div class="field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui green button" name="request_reindex_type" value="stats">{{$.locale.Tr "repo.settings.reindex_button"}}</button>
|
2021-12-16 15:55:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2018-03-27 14:13:20 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2018-11-28 11:26:14 +00:00
|
|
|
{{if .Permission.IsOwner}}
|
2020-10-04 20:54:22 +00:00
|
|
|
<h4 class="ui top attached error header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.danger_zone"}}
|
2017-03-15 22:39:38 +00:00
|
|
|
</h4>
|
2020-10-04 20:54:22 +00:00
|
|
|
<div class="ui attached error table danger segment">
|
2017-03-15 22:39:38 +00:00
|
|
|
{{if .Repository.IsMirror}}
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui basic red show-modal button" data-modal="#convert-mirror-repo-modal">{{.locale.Tr "repo.settings.convert"}}</button>
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.convert"}}</h5>
|
|
|
|
<p>{{.locale.Tr "repo.settings.convert_desc"}}</p>
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
{{end}}
|
|
|
|
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui basic red show-modal button" data-modal="#convert-fork-repo-modal">{{.locale.Tr "repo.settings.convert_fork"}}</button>
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.convert_fork"}}</h5>
|
|
|
|
<p>{{.locale.Tr "repo.settings.convert_fork_desc"}}</p>
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="ui divider"></div>
|
2017-03-15 22:39:38 +00:00
|
|
|
{{end}}
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
2021-03-01 00:47:30 +00:00
|
|
|
{{if .RepoTransfer}}
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="cancel_transfer">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui red button">{{.locale.Tr "repo.settings.transfer_abort"}}</button>
|
2021-03-01 00:47:30 +00:00
|
|
|
</form>
|
2022-08-31 15:58:54 +00:00
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.locale.Tr "repo.settings.transfer"}}</button>
|
2022-08-31 15:58:54 +00:00
|
|
|
{{end}}
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.transfer"}}</h5>
|
2021-03-01 00:47:30 +00:00
|
|
|
{{if .RepoTransfer}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<p>{{.locale.Tr "repo.settings.transfer_started" .RepoTransfer.Recipient.DisplayName}}</p>
|
2021-03-01 00:47:30 +00:00
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<p>{{.locale.Tr "repo.settings.transfer_desc"}}</p>
|
2021-03-01 00:47:30 +00:00
|
|
|
{{end}}
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-08-29 19:21:59 +00:00
|
|
|
|
2018-11-28 11:26:14 +00:00
|
|
|
{{if .Permission.CanRead $.UnitTypeWiki}}
|
2017-03-15 22:39:38 +00:00
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.locale.Tr "repo.settings.wiki_delete"}}</button>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.wiki_delete"}}</h5>
|
|
|
|
<p>{{.locale.Tr "repo.settings.wiki_delete_desc"}}</p>
|
2015-08-29 19:21:59 +00:00
|
|
|
</div>
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
2022-06-27 20:58:46 +00:00
|
|
|
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.locale.Tr "repo.settings.delete"}}</button>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.delete"}}</h5>
|
|
|
|
<p>{{.locale.Tr "repo.settings.delete_desc"}}</p>
|
2017-03-15 22:39:38 +00:00
|
|
|
</div>
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2019-01-23 18:58:38 +00:00
|
|
|
|
|
|
|
{{if not .Repository.IsMirror}}
|
|
|
|
<div class="ui divider"></div>
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
<div class="ui right">
|
|
|
|
<button class="ui basic red show-modal button" data-modal="#archive-repo-modal">
|
|
|
|
{{if .Repository.IsArchived}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.unarchive.button"}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.archive.button"}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{end}}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{if .Repository.IsArchived}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.unarchive.header"}}</h5>
|
|
|
|
<p>{{.locale.Tr "repo.settings.unarchive.text"}}</p>
|
2019-01-23 18:58:38 +00:00
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
<h5>{{.locale.Tr "repo.settings.archive.header"}}</h5>
|
|
|
|
<p>{{.locale.Tr "repo.settings.archive.text"}}</p>
|
2019-01-23 18:58:38 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2017-03-15 22:39:38 +00:00
|
|
|
{{end}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2015-08-29 19:21:59 +00:00
|
|
|
</div>
|
|
|
|
|
2018-11-28 11:26:14 +00:00
|
|
|
{{if .Permission.IsOwner}}
|
2016-03-06 01:45:23 +00:00
|
|
|
{{if .Repository.IsMirror}}
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="ui small modal" id="convert-mirror-repo-modal">
|
|
|
|
<div class="header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.convert"}}
|
2016-02-14 20:12:00 +00:00
|
|
|
</div>
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.convert_notices_1"}}
|
2016-03-06 01:45:23 +00:00
|
|
|
</div>
|
2020-07-02 14:09:09 +00:00
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="convert">
|
|
|
|
<div class="field">
|
|
|
|
<label>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer_form_title"}}
|
2020-07-02 14:09:09 +00:00
|
|
|
<span class="text red">{{.Repository.Name}}</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
2020-07-02 14:09:09 +00:00
|
|
|
<input id="repo_name" name="repo_name" required>
|
|
|
|
</div>
|
2016-02-14 20:12:00 +00:00
|
|
|
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="text right actions">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div>
|
|
|
|
<button class="ui red button">{{.locale.Tr "repo.settings.convert_confirm"}}</button>
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2020-07-02 14:09:09 +00:00
|
|
|
{{if and .Repository.IsFork .Repository.Owner.CanCreateRepo}}
|
|
|
|
<div class="ui small modal" id="convert-fork-repo-modal">
|
|
|
|
<div class="header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.convert_fork"}}
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.convert_fork_notices_1"}}
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="convert_fork">
|
|
|
|
<div class="field">
|
|
|
|
<label>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer_form_title"}}
|
2020-07-02 14:09:09 +00:00
|
|
|
<span class="text red">{{.Repository.Name}}</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
2020-07-02 14:09:09 +00:00
|
|
|
<input id="repo_name" name="repo_name" required>
|
|
|
|
</div>
|
2016-02-14 20:12:00 +00:00
|
|
|
|
2020-07-02 14:09:09 +00:00
|
|
|
<div class="text right actions">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div>
|
|
|
|
<button class="ui red button">{{.locale.Tr "repo.settings.convert_fork_confirm"}}</button>
|
2020-07-02 14:09:09 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="ui small modal" id="transfer-repo-modal">
|
|
|
|
<div class="header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer"}}
|
2015-09-01 10:31:47 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer_notices_1"}} <br>
|
|
|
|
{{.locale.Tr "repo.settings.transfer_notices_2"}} <br>
|
|
|
|
{{.locale.Tr "repo.settings.transfer_notices_3"}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="transfer">
|
|
|
|
<div class="field">
|
|
|
|
<label>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer_form_title"}}
|
2016-03-06 01:45:23 +00:00
|
|
|
<span class="text red">{{.Repository.Name}}</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
2016-03-06 01:45:23 +00:00
|
|
|
<input id="repo_name" name="repo_name" required>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="new_owner_name">{{.locale.Tr "repo.settings.transfer_owner"}}</label>
|
2016-03-06 01:45:23 +00:00
|
|
|
<input id="new_owner_name" name="new_owner_name" required>
|
|
|
|
</div>
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="text right actions">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div>
|
|
|
|
<button class="ui red button">{{.locale.Tr "repo.settings.transfer_perform"}}</button>
|
2016-03-06 01:45:23 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2015-08-29 19:21:59 +00:00
|
|
|
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="ui small modal" id="delete-repo-modal">
|
|
|
|
<div class="header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.delete"}}
|
2015-12-07 22:30:52 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
|
|
|
|
{{.locale.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}}
|
2016-03-06 01:45:23 +00:00
|
|
|
{{if .Repository.NumForks}}<br>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.delete_notices_fork_1"}}
|
2016-03-06 01:45:23 +00:00
|
|
|
{{end}}
|
2016-02-14 20:12:00 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="delete">
|
|
|
|
<div class="field">
|
|
|
|
<label>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer_form_title"}}
|
2016-03-06 01:45:23 +00:00
|
|
|
<span class="text red">{{.Repository.Name}}</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
2016-03-06 01:45:23 +00:00
|
|
|
<input id="repo_name" name="repo_name" required>
|
|
|
|
</div>
|
2015-12-07 22:30:52 +00:00
|
|
|
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="text right actions">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div>
|
|
|
|
<button class="ui red button">{{.locale.Tr "repo.settings.confirm_delete"}}</button>
|
2016-03-06 01:45:23 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-02-14 20:12:00 +00:00
|
|
|
</div>
|
2016-03-03 20:38:25 +00:00
|
|
|
|
2022-12-10 02:46:31 +00:00
|
|
|
{{if .Repository.UnitEnabled $.Context $.UnitTypeWiki}}
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="ui small modal" id="delete-wiki-modal">
|
|
|
|
<div class="header">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.wiki_delete"}}
|
2016-03-03 20:38:25 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="content">
|
|
|
|
<div class="ui warning message text left">
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.delete_notices_1" | Safe}}<br>
|
|
|
|
{{.locale.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
|
2016-03-03 20:38:25 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="delete-wiki">
|
|
|
|
<div class="field">
|
|
|
|
<label>
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.transfer_form_title"}}
|
2016-03-06 01:45:23 +00:00
|
|
|
<span class="text red">{{.Repository.Name}}</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="required field">
|
2022-06-27 20:58:46 +00:00
|
|
|
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
2016-03-06 01:45:23 +00:00
|
|
|
<input id="repo_name" name="repo_name" required>
|
|
|
|
</div>
|
2016-03-03 20:38:25 +00:00
|
|
|
|
2016-03-06 01:45:23 +00:00
|
|
|
<div class="text right actions">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui cancel button">{{.locale.Tr "settings.cancel"}}</div>
|
|
|
|
<button class="ui red button">{{.locale.Tr "repo.settings.confirm_wiki_delete"}}</button>
|
2016-03-06 01:45:23 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2016-03-03 20:38:25 +00:00
|
|
|
</div>
|
2016-03-06 01:45:23 +00:00
|
|
|
{{end}}
|
2019-01-23 18:58:38 +00:00
|
|
|
|
|
|
|
{{if not .Repository.IsMirror}}
|
|
|
|
<div class="ui basic modal" id="archive-repo-modal">
|
|
|
|
<div class="ui icon header">
|
|
|
|
{{if .Repository.IsArchived}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.unarchive.header"}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.archive.header"}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<div class="content center">
|
|
|
|
<p>
|
|
|
|
{{if .Repository.IsArchived}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.unarchive.text"}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{else}}
|
2022-06-27 20:58:46 +00:00
|
|
|
{{.locale.Tr "repo.settings.archive.text"}}
|
2019-01-23 18:58:38 +00:00
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<form action="{{.Link}}" method="post">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
|
|
|
|
<input type="hidden" name="repo_id" value="{{.Repository.ID}}">
|
|
|
|
<div class="center actions">
|
2022-06-27 20:58:46 +00:00
|
|
|
<div class="ui basic cancel inverted button">{{.locale.Tr "settings.cancel"}}</div>
|
|
|
|
<button class="ui basic inverted yellow button">{{.locale.Tr "modal.yes"}}</button>
|
2019-01-23 18:58:38 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2016-03-04 04:24:22 +00:00
|
|
|
{{end}}
|
2016-03-03 20:38:25 +00:00
|
|
|
|
2015-12-07 22:30:52 +00:00
|
|
|
{{template "base/footer" .}}
|