add global reputations page
This commit is contained in:
5
app/views/wow_reputations/_standing.html.erb
Normal file
5
app/views/wow_reputations/_standing.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<% if standing %>
|
||||
<%= link_to standing.wow_character.name, standing.wow_character %> - <%= standing.wow_reputation.wow_reputation_tier.wow_reputation_tier_levels.find_by(order: standing.tier)&.name %>
|
||||
<% else %>
|
||||
<%= t('wow_reputations.reputation_list.not_discovered') %>
|
||||
<% end %>
|
||||
22
app/views/wow_reputations/index.html.erb
Normal file
22
app/views/wow_reputations/index.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<h2>Reputations list</h2>
|
||||
|
||||
<table class="table table-hover table-dark table-image">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%= t('wow_reputations.reputation_list.name') %></th>
|
||||
<th scope="col"><%= t('wow_reputations.reputation_list.description') %></th>
|
||||
<th scope="col"><%= t('wow_reputations.reputation_list.highest_reputation_character') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wow_reputations.each do |reputation| %>
|
||||
<tr>
|
||||
<td><%= reputation.name %></td>
|
||||
<td><%= reputation.description %></td>
|
||||
<td><%= render partial: 'wow_reputations/standing', locals: { standing: reputation.wow_standings.joins(:wow_character).where(wow_character: { user: current_user }).order(raw: :desc).first } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%== pagy_bootstrap_nav(@pagy) %>
|
||||
Reference in New Issue
Block a user