Files
something-erlang/lib/something_erlang_web/live/thread_live/show.html.heex

27 lines
749 B
Plaintext
Raw Normal View History

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>
<%= 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 %>
<.post author={post.userinfo} article={post.postbody} date={post.postdate} />
<% end %>
2022-05-23 15:57:15 +02:00
<.pagination socket={@socket} thread={@thread} />
2022-07-25 11:05:55 +02:00
</div>