This repository has been archived on 2023-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
temple/integration_test/temple_demo/lib/temple_demo_web/templates/post/index.html.exs

34 lines
747 B
Elixir

h1 do: "Listing Posts"
table do
thead do
tr do
th do: "Title"
th do: "Body"
th do: "Published at"
th do: "Author"
th()
end
tbody do
for post <- @posts do
tr do
td do: post.title
td do: post.body
td do: post.published_at
td do: post.author
td do
link "Show", to: Routes.post_path(@conn, :show, post)
link "Edit", to: Routes.post_path(@conn, :edit, post)
link "Delete", to: Routes.post_path(@conn, :delete, post),
method: :delete, data: [confirm: "Are you sure?"]
end
end
end
end
end
end
span do
link "New Post", to: Routes.post_path(@conn, :new)
end