Show the feed an item is from on the item show page
This commit is contained in:
parent
68a1030660
commit
1603d907c8
|
@ -2,15 +2,19 @@
|
||||||
<a href="<%= @item.url %>" target="_blank" rel="noopener noreferrer"><%= @item.title || "(Untitled)" %></a>
|
<a href="<%= @item.url %>" target="_blank" rel="noopener noreferrer"><%= @item.title || "(Untitled)" %></a>
|
||||||
</h1>
|
</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 %>
|
<%= if @item.read do %>
|
||||||
<%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %>
|
<%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %>
|
||||||
<%= submit "Mark as Unread", class: "btn btn-secondary" %>
|
<%= submit "Mark as Unread", class: "btn btn-sm btn-secondary" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %>
|
<%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %>
|
||||||
<%= submit "Mark as Read", class: "btn btn-secondary" %>
|
<%= submit "Mark as Read", class: "btn btn-sm btn-secondary" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<article class="mt-4">
|
<article class="mt-4">
|
||||||
<%= raw(@item.content) %>
|
<%= raw(@item.content) %>
|
||||||
|
|
|
@ -124,3 +124,11 @@ label.sidebar-toggle > .oi {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-controls a {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-controls form {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue