add reputation view and improve queries

This commit is contained in:
2021-05-02 00:55:20 +02:00
parent d227cdc87c
commit 1533f539da
9 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
<h3>Reputation</h3>
<% standings.each do |standing| %>
<div>
<h5><%= standing.wow_reputation.name %></h5>
<%= render partial: 'wow_characters/standing', locals: { standing: standing, tier: standing.wow_reputation.wow_reputation_tier.wow_reputation_tier_levels[standing.tier] } %>
</div>
<% end %>

View File

@@ -0,0 +1,3 @@
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: <%= reput_pourcentage(standing, tier) %>%" aria-valuenow="<%= standing.raw %>" aria-valuemin="<%= tier.min_value %>" aria-valuemax="<%= tier.max_value %>"><%= tier.name %></div>
</div>

View File

@@ -16,6 +16,10 @@
</div>
</div>
<div class="col-7">
Post du perso
<div class="row">
<div class="col-6">
<%= render partial: 'wow_characters/reputations', locals: { standings: @wow_character.wow_standings } %>
</div>
</div>
</div>
</div>