improve reputation display and flash messages
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
<h3>Reputation</h3>
|
||||
<h3>Reputations</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 class="accordion" id="wow_reputation_accordion">
|
||||
<% standings.each do |reputation_group| %>
|
||||
<div class="accordion-item">
|
||||
<h3 class="accordion-header" id="heading_<%= reputation_group[0] %>">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse_<%= reputation_group[0] %>" aria-expanded="true" aria-controls="collapse_<%= reputation_group[0] %>">
|
||||
<% if reputation_group[0] %>
|
||||
<%= meta_wow_reputations.find { |n| n.id == reputation_group[0] }.name %>
|
||||
<% else %>
|
||||
Other
|
||||
<% end %>
|
||||
</button>
|
||||
</h3>
|
||||
<div id="collapse_<%= reputation_group[0] %>" class="accordion-collapse collapse collapsed" aria-labelledby="heading_<%= reputation_group[0] %>" data-bs-parent="#wow_reputation_accordion">
|
||||
<% reputation_group[1].each do |standing| %>
|
||||
<div class="accordion-body">
|
||||
<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 %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="col-7">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<%= render partial: 'wow_characters/reputations', locals: { standings: @wow_character.wow_standings } %>
|
||||
<%= render partial: 'wow_characters/reputations', locals: { standings: @wow_character.wow_standings.group_by { |standing| standing.wow_reputation.meta_wow_reputation_id }, meta_wow_reputations: @meta_wow_reputations } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user