2019-04-01 12:24:22 -04:00
|
|
|
<h1>
|
2019-10-31 17:43:15 -04:00
|
|
|
<a href="<%= @item.url %>" target="_blank" rel="noopener noreferrer"><%= @item.title || "(Untitled)" %></a>
|
2019-04-01 12:24:22 -04:00
|
|
|
</h1>
|
|
|
|
|
2019-02-11 17:22:35 -05:00
|
|
|
<%= if @item.read do %>
|
|
|
|
<%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %>
|
2019-04-01 12:24:22 -04:00
|
|
|
<%= submit "Mark as Unread", class: "btn btn-secondary" %>
|
2019-02-11 17:22:35 -05:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %>
|
2019-04-01 12:24:22 -04:00
|
|
|
<%= submit "Mark as Read", class: "btn btn-secondary" %>
|
2019-02-11 17:22:35 -05:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
2019-04-01 12:24:22 -04:00
|
|
|
<article class="mt-4">
|
2019-02-11 17:22:35 -05:00
|
|
|
<%= raw(@item.content) %>
|
2019-10-31 13:49:35 -04:00
|
|
|
</article>
|