2022-05-23 15:57:15 +02:00
|
|
|
<%= if @live_action in [:edit] do %>
|
|
|
|
<.modal return_to={Routes.thread_show_path(@socket, :show, @thread)}>
|
|
|
|
<.live_component
|
|
|
|
module={SomethingErlangWeb.ThreadLive.FormComponent}
|
|
|
|
id={@thread.id}
|
|
|
|
title={@page_title}
|
|
|
|
action={@live_action}
|
|
|
|
thread={@thread}
|
|
|
|
return_to={Routes.thread_show_path(@socket, :show, @thread)}
|
|
|
|
/>
|
|
|
|
</.modal>
|
|
|
|
<% end %>
|
|
|
|
|
2022-07-25 11:05:55 +02:00
|
|
|
<h2>
|
2022-08-02 13:24:07 +02:00
|
|
|
<%= raw @thread.title %>
|
2022-07-25 11:05:55 +02:00
|
|
|
</h2>
|
2022-05-23 15:57:15 +02:00
|
|
|
|
2022-07-25 11:05:55 +02:00
|
|
|
<div class="thread my-8">
|
|
|
|
<.pagination socket={@socket} thread={@thread} />
|
2022-05-23 15:57:15 +02:00
|
|
|
|
2022-07-25 11:05:55 +02:00
|
|
|
<%= for post <- @thread.posts do %>
|
2022-08-02 13:24:07 +02:00
|
|
|
<.post author={post.userinfo} article={post.postbody} date={post.postdate} />
|
|
|
|
<% end %>
|
2022-05-23 15:57:15 +02:00
|
|
|
|
2022-08-02 13:24:07 +02:00
|
|
|
<.pagination socket={@socket} thread={@thread} />
|
2022-07-25 11:05:55 +02:00
|
|
|
</div>
|