Skip to content

Commit 387a694

Browse files
committed
fix unadopted tmpl
1 parent 450012d commit 387a694

File tree

4 files changed

+44
-58
lines changed

4 files changed

+44
-58
lines changed

templates/admin/repo/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
22
<div class="admin-setting-content">
33
<h4 class="ui top attached header">
44
{{.locale.Tr "admin.repos.repo_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})

templates/admin/repo/unadopted.tmpl

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
1+
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
22
<div class="admin-setting-content">
33
<h4 class="ui top attached header">
44
{{.locale.Tr "admin.repos.unadopted"}}
@@ -20,45 +20,42 @@
2020
{{if .Dirs}}
2121
<div class="ui aligned divided list">
2222
{{range $dirI, $dir := .Dirs}}
23-
<div class="item">
24-
<div class="content">
25-
<span class="icon">{{svg "octicon-file-directory-fill"}}</span>
26-
<span class="name">{{$dir}}</span>
27-
<div class="right floated content">
28-
<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>
29-
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
30-
<div class="header">
31-
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
32-
</div>
33-
<div class="content">
34-
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
35-
</div>
36-
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
37-
{{$.CsrfTokenHtml}}
38-
<input type="hidden" name="id" value="{{$dir}}">
39-
<input type="hidden" name="action" value="adopt">
40-
<input type="hidden" name="q" value="{{$.Keyword}}">
41-
<input type="hidden" name="page" value="{{$.CurrentPage}}">
42-
{{template "base/modal_actions_confirm" (dict "locale" $.locale)}}
43-
</form>
23+
<div class="item gt-df gt-ac">
24+
<span class="gt-f1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span>
25+
<div>
26+
<button class="ui button green show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{$.locale.Tr "repo.adopt_preexisting_label"}}</button>
27+
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
28+
<div class="header">
29+
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
4430
</div>
45-
<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>
46-
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
47-
<div class="header">
48-
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
49-
</div>
50-
<div class="content">
51-
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
52-
</div>
53-
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
54-
{{$.CsrfTokenHtml}}
55-
<input type="hidden" name="id" value="{{$dir}}">
56-
<input type="hidden" name="action" value="delete">
57-
<input type="hidden" name="q" value="{{$.Keyword}}">
58-
<input type="hidden" name="page" value="{{$.CurrentPage}}">
59-
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
60-
</form>
31+
<div class="content">
32+
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
6133
</div>
34+
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
35+
{{$.CsrfTokenHtml}}
36+
<input type="hidden" name="id" value="{{$dir}}">
37+
<input type="hidden" name="action" value="adopt">
38+
<input type="hidden" name="q" value="{{$.Keyword}}">
39+
<input type="hidden" name="page" value="{{$.CurrentPage}}">
40+
{{template "base/modal_actions_confirm" (dict "locale" $.locale)}}
41+
</form>
42+
</div>
43+
<button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{$.locale.Tr "repo.delete_preexisting_label"}}</button>
44+
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
45+
<div class="header">
46+
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
47+
</div>
48+
<div class="content">
49+
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
50+
</div>
51+
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted">
52+
{{$.CsrfTokenHtml}}
53+
<input type="hidden" name="id" value="{{$dir}}">
54+
<input type="hidden" name="action" value="delete">
55+
<input type="hidden" name="q" value="{{$.Keyword}}">
56+
<input type="hidden" name="page" value="{{$.CurrentPage}}">
57+
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
58+
</form>
6259
</div>
6360
</div>
6461
</div>

templates/user/settings/repos.tmpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{range $dirI, $dir := .Dirs}}
1111
{{$repo := index $.ReposMap $dir}}
1212
<div class="item">
13-
<div class="content">
13+
<div class="content gt-df gt-ac">
1414
{{if $repo}}
1515
{{if $repo.IsPrivate}}
1616
<span class="text gold icon">{{svg "octicon-lock"}}</span>
@@ -23,18 +23,18 @@
2323
{{else}}
2424
<span class="icon">{{svg "octicon-repo"}}</span>
2525
{{end}}
26-
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
27-
<span>{{FileSize $repo.Size}}</span>
26+
<a class="name gt-ml-2" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
27+
<span class="gt-ml-2">{{FileSize $repo.Size}}</span>
2828
{{if $repo.IsFork}}
2929
{{$.locale.Tr "repo.forked_from"}}
30-
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
30+
<span class="gt-ml-2"><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
3131
{{end}}
3232
{{else}}
3333
<span class="icon">{{svg "octicon-file-directory-fill"}}</span>
34-
<span class="name">{{$.ContextUser.Name}}/{{$dir}}</span>
35-
<div class="right floated content">
34+
<span class="name gt-ml-2 gt-f1">{{$.ContextUser.Name}}/{{$dir}}</span>
35+
<div>
3636
{{if $.allowAdopt}}
37-
<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>
37+
<button class="ui button green show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.locale.Tr "repo.adopt_preexisting_label"}}</span></button>
3838
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
3939
<div class="header">
4040
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
@@ -51,7 +51,7 @@
5151
</div>
5252
{{end}}
5353
{{if $.allowDelete}}
54-
<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>
54+
<button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.locale.Tr "repo.delete_preexisting_label"}}</span></button>
5555
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
5656
<div class="header">
5757
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>

web_src/css/user.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,6 @@
9090
padding: 8px 15px;
9191
}
9292

93-
.user .button.adopt,
94-
.user .button.delete {
95-
margin-top: -15px;
96-
margin-bottom: -15px;
97-
}
98-
99-
.user .button.adopt .label,
100-
.user .button.delete .label {
101-
vertical-align: middle;
102-
}
103-
10493
.user.link-account:not(.icon) {
10594
padding-top: 15px;
10695
padding-bottom: 5px;

0 commit comments

Comments
 (0)