From 543a83cb817e78623006f087bc98695df33a72ea Mon Sep 17 00:00:00 2001
From: Cy
Date: Sun, 31 May 2020 00:51:15 +0000
Subject: [PATCH] Add open_details preference
Add a preference to open details by default.
---
brutaldon/models.py | 5 ++++-
brutaldon/templates/main/toot_partial.html | 6 +++++-
brutaldon/templates/setup/settings.html | 18 ++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/brutaldon/models.py b/brutaldon/models.py
index b8cb58f..ebffb3f 100644
--- a/brutaldon/models.py
+++ b/brutaldon/models.py
@@ -54,7 +54,10 @@ class Preference(models.Model):
default=False,
help_text=_(
'Show preview for media marked as "sensitive"'))
-
+ open_detail = models.BooleanField(
+ default=False,
+ help_text=_(
+ 'Open details (posts with subjects) by default'))
no_javascript = models.BooleanField(
default=False,
help_text=_(
diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html
index 2dfca7c..a8954df 100644
--- a/brutaldon/templates/main/toot_partial.html
+++ b/brutaldon/templates/main/toot_partial.html
@@ -41,7 +41,11 @@
{% endif %}
{% if toot.spoiler_text %}
-
+
{{ toot.spoiler_text }}
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
diff --git a/brutaldon/templates/setup/settings.html b/brutaldon/templates/setup/settings.html
index 3c37240..d074381 100644
--- a/brutaldon/templates/setup/settings.html
+++ b/brutaldon/templates/setup/settings.html
@@ -37,6 +37,24 @@
{% render_field form.preview_sensitive class+="checkbox" %}
{{ form.preview_sensitive.label }}
+
+
+
+ {{ form.preview_sensitive.help_text }}
+
+
+
+
+
+
+
+
+
+ {{ form.open_detail.help_text }}
+
Timeline Options