summaryrefslogtreecommitdiff
path: root/app/views/characters/titles/index.html.erb
blob: 3fb2781b053ae8d268181318dc0f71fa7d6de248 (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
<h1 class="text-3xl mb-4">Titles</h1>

<p class="mb-4">Here are the titles you've earned. Though they are forever yours until the end of these realms,
  you may only display one at a time. How do you wish to be known?</p>

<table class="table-auto">
  <thead>
  <tr>
    <th class="table-header-padded">Displayed?</th>
    <th class="table-header-padded">Title</th>
    <th class="table-header-padded"></th>
  </tr>
  </thead>
  <tbody>
  <% @title_awards.each do |title_award| %>
    <tr>
      <td><%= title_award.title == @character.active_title ? "Yes️" : "" %></td>
      <td class="table-cell-padded">
        <%= render "application/components/text/title", title: title_award.title %>
      </td>
      <td class="table-cell-padded">
        <%= button_to "Display", character_title_activate_path(title_id: title_award.title.id) %>
      </td>
    </tr>
  <% end %>
  </tbody>
</table>

<% unless @title_awards.any? %>
  <p>You haven't earned any titles, but fret not. The time has come for champions of all kinds.
    Your hour is not far off.</p>
<% end %>