2019-11-09 18:21:45 +00:00
|
|
|
<h1><%= @group.title %></h1>
|
2019-03-21 23:21:56 +00:00
|
|
|
|
2020-06-01 22:51:45 +00:00
|
|
|
<a href="<%= Routes.group_path(@conn, :edit, @group.id) %>" class="btn btn-primary">Edit Group</a>
|
|
|
|
<%= form_tag Routes.group_path(@conn, :delete, @group.id), method: :delete, class: "d-inline" do %>
|
2020-06-01 22:45:02 +00:00
|
|
|
<%= submit "Delete Group", class: "btn btn-danger" %>
|
|
|
|
<% end %>
|
|
|
|
|
2020-06-01 22:51:45 +00:00
|
|
|
<%= form_for @create_feed_changeset, Routes.feed_path(@conn, :create), [class: "mt-2 mb-2"], fn form -> %>
|
2019-03-21 23:21:56 +00:00
|
|
|
<%= hidden_input form, :group_id %>
|
2020-06-01 22:45:02 +00:00
|
|
|
<div class="row">
|
2019-04-01 16:24:22 +00:00
|
|
|
<%= label form, :feed_url, "Feed URL", class: "col-sm-2 col-form-label" %>
|
2020-06-01 22:45:02 +00:00
|
|
|
<div class="col-sm-8">
|
2019-04-01 16:24:22 +00:00
|
|
|
<%= text_input form, :feed_url, placeholder: "https://example.com/feed.xml", class: "form-control" %>
|
|
|
|
</div>
|
2020-06-01 22:45:02 +00:00
|
|
|
<div class="col-sm-2">
|
2019-04-01 16:24:22 +00:00
|
|
|
<%= submit "Add Feed", class: "btn btn-primary" %>
|
|
|
|
</div>
|
2019-03-21 23:21:56 +00:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
2020-06-02 02:38:27 +00:00
|
|
|
<a href="<%= Routes.group_path(@conn, :read, @group.id) %>" class="btn btn-secondary">Read Articles</a>
|
2019-04-01 16:24:22 +00:00
|
|
|
|
|
|
|
<h3 class="mt-4">Feeds</h3>
|
|
|
|
|
|
|
|
<table class="table table-striped">
|
|
|
|
<tbody>
|
|
|
|
<%= for feed <- @group.feeds do %>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="<%= Routes.feed_path(@conn, :show, feed.id) %>"><%= feed.feed_url %></a>
|
|
|
|
</td>
|
|
|
|
<td>
|
2019-11-10 19:37:06 +00:00
|
|
|
<a href="<%= feed.site_url %>" class="feed-title">
|
|
|
|
<%= if feed.favicon do %>
|
|
|
|
<img src="<%= feed.favicon %>" alt="<%= feed.title %> favicon" class="favicon">
|
|
|
|
<% end %>
|
|
|
|
<%= feed.title %>
|
|
|
|
</a>
|
2019-04-01 16:24:22 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
2019-11-09 18:21:45 +00:00
|
|
|
</table>
|