Use the same template for posting statuses
This commit is contained in:
parent
aae48b2500
commit
39b48eb52d
|
@ -0,0 +1,9 @@
|
|||
<%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %>
|
||||
<%= if assigns[:in_reply_to] do %>
|
||||
<input type="hidden" name="in_reply_to" value="<%= @in_reply_to %>">
|
||||
<% end %>
|
||||
<% placeholder = assigns[:placeholder] || "What's up?" %>
|
||||
<% content = assigns[:content] || "" %>
|
||||
<textarea id="content" name="content" rows="5" placeholder="<%= placeholder %>"><%= content %></textarea>
|
||||
<%= submit "Post" %>
|
||||
<% end %>
|
|
@ -1,9 +1,6 @@
|
|||
<h1>Home</h1>
|
||||
|
||||
<%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %>
|
||||
<textarea id="content" name="content" rows="5" placeholder="What's up?" required></textarea>
|
||||
<%= submit "Post" %>
|
||||
<hr>
|
||||
<% end %>
|
||||
<%= render "_post_form.html", conn: @conn %>
|
||||
<hr>
|
||||
|
||||
<%= render "_timeline.html", conn: @conn, statuses_with_authors: @statuses_with_authors %>
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
<%= unless is_nil(@current_user) do %>
|
||||
<hr>
|
||||
|
||||
<%= form_tag Routes.frontend_path(@conn, :post_status), method: :post, class: "compose-status" do %>
|
||||
<input type="hidden" name="in_reply_to" value="<%= @status.data["object"]["id"] %>">
|
||||
<textarea id="content" name="content" rows="5" placeholder="Reply" required><%= mentions_for_replying_to(@conn, @status) %></textarea>
|
||||
<%= submit "Post" %>
|
||||
<hr>
|
||||
<% end %>
|
||||
<%= render "_post_form.html", conn: @conn, in_reply_to: @status.data["object"]["id"], placeholder: "Reply", content: mentions_for_replying_to(@conn, @status) %>
|
||||
<hr>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue