From 4c9adb33367fa1c69b6a5459c8dde0e6c6194e89 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 24 May 2020 22:49:32 -0400 Subject: [PATCH] Don't show reply form unless logged in --- lib/clacks_web/templates/frontend/status.html.eex | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/clacks_web/templates/frontend/status.html.eex b/lib/clacks_web/templates/frontend/status.html.eex index 51178d5..ca4eb18 100644 --- a/lib/clacks_web/templates/frontend/status.html.eex +++ b/lib/clacks_web/templates/frontend/status.html.eex @@ -1,10 +1,12 @@ <%= render "_status.html", conn: @conn, author: @author, status: @status, note: @status.data["object"] %> -
- -<%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %> - "> - - <%= submit "Post" %> +<%= unless is_nil(@current_user) do %>
+ + <%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %> + "> + + <%= submit "Post" %> +
+ <% end %> <% end %>