本站源代码
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

578 líneas
24KB

  1. {{template "base/head" .}}
  2. <div class="repository settings options">
  3. {{template "repo/header" .}}
  4. {{template "repo/settings/navbar" .}}
  5. <div class="ui container">
  6. {{template "base/alert" .}}
  7. <h4 class="ui top attached header">
  8. {{.i18n.Tr "repo.settings.basic_settings"}}
  9. </h4>
  10. <div class="ui attached segment">
  11. <form class="ui form" action="{{.Link}}" method="post">
  12. {{.CsrfTokenHtml}}
  13. <input type="hidden" name="action" value="update">
  14. <div class="required field {{if .Err_RepoName}}error{{end}}">
  15. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  16. <input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
  17. </div>
  18. {{if not .Repository.IsFork}}
  19. <div class="inline field">
  20. <label for="point">项目红包余额</label>
  21. <input id="point" name="point" type="number" value="{{.Repository.Point}}">
  22. </div>
  23. <div class="inline field">
  24. <label for="percent">每贡献奖励百分比</label>
  25. <input id="percent" name="percent" type="number" value="{{.Repository.Percent}}"><span>%</span>
  26. </div>
  27. <div class="inline field">
  28. <label for="funding_to_collaboration">获取读权限需要一次性捐赠</label>
  29. <input id="funding_to_collaboration" name="funding_to_collaboration" type="number" value="{{.Repository.FundingToCollaboration}}">
  30. </div>
  31. <div class="inline field">
  32. <label>{{.i18n.Tr "repo.visibility"}}</label>
  33. <div class="ui checkbox">
  34. {{if .IsAdmin}}
  35. <input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
  36. {{else}}
  37. <input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}{{if and $.ForcePrivate .Repository.IsPrivate}} readonly{{end}}>
  38. {{end}}
  39. <label>{{.i18n.Tr "repo.visibility_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visibility_fork_helper"}}</span>{{end}}</label>
  40. </div>
  41. </div>
  42. {{end}}
  43. <div class="field {{if .Err_Description}}error{{end}}">
  44. <label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
  45. <textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea>
  46. </div>
  47. <div class="field {{if .Err_Website}}error{{end}}">
  48. <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
  49. <input id="website" name="website" type="url" value="{{.Repository.Website}}">
  50. </div>
  51. <div class="field">
  52. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  53. </div>
  54. </form>
  55. <div class="ui divider"></div>
  56. <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
  57. {{.CsrfTokenHtml}}
  58. <div class="inline field">
  59. <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
  60. <input name="avatar" type="file" >
  61. </div>
  62. <div class="field">
  63. <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
  64. <a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
  65. </div>
  66. </form>
  67. </div>
  68. {{if .Repository.IsMirror}}
  69. <h4 class="ui top attached header">
  70. {{.i18n.Tr "repo.settings.mirror_settings"}}
  71. </h4>
  72. <div class="ui attached segment">
  73. <form class="ui form" method="post">
  74. {{.CsrfTokenHtml}}
  75. <input type="hidden" name="action" value="mirror">
  76. <div class="inline field {{if .Err_EnablePrune}}error{{end}}">
  77. <label>{{.i18n.Tr "repo.mirror_prune"}}</label>
  78. <div class="ui checkbox">
  79. <input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}>
  80. <label>{{.i18n.Tr "repo.mirror_prune_desc"}}</label>
  81. </div>
  82. </div>
  83. <div class="inline field {{if .Err_Interval}}error{{end}}">
  84. <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
  85. <input id="interval" name="interval" value="{{.MirrorInterval}}">
  86. </div>
  87. <div class="field {{if .Err_MirrorAddress}}error{{end}}">
  88. <label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label>
  89. <input id="mirror_address" name="mirror_address" value="{{MirrorFullAddress .Mirror}}" required>
  90. <p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p>
  91. </div>
  92. <div class="ui accordion optional field">
  93. <label class="ui title {{if .Err_Auth}}text red active{{end}}">
  94. <i class="icon dropdown"></i>
  95. <label for="">{{.i18n.Tr "repo.need_auth"}}</label>
  96. </label>
  97. <div class="content {{if .Err_Auth}}active{{else if (MirrorUserName .Mirror)}}active{{end}}">
  98. <div class="inline field {{if .Err_Auth}}error{{end}}">
  99. <label for="mirror_username">{{.i18n.Tr "username"}}</label>
  100. <input id="mirror_username" name="mirror_username" value="{{MirrorUserName .Mirror}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
  101. </div>
  102. <input class="fake" type="password">
  103. <div class="inline field {{if .Err_Auth}}error{{end}}">
  104. <label for="mirror_password">{{.i18n.Tr "password"}}</label>
  105. <input id="mirror_password" name="mirror_password" type="password" value="{{MirrorPassword .Mirror}}" {{if not .mirror_password}}data-need-clear="true"{{end}}>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="field">
  110. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  111. </div>
  112. </form>
  113. <div class="ui divider"></div>
  114. <form class="ui form" method="post">
  115. {{.CsrfTokenHtml}}
  116. <input type="hidden" name="action" value="mirror-sync">
  117. <div class="inline field">
  118. <label>{{.i18n.Tr "repo.mirror_last_synced"}}</label>
  119. <span>{{.Mirror.UpdatedUnix.AsTime}}</span>
  120. </div>
  121. <div class="field">
  122. <button class="ui blue button">{{$.i18n.Tr "repo.settings.sync_mirror"}}</button>
  123. </div>
  124. </form>
  125. </div>
  126. {{end}}
  127. <h4 class="ui top attached header">
  128. {{.i18n.Tr "repo.settings.advanced_settings"}}
  129. </h4>
  130. <div class="ui attached segment">
  131. <form class="ui form" method="post">
  132. {{.CsrfTokenHtml}}
  133. <input type="hidden" name="action" value="advanced">
  134. {{$isWikiEnabled := or (.Repository.UnitEnabled $.UnitTypeWiki) (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}
  135. <div class="inline field">
  136. <label>{{.i18n.Tr "repo.wiki"}}</label>
  137. <div class="ui checkbox">
  138. <input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}>
  139. <label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
  140. </div>
  141. </div>
  142. <div class="field {{if not $isWikiEnabled}}disabled{{end}}" id="wiki_box">
  143. <div class="field">
  144. <div class="ui radio checkbox">
  145. <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}}/>
  146. <label>{{.i18n.Tr "repo.settings.use_internal_wiki"}}</label>
  147. </div>
  148. </div>
  149. <div class="field">
  150. <div class="ui radio checkbox">
  151. <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}}/>
  152. <label>{{.i18n.Tr "repo.settings.use_external_wiki"}}</label>
  153. </div>
  154. </div>
  155. <div class="field {{if not (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}disabled{{end}}" id="external_wiki_box">
  156. <label for="external_wiki_url">{{.i18n.Tr "repo.settings.external_wiki_url"}}</label>
  157. <input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}">
  158. <p class="help">{{.i18n.Tr "repo.settings.external_wiki_url_desc"}}</p>
  159. </div>
  160. </div>
  161. <div class="ui divider"></div>
  162. {{$isIssuesEnabled := or (.Repository.UnitEnabled $.UnitTypeIssues) (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}
  163. <div class="inline field">
  164. <label>{{.i18n.Tr "repo.issues"}}</label>
  165. <div class="ui checkbox">
  166. <input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}>
  167. <label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
  168. </div>
  169. </div>
  170. <div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box">
  171. <div class="field">
  172. <div class="ui radio checkbox">
  173. <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}}/>
  174. <label>{{.i18n.Tr "repo.settings.use_internal_issue_tracker"}}</label>
  175. </div>
  176. </div>
  177. <div class="field {{if (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}disabled{{end}}" id="internal_issue_box">
  178. {{if .Repository.CanEnableTimetracker}}
  179. <div class="field">
  180. <div class="ui checkbox">
  181. <input name="enable_timetracker" class="enable-system" data-target="#only_contributors" type="checkbox" {{if .Repository.IsTimetrackerEnabled}}checked{{end}}>
  182. <label>{{.i18n.Tr "repo.settings.enable_timetracker"}}</label>
  183. </div>
  184. </div>
  185. <div class="field {{if not .Repository.IsTimetrackerEnabled}}disabled{{end}}" id="only_contributors">
  186. <div class="ui checkbox">
  187. <input name="allow_only_contributors_to_track_time" type="checkbox" {{if .Repository.AllowOnlyContributorsToTrackTime}}checked{{end}}>
  188. <label>{{.i18n.Tr "repo.settings.allow_only_contributors_to_track_time"}}</label>
  189. </div>
  190. </div>
  191. {{end}}
  192. <div class="field">
  193. <div class="ui checkbox">
  194. <input name="enable_issue_dependencies" type="checkbox" {{if (.Repository.IsDependenciesEnabled)}}checked{{end}}>
  195. <label>{{.i18n.Tr "repo.issues.dependency.setting"}}</label>
  196. </div>
  197. </div>
  198. </div>
  199. <div class="field">
  200. <div class="ui radio checkbox">
  201. <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}}/>
  202. <label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
  203. </div>
  204. </div>
  205. <div class="field {{if not (.Repository.UnitEnabled $.UnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box">
  206. <div class="field">
  207. <label for="external_tracker_url">{{.i18n.Tr "repo.settings.external_tracker_url"}}</label>
  208. <input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}">
  209. <p class="help">{{.i18n.Tr "repo.settings.external_tracker_url_desc"}}</p>
  210. </div>
  211. <div class="field">
  212. <label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
  213. <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}">
  214. <p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
  215. </div>
  216. <div class="inline fields">
  217. <label for="issue_style">{{.i18n.Tr "repo.settings.tracker_issue_style"}}</label>
  218. <div class="field">
  219. <div class="ui radio checkbox">
  220. {{$externalTracker := (.Repository.MustGetUnit $.UnitTypeExternalTracker)}}
  221. {{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}}
  222. <input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="numeric" {{if $externalTrackerStyle}}{{if eq $externalTrackerStyle "numeric"}}checked=""{{end}}{{end}}/>
  223. <label>{{.i18n.Tr "repo.settings.tracker_issue_style.numeric"}} <span class="ui light grey text">(#1234)</span></label>
  224. </div>
  225. </div>
  226. <div class="field">
  227. <div class="ui radio checkbox">
  228. <input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="alphanumeric" {{if $externalTrackerStyle}}{{if eq $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle "alphanumeric"}}checked=""{{end}}{{end}} />
  229. <label>{{.i18n.Tr "repo.settings.tracker_issue_style.alphanumeric"}} <span class="ui light grey text">(ABC-123, DEFG-234)</span></label>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. {{if .Repository.CanEnablePulls}}
  236. <div class="ui divider"></div>
  237. {{$pullRequestEnabled := .Repository.UnitEnabled $.UnitTypePullRequests}}
  238. {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
  239. <div class="inline field">
  240. <label>{{.i18n.Tr "repo.pulls"}}</label>
  241. <div class="ui checkbox">
  242. <input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}>
  243. <label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
  244. </div>
  245. </div>
  246. <div class="field{{if not $pullRequestEnabled}} disabled{{end}}" id="pull_box">
  247. <div class="field">
  248. <div class="ui checkbox">
  249. <input name="pulls_ignore_whitespace" type="checkbox" {{if and $pullRequestEnabled ($prUnit.PullRequestsConfig.IgnoreWhitespaceConflicts)}}checked{{end}}>
  250. <label>{{.i18n.Tr "repo.settings.pulls.ignore_whitespace"}}</label>
  251. </div>
  252. </div>
  253. <div class="field">
  254. <div class="ui checkbox">
  255. <input name="pulls_allow_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowMerge)}}checked{{end}}>
  256. <label>{{.i18n.Tr "repo.settings.pulls.allow_merge_commits"}}</label>
  257. </div>
  258. </div>
  259. <div class="field">
  260. <div class="ui checkbox">
  261. <input name="pulls_allow_rebase" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebase)}}checked{{end}}>
  262. <label>{{.i18n.Tr "repo.settings.pulls.allow_rebase_merge"}}</label>
  263. </div>
  264. </div>
  265. <div class="field">
  266. <div class="ui checkbox">
  267. <input name="pulls_allow_rebase_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowRebaseMerge)}}checked{{end}}>
  268. <label>{{.i18n.Tr "repo.settings.pulls.allow_rebase_merge_commit"}}</label>
  269. </div>
  270. </div>
  271. <div class="field">
  272. <div class="ui checkbox">
  273. <input name="pulls_allow_squash" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowSquash)}}checked{{end}}>
  274. <label>{{.i18n.Tr "repo.settings.pulls.allow_squash_commits"}}</label>
  275. </div>
  276. </div>
  277. </div>
  278. {{end}}
  279. <div class="ui divider"></div>
  280. <div class="field">
  281. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  282. </div>
  283. </form>
  284. </div>
  285. {{if .IsAdmin}}
  286. <h4 class="ui top attached header">
  287. {{.i18n.Tr "repo.settings.admin_settings"}}
  288. </h4>
  289. <div class="ui attached segment">
  290. <form class="ui form" method="post">
  291. {{.CsrfTokenHtml}}
  292. <input type="hidden" name="action" value="admin">
  293. <div class="field">
  294. <div class="ui checkbox">
  295. <input name="enable_health_check" type="checkbox" {{if .Repository.IsFsckEnabled}}checked{{end}}>
  296. <label>{{.i18n.Tr "repo.settings.admin_enable_health_check"}}</label>
  297. </div>
  298. </div>
  299. <div class="ui checkbox">
  300. <input name="enable_close_issues_via_commit_in_any_branch" type="checkbox" {{ if .Repository.CloseIssuesViaCommitInAnyBranch }}checked{{end}}>
  301. <label>{{.i18n.Tr "repo.settings.admin_enable_close_issues_via_commit_in_any_branch"}}</label>
  302. </div>
  303. <div class="ui divider"></div>
  304. <div class="field">
  305. <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
  306. </div>
  307. </form>
  308. </div>
  309. {{end}}
  310. {{if .Permission.IsOwner}}
  311. <h4 class="ui top attached warning header">
  312. {{.i18n.Tr "repo.settings.danger_zone"}}
  313. </h4>
  314. <div class="ui attached warning table danger segment">
  315. {{if .Repository.IsMirror}}
  316. <div class="item">
  317. <div class="ui right">
  318. <button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
  319. </div>
  320. <div>
  321. <h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
  322. <p>{{.i18n.Tr "repo.settings.convert_desc"}}</p>
  323. </div>
  324. </div>
  325. <div class="ui divider"></div>
  326. {{end}}
  327. <div class="item">
  328. <div class="ui right">
  329. <button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button>
  330. </div>
  331. <div>
  332. <h5>{{.i18n.Tr "repo.settings.transfer"}}</h5>
  333. <p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p>
  334. </div>
  335. </div>
  336. {{if .Permission.CanRead $.UnitTypeWiki}}
  337. <div class="ui divider"></div>
  338. <div class="item">
  339. <div class="ui right">
  340. <button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.i18n.Tr "repo.settings.wiki_delete"}}</button>
  341. </div>
  342. <div>
  343. <h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
  344. <p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
  345. </div>
  346. </div>
  347. {{end}}
  348. <div class="ui divider"></div>
  349. <div class="item">
  350. <div class="ui right">
  351. <button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button>
  352. </div>
  353. <div>
  354. <h5>{{.i18n.Tr "repo.settings.delete"}}</h5>
  355. <p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
  356. </div>
  357. </div>
  358. {{if not .Repository.IsMirror}}
  359. <div class="ui divider"></div>
  360. <div class="item">
  361. <div class="ui right">
  362. <button class="ui basic red show-modal button" data-modal="#archive-repo-modal">
  363. {{if .Repository.IsArchived}}
  364. {{.i18n.Tr "repo.settings.unarchive.button"}}
  365. {{else}}
  366. {{.i18n.Tr "repo.settings.archive.button"}}
  367. {{end}}
  368. </button>
  369. </div>
  370. <div>
  371. {{if .Repository.IsArchived}}
  372. <h5>{{.i18n.Tr "repo.settings.unarchive.header"}}</h5>
  373. <p>{{.i18n.Tr "repo.settings.unarchive.text"}}</p>
  374. {{else}}
  375. <h5>{{.i18n.Tr "repo.settings.archive.header"}}</h5>
  376. <p>{{.i18n.Tr "repo.settings.archive.text"}}</p>
  377. {{end}}
  378. </div>
  379. </div>
  380. {{end}}
  381. </div>
  382. {{end}}
  383. </div>
  384. </div>
  385. {{if .Permission.IsOwner}}
  386. {{if .Repository.IsMirror}}
  387. <div class="ui small modal" id="convert-repo-modal">
  388. <div class="header">
  389. {{.i18n.Tr "repo.settings.convert"}}
  390. </div>
  391. <div class="content">
  392. <div class="ui warning message text left">
  393. {{.i18n.Tr "repo.settings.convert_notices_1"}}
  394. </div>
  395. <form class="ui form" action="{{.Link}}" method="post">
  396. {{.CsrfTokenHtml}}
  397. <input type="hidden" name="action" value="convert">
  398. <div class="field">
  399. <label>
  400. {{.i18n.Tr "repo.settings.transfer_form_title"}}
  401. <span class="text red">{{.Repository.Name}}</span>
  402. </label>
  403. </div>
  404. <div class="required field">
  405. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  406. <input id="repo_name" name="repo_name" required>
  407. </div>
  408. <div class="text right actions">
  409. <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
  410. <button class="ui red button">{{.i18n.Tr "repo.settings.convert_confirm"}}</button>
  411. </div>
  412. </form>
  413. </div>
  414. </div>
  415. {{end}}
  416. <div class="ui small modal" id="transfer-repo-modal">
  417. <div class="header">
  418. {{.i18n.Tr "repo.settings.transfer"}}
  419. </div>
  420. <div class="content">
  421. <div class="ui warning message text left">
  422. {{.i18n.Tr "repo.settings.transfer_notices_1"}} <br>
  423. {{.i18n.Tr "repo.settings.transfer_notices_2"}}
  424. </div>
  425. <form class="ui form" action="{{.Link}}" method="post">
  426. {{.CsrfTokenHtml}}
  427. <input type="hidden" name="action" value="transfer">
  428. <div class="field">
  429. <label>
  430. {{.i18n.Tr "repo.settings.transfer_form_title"}}
  431. <span class="text red">{{.Repository.Name}}</span>
  432. </label>
  433. </div>
  434. <div class="required field">
  435. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  436. <input id="repo_name" name="repo_name" required>
  437. </div>
  438. <div class="required field">
  439. <label for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
  440. <input id="new_owner_name" name="new_owner_name" required>
  441. </div>
  442. <div class="text right actions">
  443. <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
  444. <button class="ui red button">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
  445. </div>
  446. </form>
  447. </div>
  448. </div>
  449. <div class="ui small modal" id="delete-repo-modal">
  450. <div class="header">
  451. {{.i18n.Tr "repo.settings.delete"}}
  452. </div>
  453. <div class="content">
  454. <div class="ui warning message text left">
  455. {{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
  456. {{.i18n.Tr "repo.settings.delete_notices_2" .Repository.FullName | Safe}}
  457. {{if .Repository.NumForks}}<br>
  458. {{.i18n.Tr "repo.settings.delete_notices_fork_1"}}
  459. {{end}}
  460. </div>
  461. <form class="ui form" action="{{.Link}}" method="post">
  462. {{.CsrfTokenHtml}}
  463. <input type="hidden" name="action" value="delete">
  464. <div class="field">
  465. <label>
  466. {{.i18n.Tr "repo.settings.transfer_form_title"}}
  467. <span class="text red">{{.Repository.Name}}</span>
  468. </label>
  469. </div>
  470. <div class="required field">
  471. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  472. <input id="repo_name" name="repo_name" required>
  473. </div>
  474. <div class="text right actions">
  475. <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
  476. <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
  477. </div>
  478. </form>
  479. </div>
  480. </div>
  481. {{if .Repository.UnitEnabled $.UnitTypeWiki}}
  482. <div class="ui small modal" id="delete-wiki-modal">
  483. <div class="header">
  484. {{.i18n.Tr "repo.settings.wiki_delete"}}
  485. </div>
  486. <div class="content">
  487. <div class="ui warning message text left">
  488. {{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
  489. {{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
  490. </div>
  491. <form class="ui form" action="{{.Link}}" method="post">
  492. {{.CsrfTokenHtml}}
  493. <input type="hidden" name="action" value="delete-wiki">
  494. <div class="field">
  495. <label>
  496. {{.i18n.Tr "repo.settings.transfer_form_title"}}
  497. <span class="text red">{{.Repository.Name}}</span>
  498. </label>
  499. </div>
  500. <div class="required field">
  501. <label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  502. <input id="repo_name" name="repo_name" required>
  503. </div>
  504. <div class="text right actions">
  505. <div class="ui cancel button">{{.i18n.Tr "settings.cancel"}}</div>
  506. <button class="ui red button">{{.i18n.Tr "repo.settings.confirm_wiki_delete"}}</button>
  507. </div>
  508. </form>
  509. </div>
  510. </div>
  511. {{end}}
  512. {{if not .Repository.IsMirror}}
  513. <div class="ui basic modal" id="archive-repo-modal">
  514. <div class="ui icon header">
  515. {{if .Repository.IsArchived}}
  516. {{.i18n.Tr "repo.settings.unarchive.header"}}
  517. {{else}}
  518. {{.i18n.Tr "repo.settings.archive.header"}}
  519. {{end}}
  520. </div>
  521. <div class="content center">
  522. <p>
  523. {{if .Repository.IsArchived}}
  524. {{.i18n.Tr "repo.settings.unarchive.text"}}
  525. {{else}}
  526. {{.i18n.Tr "repo.settings.archive.text"}}
  527. {{end}}
  528. </p>
  529. </div>
  530. <form action="{{.Link}}" method="post">
  531. {{.CsrfTokenHtml}}
  532. <input type="hidden" name="action" value="{{if .Repository.IsArchived}}unarchive{{else}}archive{{end}}">
  533. <input type="hidden" name="repo_id" value="{{.Repository.ID}}">
  534. <div class="center actions">
  535. <div class="ui basic cancel inverted button">{{.i18n.Tr "settings.cancel"}}</div>
  536. <button class="ui basic inverted yellow button">{{.i18n.Tr "modal.yes"}}</button>
  537. </div>
  538. </form>
  539. </div>
  540. {{end}}
  541. {{end}}
  542. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1