summaryrefslogtreecommitdiff
path: root/app/views/characters
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/characters')
-rw-r--r--app/views/characters/bestiary/index.html.erb22
-rw-r--r--app/views/characters/show.html.erb1
2 files changed, 23 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 %>
diff --git a/app/views/characters/show.html.erb b/app/views/characters/show.html.erb
index 02f2f55..96a87f8 100644
--- a/app/views/characters/show.html.erb
+++ b/app/views/characters/show.html.erb
@@ -5,6 +5,7 @@
<div class="text-lg text-display mb-4">
<ul class="flex flex-row">
<li class="mr-2"><%= link_to "Titles", character_titles_path(@character) %></li>
+ <li class="mr-2"><%= link_to "Bestiary", character_bestiary_path(@character) %></li>
<li class="mr-2"><%= link_to "Rankings", character_rankings_path(@character) %></li>
</ul>
</div>