From ec935a16a319b14e819ead828d1d9875280d9259 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 10 Sep 2023 04:03:15 +0200 Subject: [PATCH] [MODERATION] Modernize frontend (squash) - Unify blocked users list. - Use the new flex list classes for blocked users list to avoid using the CSS helper classes and thereby be consistent in the design. - Fix the modal by using the new modal class. - Remove the icon in the modal as looks too big in the new design. - Fix avatar not displaying as it was passing the context where the user should've been passed. - Don't use italics for 'Blocked since' text. - Use namelink template to display the user's name and homelink. --- templates/org/settings/blocked_users.tmpl | 25 ++------------- templates/shared/blocked_users_list.tmpl | 28 ++++++++++++++++ templates/user/profile.tmpl | 12 +++---- templates/user/settings/blocked_users.tmpl | 37 +++++----------------- web_src/css/org.css | 9 ++---- 5 files changed, 48 insertions(+), 63 deletions(-) create mode 100644 templates/shared/blocked_users_list.tmpl diff --git a/templates/org/settings/blocked_users.tmpl b/templates/org/settings/blocked_users.tmpl index cc95b047d7..4133a43c69 100644 --- a/templates/org/settings/blocked_users.tmpl +++ b/templates/org/settings/blocked_users.tmpl @@ -14,27 +14,8 @@ -
- {{range .BlockedUsers}} -
- {{ctx.AvatarUtils.Avatar $.Context . 48 "gt-mr-3 gt-mb-0"}} -
- {{.Name}} - {{$.locale.Tr "settings.blocked_since" (DateTime "short" .CreatedUnix) | Safe}} -
-
-
- {{$.CsrfTokenHtml}} - - -
-
-
- {{else}} -
- {{$.locale.Tr "settings.blocked_users_none"}} -
- {{end}} -
+
+ {{template "shared/blocked_users_list" dict "locale" .locale "BlockedUsers" .BlockedUsers}} +
{{template "org/settings/layout_footer" .}} diff --git a/templates/shared/blocked_users_list.tmpl b/templates/shared/blocked_users_list.tmpl new file mode 100644 index 0000000000..ba399159e3 --- /dev/null +++ b/templates/shared/blocked_users_list.tmpl @@ -0,0 +1,28 @@ +
+ {{range .BlockedUsers}} +
+
+ {{ctx.AvatarUtils.Avatar . 48}} +
+
+
+ {{template "shared/user/name" .}} +
+
+ {{$.locale.Tr "settings.blocked_since" (DateTime "short" .CreatedUnix) | Safe}} +
+
+
+
+ {{$.CsrfTokenHtml}} + + +
+
+
+ {{else}} +
+ {{$.locale.Tr "settings.blocked_users_none"}} +
+ {{end}} +
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 23fe5bda82..fafeaee3ec 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -40,17 +40,17 @@ -