22 lines
712 B
Elixir
22 lines
712 B
Elixir
<h1>
|
|
<a href="<%= @item.url %>" target="_blank" rel="noopener noreferrer"><%= @item.title || "(Untitled)" %></a>
|
|
</h1>
|
|
|
|
<div class="item-controls">
|
|
<a href="<%= Routes.feed_path(@conn, :show, @item.feed_id) %>" class="mr-2"><%= @item.feed.title %></a>
|
|
|
|
<%= if @item.read do %>
|
|
<%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %>
|
|
<%= submit "Mark as Unread", class: "btn btn-sm btn-secondary" %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %>
|
|
<%= submit "Mark as Read", class: "btn btn-sm btn-secondary" %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<article class="mt-4">
|
|
<%= raw(@item.content) %>
|
|
</article>
|