30 lines
937 B
Elixir
30 lines
937 B
Elixir
<h2><%= @feed.title %></h2>
|
|
|
|
<%= form_tag Routes.feed_path(@conn, :refresh, @feed.id), method: :post, class: "d-inline" do %>
|
|
<%= submit "Refresh Feed", class: "btn btn-primary" %>
|
|
<% end %>
|
|
|
|
<a class="btn btn-primary" href="<%= Routes.feed_path(@conn, :edit, @feed.id) %>">Edit Feed</a>
|
|
|
|
<%= form_tag Routes.feed_path(@conn, :delete, @feed.id), method: :delete, class: "d-inline" do %>
|
|
<%= submit "Delete Feed", class: "btn btn-danger" %>
|
|
<% end %>
|
|
|
|
<h3 class="mt-4">Items</h3>
|
|
|
|
<table class="table table-striped">
|
|
<tbody>
|
|
<%= for item <- @items do %>
|
|
<tr <%= if item.read do %>class="item-read"<% end %>>
|
|
<td>
|
|
<a href="<%= Routes.item_path(@conn, :show, item.id) %>"><%= item.title || "(Untitled)" %></a>
|
|
</td>
|
|
<td>
|
|
<% {:ok, date} = Timex.format(item.date, "{YYYY}-{M}-{D} {h12}:{m} {AM}") %>
|
|
<%= date %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|