Expand subject content automatically when config is set.
authorPhil Hagelberg <phil@hagelb.org>
Wed, 6 Nov 2019 05:37:46 +0000 (21:37 -0800)
committerPhil Hagelberg <phil@hagelb.org>
Sun, 10 Nov 2019 02:08:08 +0000 (18:08 -0800)
lib/pleroma/web/static_fe/static_fe_view.ex
lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex

index 5612a06bb0b01121e543e017ad00000554bb98a4..72e66772844392c908169b7d46efd96ed8a439fe 100644 (file)
@@ -38,4 +38,11 @@ defmodule Pleroma.Web.StaticFE.StaticFEView do
   end
 
   def instance_name, do: Pleroma.Config.get([:instance, :name], "Pleroma")
+
+  def open_content? do
+    Pleroma.Config.get(
+      [:frontend_configurations, :collapse_message_with_subjects],
+      true
+    )
+  end
 end
index 2a46dadb4fe6ca5b247a9669b0541169278b3aa9..df5e5eeddb3172d747d05299b0a5e065ce332e65 100644 (file)
@@ -5,7 +5,7 @@
   <%= render("_user_card.html", %{user: @user}) %>
   <div class="activity-content">
     <%= if @title != "" do %>
-      <details>
+      <details <%= if open_content?() do %>open<% end %>>
         <summary><%= raw @title %></summary>
         <div class="e-content"><%= raw @content %></div>
       </details>