37 lines
1.0 KiB
Elixir
37 lines
1.0 KiB
Elixir
<%= form_tag Routes.feed_path(@conn, :refresh, @feed.id), method: :post do %>
|
|
<%= submit "Refresh Feed" %>
|
|
<% end %>
|
|
|
|
|
|
<%= if @feed.filter_enabled do %>
|
|
<%= form_tag Routes.feed_path(@conn, :disable_filter, @feed.id), method: :post do %>
|
|
<%= submit "Disable Filter" %>
|
|
<% end %>
|
|
|
|
<%= form_tag Routes.filter_path(@conn, :edit, @feed.filter.id), method: :get do %>
|
|
<%= submit "Edit Filter" %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= form_tag Routes.feed_path(@conn, :enable_filter, @feed.id), method: :post do %>
|
|
<%= submit "Enable Filter" %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= form_tag Routes.feed_path(@conn, :delete, @feed.id), method: :delete do %>
|
|
<%= submit "Delete Feed" %>
|
|
<% end %>
|
|
|
|
|
|
<table>
|
|
<%= 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 %></a>
|
|
</td>
|
|
<td>
|
|
<% {:ok, date} = Timex.format(item.date, "{YYYY}-{M}-{D} {h12}:{m} {AM}") %>
|
|
<%= date %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table> |