17 lines
479 B
Elixir
17 lines
479 B
Elixir
<h1>
|
|
<a href="<%= @item.url %>"><%= @item.title %></a>
|
|
</h1>
|
|
|
|
<%= if @item.read do %>
|
|
<%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %>
|
|
<%= submit "Mark as Unread", class: "btn btn-secondary" %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %>
|
|
<%= submit "Mark as Read", class: "btn btn-secondary" %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<article class="mt-4">
|
|
<%= raw(@item.content) %>
|
|
</article> |