From 83022013c83feb5488952baea3ef0be818dfce21 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 28 Apr 2023 09:48:41 +0800 Subject: [PATCH] Fix layouts of admin table / adapt repo / email test (#24370) Ref: https://github.com/go-gitea/gitea/pull/24315#pullrequestreview-1403034993 And fix the incorrect layout for "dasbboard", the "form" shouldn't follow `

`, so move it to inner. Diff with ignoring spaces: https://github.com/go-gitea/gitea/pull/24370/files?diff=unified&w=1 A known bug: the adapt/delete button doesn't work due to a historical messy logic, will fix it in next PR (#24374) ![image](https://user-images.githubusercontent.com/2114189/234754656-d160b098-b8d4-4783-962a-27d5c764863c.png) ![image](https://user-images.githubusercontent.com/2114189/234762327-3e77e2e4-a156-4498-8a8b-092e14cf9204.png) ![image](https://user-images.githubusercontent.com/2114189/234767811-74b7272c-e40c-4850-8e3c-499e3b53b827.png) ![image](https://user-images.githubusercontent.com/2114189/234761247-e6aad889-dcad-443c-948f-2d44df68725b.png) --- options/locale/locale_en-US.ini | 1 + templates/admin/config.tmpl | 18 +++-- templates/admin/dashboard.tmpl | 10 +-- templates/admin/repo/list.tmpl | 2 +- templates/admin/repo/unadopted.tmpl | 75 +++++++++---------- .../repo/settings/webhook/base_list.tmpl | 2 +- templates/user/settings/repos.tmpl | 12 +-- web_src/css/admin.css | 21 ++---- web_src/css/runner.css | 4 + web_src/css/user.css | 11 --- 10 files changed, 69 insertions(+), 87 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index fb21ee2ec4..3fff13c5a2 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2959,6 +2959,7 @@ config.mailer_sendmail_timeout = Sendmail Timeout config.mailer_use_dummy = Dummy config.test_email_placeholder = Email (e.g. test@example.com) config.send_test_mail = Send Testing Email +config.send_test_mail_submit = Send config.test_mail_failed = Failed to send a testing email to "%s": %v config.test_mail_sent = A testing email has been sent to "%s". diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 136ad38f16..f0d0ad3643 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -238,16 +238,18 @@
{{.Mailer.SMTPPort}}
{{end}}
{{.locale.Tr "admin.config.mailer_user"}}
-
{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}

-
- {{.CsrfTokenHtml}} -
-
+
{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}
+
+
{{.locale.Tr "admin.config.send_test_mail"}}
+
+ + {{.CsrfTokenHtml}} +
-
- - + + + {{end}}
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 0aa95c0e73..6784451376 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -16,9 +16,9 @@

{{.locale.Tr "admin.dashboard.operations"}}

-
- {{.CsrfTokenHtml}} -
+
+ + {{.CsrfTokenHtml}} @@ -71,8 +71,8 @@
-
- + +

{{.locale.Tr "admin.dashboard.system_status"}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index 3d09f2de23..515ec78a34 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -1,4 +1,4 @@ -{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}

{{.locale.Tr "admin.repos.repo_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index 3e47447178..27898a1854 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -1,4 +1,4 @@ -{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}

{{.locale.Tr "admin.repos.unadopted"}} @@ -18,47 +18,44 @@ {{if .search}}
{{if .Dirs}} -
+
{{range $dirI, $dir := .Dirs}} -
-
- {{svg "octicon-file-directory-fill"}} - {{$dir}} -
- -