diff options
author | David Gay <david@davidgay.org> | 2021-06-15 21:52:49 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-15 21:54:32 -0400 |
commit | 637adf2963f174c3e3e3d6cf9efbff314e306f3e (patch) | |
tree | 4e4812f66848a751b12adda81f7c500c0a689116 /app/views/characters/bestiary | |
parent | f637f622af2d9b891271344ef23402c41419b3fe (diff) |
MonsterKills and bestiary view
Diffstat (limited to 'app/views/characters/bestiary')
-rw-r--r-- | app/views/characters/bestiary/index.html.erb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/characters/bestiary/index.html.erb b/app/views/characters/bestiary/index.html.erb new file mode 100644 index 0000000..f7376e9 --- /dev/null +++ b/app/views/characters/bestiary/index.html.erb @@ -0,0 +1,22 @@ +<h1 class="text-3xl mb-4">Bestiary</h1> + +<% if @monster_kills.any? %> + <table class="table-auto"> + <thead> + <tr> + <th class="table-header-padded">Monster</th> + <th class="table-header-padded">Kills</th> + </tr> + </thead> + <tbody> + <% @monster_kills.ordered_by_monster_name.each do |mk| %> + <tr> + <td class="table-cell-padded"><%= mk.monster.name %></td> + <td class="table-cell-padded"><%= mk.quantity %></td> + </tr> + <% end %> + </tbody> + </table> +<% else %> + <p>You haven't killed any monsters yet.</p> +<% end %> |