From b8178b650c781d8a4450c88564ef6e0164660e6a Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 18:15:36 +0700 Subject: [PATCH 01/10] fix: make community search page retain fields Make community search page retain `topic_id`, `language_id`, and `search` Refs: #362 --- app/templates/list_communities.html | 60 +++++++++++++++++++---------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index 98416594..edf0675a 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -27,27 +27,45 @@
- {% if topics -%} -
Topic: - -
- {% endif -%} - {% if languages -%} -
Language: - -
- {% endif -%} -
+
+ {% if topics -%} +
+ Topic: + +
+ {% endif -%} + {% if languages -%} +
+ Language: + +
+ {% endif -%} +
+ +
+
From 3e91ee34f791c3973b735aa8913def73b1e3dee6 Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 19:58:37 +0700 Subject: [PATCH 02/10] feat: make community search community name sort Refs: #362 --- app/templates/list_communities.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index edf0675a..8f2b50f5 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -85,9 +85,18 @@ - {{ _('Community') }} + {{ _('Posts') }} From 61963a43dc354de9362a54b480e48a3484477bf3 Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 20:03:13 +0700 Subject: [PATCH 03/10] feat: make community search retain post_count sort Refs: #362 --- app/templates/list_communities.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index 8f2b50f5..919edbb4 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -99,9 +99,18 @@ - {{ _('Posts') }} + {{ _('Comments') }} From 8dd3d3de9330fdf3edf41725803e5219ab1b7905 Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 20:06:52 +0700 Subject: [PATCH 04/10] feat: make community search retain sort method Make community search retain post_reply_count sort method. Refs: #362 --- app/templates/list_communities.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index 919edbb4..d56119f9 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -116,6 +116,18 @@ {{ _('Comments') }} + {{ _('Active') }} From 8ffd02651ceed261f3716f12fd02918172e31781 Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 20:08:40 +0700 Subject: [PATCH 05/10] chore: remove unused link on table header Refs: #362 --- app/templates/list_communities.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index d56119f9..193bb3e0 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -113,9 +113,6 @@ - {{ _('Comments') }} - - - {{ _('Active') }} + From bad1839c148c0ac9fb1d42b3ca42e5b00dc3bb4a Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 20:13:52 +0700 Subject: [PATCH 07/10] fix: fix title attribute Fix title attribute for the button on post count table column header. Refs: #362 --- app/templates/list_communities.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index 65659530..235d06c3 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -105,7 +105,7 @@ hx-include="form[action='/communities']" hx-target="body" hx-push-url="true" - title="{{ _('Sort by name') }}" + title="{{ _('Sort by post count') }}" class="btn" > {{ _('Posts') }} From 2d2e18abf753ad7ba4c287cdbb1e88283f7c3609 Mon Sep 17 00:00:00 2001 From: hono4kami Date: Tue, 17 Dec 2024 20:28:10 +0700 Subject: [PATCH 08/10] fix: fix can only search by All communities Refs: #362 --- app/templates/list_communities.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index 235d06c3..cf945314 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -27,7 +27,8 @@
-
@@ -86,7 +87,7 @@