49 lines
1.4 KiB
Elixir
49 lines
1.4 KiB
Elixir
<h1 class="feed-title">
|
|
<%= if @feed.favicon do %>
|
|
<img src="<%= @feed.favicon %>" alt="<%= @feed.title %> favicon" class="favicon">
|
|
<% end %>
|
|
<%= @feed.title %>
|
|
</h1>
|
|
|
|
<%= 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>
|
|
|
|
<%= unless is_nil(@prev_page_path) do %>
|
|
<p class="text-center">
|
|
<a href="<%= @prev_page_path %>" class="pagination-link">Newer</a>
|
|
</p>
|
|
<% end %>
|
|
|
|
<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>
|
|
<%= if item.date do %>
|
|
<% {:ok, date} = Timex.format(item.date, "{YYYY}-{0M}-{0D} {0h12}:{m} {AM}") %>
|
|
<%= date %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= unless is_nil(@next_page_path) do %>
|
|
<p class="text-center">
|
|
<a href="<%= @next_page_path %>" class="pagination-link">Older</a>
|
|
</p>
|
|
<% end %>
|