blob: 8f41bd245081de2f1c41dc503a70f2dfa0d6064a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<h1 class="text-2xl">Rankings for <%= render "application/components/text/name_and_title", character: @character %></h1>
<div class="my-2">
<%= link_to "Refresh", character_rankings_path %>
</div>
<div class="my-2">
<p>Total Level: <%= @character.total_level %> (Rank <%= @character.total_level_rank %>)</p>
<p>Total XP: <%= @character.total_xp %> (Rank <%= @character.total_xp_rank %>)</p>
</div>
<div class="my-2">
<div>
<table class="table-auto">
<thead>
<tr>
<th class="table-header-padded">Skill</th>
<th class="table-header-padded">Rank</th>
<th class="table-header-padded">Level</th>
<th class="table-header-padded">XP</th>
</tr>
</thead>
<tbody>
<% Skill.all.each do |skill| %>
<% character_skill = @character.character_skills.find_by(skill: skill) %>
<tr>
<td class="table-cell-padded"><%= skill.name %></td>
<td class="table-cell-padded"><%= character_skill.rank %></td>
<td class="table-cell-padded"><%= character_skill.level %></td>
<td class="table-cell-padded"><%= character_skill.xp %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
|