diff --git a/apps/home/static/home/js/tabs/filters.js b/apps/home/static/home/js/tabs/filters.js
index 6bbd76d..9073601 100644
--- a/apps/home/static/home/js/tabs/filters.js
+++ b/apps/home/static/home/js/tabs/filters.js
@@ -17,11 +17,26 @@ function initFiltersModule() {
},
{
title: "Algorithm",
- data: "matching_algorithm"
+ data: "matching_algorithm",
+ render: function(data) {
+ switch (data) {
+ case 1: return "Any Word";
+ case 2: return "All Words";
+ case 3: return "Exact Match";
+ case 4: return "Regular Expression";
+ case 5: return "Fuzzy Match";
+ default:
+ console.error(`unknown matching algorithm '${data}'`);
+ return data;
+ }
+
+ }
},
{
- title: "Case Insensitive",
- data: "is_insensitive"
+ title: "Case-Sensitive",
+ data: "is_insensitive",
+ className: "text-center",
+ render: data => renderBooleanColumn(!data)
},
{
title: "Type",
diff --git a/apps/home/static/home/js/tabs/styles.js b/apps/home/static/home/js/tabs/styles.js
index a657b43..7345c44 100644
--- a/apps/home/static/home/js/tabs/styles.js
+++ b/apps/home/static/home/js/tabs/styles.js
@@ -20,55 +20,37 @@ function initMessageStylesModule() {
title: "Is Embed",
data: "is_embed",
className: "text-center",
- render: function(data) {
- const iconClass = data ? "bi-check-circle-fill text-success" : "bi-x-circle-fill text-danger";
- return ``;
- }
+ render: renderBooleanColumn
},
{
title: "Is Hyperlinked",
data: "is_hyperlinked",
className: "text-center",
- render: function(data) {
- const iconClass = data ? "bi-check-circle-fill text-success" : "bi-x-circle-fill text-danger";
- return ``;
- }
+ render: renderBooleanColumn
},
{
title: "Show Author",
data: "show_author",
className: "text-center",
- render: function(data) {
- const iconClass = data ? "bi-check-circle-fill text-success" : "bi-x-circle-fill text-danger";
- return ``;
- }
+ render: renderBooleanColumn
},
{
title: "Show Timestamp",
data: "show_timestamp",
className: "text-center",
- render: function(data) {
- const iconClass = data ? "bi-check-circle-fill text-success" : "bi-x-circle-fill text-danger";
- return ``;
- }
+ render: renderBooleanColumn
},
{
title: "Show Images",
data: "show_images",
className: "text-center",
- render: function(data) {
- const iconClass = data ? "bi-check-circle-fill text-success" : "bi-x-circle-fill text-danger";
- return ``;
- }
+ render: renderBooleanColumn
},
{
title: "Fetch Images",
data: "fetch_images",
className: "text-center",
- render: function(data) {
- const iconClass = data ? "bi-check-circle-fill text-success" : "bi-x-circle-fill text-danger";
- return ``;
- }
+ render: renderBooleanColumn
},
{
title: "Title Mutator",