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

25 lines
553 B
Elixir
Raw Normal View History

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>
2019-03-21 23:21:56 +00:00
</table>