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.

unadopted.tmpl 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content admin user">
  3. {{template "admin/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.locale.Tr "admin.repos.unadopted"}}
  8. <div class="ui right">
  9. <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/repos">{{.locale.Tr "admin.repos.repo_manage_panel"}}</a>
  10. </div>
  11. </h4>
  12. <div class="ui attached segment">
  13. <form class="ui form ignore-dirty">
  14. <div class="ui fluid action input">
  15. <input name="search" value="true" type="hidden">
  16. <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "repo.adopt_search"}}" autofocus>
  17. <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
  18. </div>
  19. </form>
  20. </div>
  21. {{if .search}}
  22. <div class="ui attached segment settings">
  23. {{if .Dirs}}
  24. <div class="ui middle aligned divided list">
  25. {{range $dirI, $dir := .Dirs}}
  26. <div class="item">
  27. <div class="content">
  28. <span class="icon">{{svg "octicon-file-directory-fill"}}</span>
  29. <span class="name">{{$dir}}</span>
  30. <div class="right floated content">
  31. <button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.locale.Tr "repo.adopt_preexisting_label"}}</span></button>
  32. <div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
  33. {{svg "octicon-x" 16 "close inside"}}
  34. <div class="header">
  35. <span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
  36. </div>
  37. <div class="content">
  38. <p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
  39. </div>
  40. <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
  41. {{$.CsrfTokenHtml}}
  42. <input type="hidden" name="id" value="{{$dir}}">
  43. <input type="hidden" name="action" value="adopt">
  44. <input type="hidden" name="q" value="{{$.Keyword}}">
  45. <input type="hidden" name="page" value="{{$.CurrentPage}}">
  46. <div class="actions">
  47. <div class="ui red basic inverted cancel button">
  48. {{svg "octicon-trash" 16 "mr-2"}}
  49. {{$.locale.Tr "modal.no"}}
  50. </div>
  51. <button class="ui green basic inverted ok button">
  52. {{svg "octicon-check" 16 "mr-2"}}
  53. {{$.locale.Tr "modal.yes"}}
  54. </button>
  55. </div>
  56. </form>
  57. </div>
  58. <button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.locale.Tr "repo.delete_preexisting_label"}}</span></button>
  59. <div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
  60. {{svg "octicon-x" 16 "close inside"}}
  61. <div class="header">
  62. <span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
  63. </div>
  64. <div class="content">
  65. <p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
  66. </div>
  67. <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
  68. {{$.CsrfTokenHtml}}
  69. <input type="hidden" name="id" value="{{$dir}}">
  70. <input type="hidden" name="action" value="delete">
  71. <input type="hidden" name="q" value="{{$.Keyword}}">
  72. <input type="hidden" name="page" value="{{$.CurrentPage}}">
  73. <div class="actions">
  74. <div class="ui red basic inverted cancel button">
  75. {{svg "octicon-trash" 16 "mr-2"}}
  76. {{$.locale.Tr "modal.no"}}
  77. </div>
  78. <button class="ui green basic inverted ok button">
  79. {{svg "octicon-check" 16 "mr-2"}}
  80. {{$.locale.Tr "modal.yes"}}
  81. </button>
  82. </div>
  83. </form>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. {{end}}
  89. </div>
  90. {{template "base/paginate" .}}
  91. {{else}}
  92. <div class="item">
  93. {{.locale.Tr "admin.repos.unadopted.no_more"}}
  94. </div>
  95. {{template "base/paginate" .}}
  96. {{end}}
  97. </div>
  98. {{end}}
  99. </div>
  100. </div>
  101. {{template "base/footer" .}}