You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
7.9 KiB

  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header" .}}
  5. <div id="setting-wrapper" class="main-wrapper">
  6. <div id="repo-setting" class="container clear">
  7. {{template "repo/settings/nav" .}}
  8. <div class="grid-4-5 left">
  9. <div class="setting-content">
  10. {{template "ng/base/alert" .}}
  11. <div id="setting-content">
  12. <div id="user-profile-setting-content" class="panel panel-radius">
  13. <div class="panel-header">
  14. <strong>{{.i18n.Tr "repo.settings.basic_settings"}}</strong>
  15. </div>
  16. <form class="form form-align panel-body" id="repo-setting-form" action="{{.RepoLink}}/settings" method="post">
  17. {{.CsrfTokenHtml}}
  18. <input type="hidden" name="action" value="update">
  19. <div class="field">
  20. <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  21. <input class="ipt ipt-large ipt-radius {{if .Err_RepoName}}ipt-error{{end}}" id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" required />
  22. </div>
  23. <div class="field clear">
  24. <label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
  25. <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Repository.Description}}</textarea>
  26. </div>
  27. <div class="field">
  28. <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
  29. <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="site" type="url" value="{{.Repository.Website}}" />
  30. </div>
  31. <hr>
  32. <br>
  33. <div class="field">
  34. <label for="lang">{{.i18n.Tr "repo.default_branch"}}</label>
  35. <select id="lang" name="gitignore">
  36. {{if .Repository.DefaultBranch}}<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>{{end}}
  37. {{range .Branches}}
  38. {{if not (eq . $.Repository.DefaultBranch)}}<option value="{{.}}">{{.}}</option>{{end}}
  39. {{end}}
  40. </select>
  41. </div>
  42. {{if .Repository.IsMirror}}
  43. <div class="field">
  44. <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
  45. <input class="ipt ipt-large ipt-radius {{if .Err_Interval}}ipt-error{{end}}" id="interval" name="interval" type="number" value="{{.MirrorInterval}}" />
  46. </div>
  47. {{end}}
  48. <div class="field">
  49. <label for="visibility">{{.i18n.Tr "repo.visibility"}}</label>
  50. <input class="ipt-chk" id="visibility" name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}} />
  51. <span>{{.i18n.Tr "repo.visiblity_helper" | Str2html}}</span>
  52. </div>
  53. <div class="field">
  54. <label for="goget">{{.i18n.Tr "repo.goget_meta"}}</label>
  55. <input class="ipt-chk" id="goget" name="goget" type="checkbox" {{if .Repository.IsGoget}}checked{{end}} />
  56. <span>{{.i18n.Tr "repo.goget_meta_helper" | Str2html}}</span>
  57. </div>
  58. <div class="field">
  59. <span class="form-label"></span>
  60. <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "repo.settings.update_settings"}}</button>
  61. </div>
  62. </form>
  63. </div>
  64. </div>
  65. </div>
  66. <br>
  67. <div class="setting-content">
  68. <div id="setting-content">
  69. <div id="user-profile-setting-content" class="panel panel-warning panel-radius">
  70. <div class="panel-header">
  71. <strong>{{.i18n.Tr "repo.settings.danger_zone"}}</strong>
  72. </div>
  73. <div class="panel-body">
  74. <div class="repo-setting-zone">
  75. <button class="btn btn-gray btn-large btn-radius right" id="transfer-button">{{.i18n.Tr "repo.settings.transfer"}}</button>
  76. <dt>{{.i18n.Tr "repo.settings.transfer"}}</dt>
  77. <dl>{{.i18n.Tr "repo.settings.transfer_desc"}}</dl>
  78. <div class="hide" id="transfer-form">
  79. <br>
  80. <form class="form-align form panel container panel-radius" action="{{.RepoLink}}/settings" method="post">
  81. {{.CsrfTokenHtml}}
  82. <input type="hidden" name="action" value="transfer">
  83. <div class="panel-content">
  84. <div class="field">
  85. <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  86. <input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required />
  87. </div>
  88. <label class="req" for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
  89. <input class="ipt ipt-large ipt-radius" id="new_owner_name" name="new_owner_name" required/>
  90. <span class="form-label"></span>
  91. <button class="btn btn-large btn-red btn-radius right">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
  92. </div>
  93. </form>
  94. </div>
  95. </div>
  96. <hr>
  97. <div class="repo-setting-zone">
  98. <button class="btn btn-gray btn-large btn-radius pull-right" id="delete-button">{{.i18n.Tr "repo.settings.delete"}}</button>
  99. <dt>{{.i18n.Tr "repo.settings.delete"}}</dt>
  100. <dl>{{.i18n.Tr "repo.settings.delete_desc"}}</dl>
  101. <div class="hide" id="delete-form">
  102. <br>
  103. <form class="form-align form panel container panel-radius" action="{{.RepoLink}}/settings" method="post">
  104. {{.CsrfTokenHtml}}
  105. <input type="hidden" name="action" value="delete">
  106. <div class="panel-content">
  107. <div class="field">
  108. <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
  109. <input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required />
  110. </div>
  111. <label class="req" for="password">{{.i18n.Tr "password"}}</label>
  112. <input class="ipt ipt-large ipt-radius" id="password" name="password" type="password" required/>
  113. <span class="form-label"></span>
  114. <button class="btn btn-large btn-red btn-radius right">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
  115. </div>
  116. </form>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. {{template "ng/base/footer" .}}