frenzy/lib/frenzy_web/templates/group/index.html.eex

27 lines
570 B
Elixir
Raw Permalink Normal View History

<h1>Groups</h1>
2019-04-01 16:24:22 +00:00
<a href="<%= Routes.group_path(@conn, :new) %>" class="btn btn-primary">Add Group</a>
2019-03-21 23:21:56 +00:00
2019-04-01 16:24:22 +00:00
<table class="table table-striped mt-4">
<thead>
2019-03-21 23:21:56 +00:00
<tr>
2019-04-01 16:24:22 +00:00
<th>Name</th>
<th></th>
2019-03-21 23:21:56 +00:00
</tr>
2019-04-01 16:24:22 +00:00
</thead>
<tbody>
<%= for group <- @groups do %>
<tr>
<td>
<a href="/groups/<%= group.id %>"><%= group.title %></a>
</td>
<td>
<%= case Enum.count(group.feeds) do
1 -> "1 feed"
count -> "#{count} feeds"
end %>
</td>
</tr>
<% end %>
</tbody>
</table>