From 3dff083d9def184bf2f71b6e846b389b2fd8cbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 8 Nov 2024 17:26:17 -0500 Subject: [PATCH] refactor: move flags into core --- src/views/flags/detail.tpl | 179 ++++++++++++++++++++ src/views/flags/list.tpl | 6 + src/views/partials/flags/bulk-actions.tpl | 9 ++ src/views/partials/flags/filters.tpl | 188 ++++++++++++++++++++++ src/views/partials/flags/results.tpl | 38 +++++ 5 files changed, 420 insertions(+) create mode 100644 src/views/flags/detail.tpl create mode 100644 src/views/flags/list.tpl create mode 100644 src/views/partials/flags/bulk-actions.tpl create mode 100644 src/views/partials/flags/filters.tpl create mode 100644 src/views/partials/flags/results.tpl diff --git a/src/views/flags/detail.tpl b/src/views/flags/detail.tpl new file mode 100644 index 0000000000..6c8cd657f3 --- /dev/null +++ b/src/views/flags/detail.tpl @@ -0,0 +1,179 @@ + + +
+
+
+ + + [[flags:go-to-target]] + + + {{{ if target.uid }}} +
+ + +
+ {{{ end }}} + + + + [[flags:assign-to-me]] + + + {{{ if type_bool.post }}} + {{{ if !target.deleted}}} + [[flags:delete-post]] + {{{ else }}} + [[flags:purge-post]] + [[flags:restore-post]] + {{{ end }}} + {{{ end }}} +
+ +
+
+ + +
+
+ + +
+
+ +
+
+ +
+

[[flags:history]]

+ {{{ if !history.length }}} +
[[flags:no-history]]
+ {{{ end }}} + {{{ each history }}} +
+ +
+
    + {{{ each ./fields }}} +
  • + [[flags:{@key}]]{{{ if @value }}} → {@value}{{{ end }}} +
  • + {{{ end }}} + {{{ each ./meta }}} +
  • + {{./key}}{{{ if ./value }}} → {./value}{{{ end }}} +
  • + {{{ end }}} +
+
+
+ {{{ end }}} +
+
+
+
+

+ {target_readable} +

+
+ {{{ if type_bool.post }}} + +
{target.content}
+ {{{ end }}} + + {{{ if type_bool.user }}} + +
{{{ if target.aboutme }}}{target.aboutme}{{{ else }}}[[flags:target-aboutme-empty]]{{{ end }}}
+ {{{ end }}} + + {{{ if type_bool.empty }}} + + {{{ end }}} +
+
+

[[flags:reports]]

+ +
+
+
+

[[flags:notes]]

+ +
+ +
+
+
+
diff --git a/src/views/flags/list.tpl b/src/views/flags/list.tpl new file mode 100644 index 0000000000..1e5aa05930 --- /dev/null +++ b/src/views/flags/list.tpl @@ -0,0 +1,6 @@ + + +
+ + +
diff --git a/src/views/partials/flags/bulk-actions.tpl b/src/views/partials/flags/bulk-actions.tpl new file mode 100644 index 0000000000..31a6242a9e --- /dev/null +++ b/src/views/partials/flags/bulk-actions.tpl @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/src/views/partials/flags/filters.tpl b/src/views/partials/flags/filters.tpl new file mode 100644 index 0000000000..69e3c183cb --- /dev/null +++ b/src/views/partials/flags/filters.tpl @@ -0,0 +1,188 @@ +
+ + +
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + + + + + + + + +
+ + + +
+
\ No newline at end of file diff --git a/src/views/partials/flags/results.tpl b/src/views/partials/flags/results.tpl new file mode 100644 index 0000000000..958813cce5 --- /dev/null +++ b/src/views/partials/flags/results.tpl @@ -0,0 +1,38 @@ +
+ [[flags:x-flags-found, {count}]] +
+ + + + + + + + + + + + + {{{ each flags }}} + + + + + + + + {{{end}}} + +
[[flags:reports]][[flags:first-reported]][[flags:state]] + +
+ + {./target_readable} + + + {./heat} + [[flags:state-{./state}]] + +
+ + \ No newline at end of file