|
5 | 5 | {{template "base/alert" .}}
|
6 | 6 | <h4 class="ui top attached header">
|
7 | 7 | {{.i18n.Tr "admin.repos.unadopted"}}
|
8 |
| - <div class="ui right"> |
9 |
| - <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repos.repo_manage_panel"}}</a> |
10 |
| - </div> |
| 8 | + <div class="ui right"> |
| 9 | + <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repos.repo_manage_panel"}}</a> |
| 10 | + </div> |
11 | 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="{{.i18n.Tr "repo.adopt_search"}}" autofocus> |
17 |
| - <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> |
18 |
| - </div> |
19 |
| - </form> |
| 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="{{.i18n.Tr "repo.adopt_search"}}" autofocus> |
| 17 | + <button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> |
| 18 | + </div> |
| 19 | + </form> |
20 | 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"}}</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">{{$.i18n.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">{{$.i18n.Tr "repo.adopt_preexisting"}}</span> |
36 |
| - </div> |
37 |
| - <div class="content"> |
38 |
| - <p>{{$.i18n.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 |
| - {{$.i18n.Tr "modal.no"}} |
50 |
| - </div> |
51 |
| - <button class="ui green basic inverted ok button"> |
52 |
| - {{svg "octicon-check" 16 "mr-2"}} |
53 |
| - {{$.i18n.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">{{$.i18n.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">{{$.i18n.Tr "repo.delete_preexisting"}}</span> |
63 |
| - </div> |
64 |
| - <div class="content"> |
65 |
| - <p>{{$.i18n.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 |
| - {{$.i18n.Tr "modal.no"}} |
77 |
| - </div> |
78 |
| - <button class="ui green basic inverted ok button"> |
79 |
| - {{svg "octicon-check" 16 "mr-2"}} |
80 |
| - {{$.i18n.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 |
| - {{.i18n.Tr "admin.repos.unadopted.no_more"}} |
94 |
| - </div> |
95 |
| - {{template "base/paginate" .}} |
96 |
| - {{end}} |
97 |
| - </div> |
98 |
| - {{end}} |
99 |
| - </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"}}</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">{{$.i18n.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">{{$.i18n.Tr "repo.adopt_preexisting"}}</span> |
| 36 | + </div> |
| 37 | + <div class="content"> |
| 38 | + <p>{{$.i18n.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 | + {{$.i18n.Tr "modal.no"}} |
| 50 | + </div> |
| 51 | + <button class="ui green basic inverted ok button"> |
| 52 | + {{svg "octicon-check" 16 "mr-2"}} |
| 53 | + {{$.i18n.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">{{$.i18n.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">{{$.i18n.Tr "repo.delete_preexisting"}}</span> |
| 63 | + </div> |
| 64 | + <div class="content"> |
| 65 | + <p>{{$.i18n.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 | + {{$.i18n.Tr "modal.no"}} |
| 77 | + </div> |
| 78 | + <button class="ui green basic inverted ok button"> |
| 79 | + {{svg "octicon-check" 16 "mr-2"}} |
| 80 | + {{$.i18n.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 | + {{.i18n.Tr "admin.repos.unadopted.no_more"}} |
| 94 | + </div> |
| 95 | + {{template "base/paginate" .}} |
| 96 | + {{end}} |
| 97 | + </div> |
| 98 | + {{end}} |
| 99 | + </div> |
100 | 100 | </div>
|
101 | 101 |
|
102 | 102 | {{template "base/footer" .}}
|
0 commit comments