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