<commit_before><div class="row">
  <div class="col">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li>
        <li class="breadcrumb-item"><%= link_to("My characters", characters_path) %></li>
        <li class="breadcrumb-item"><%= link_to(@character.name, character_path(@character.character_id)) %></li>
        <li class="breadcrumb-item active" aria-current="page">Wallet Journals</li>
      </ol>
    </nav>
  </div>
</div>

<ul class="nav nav-pills">
  <li class="nav-item">
    <%= link_to("Sheet", character_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Employment History", character_employment_histories_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Agents", character_agents_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_assets %>
    <li class="nav-item">
      <%= link_to("Assets", character_assets_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <li class="nav-item">
    <%= link_to("Loyalty points", character_loyalty_points_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_skillqueue %>
    <li class="nav-item">
      <%= link_to("Skill queue", character_skillqueues_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_skills %>
    <li class="nav-item">
      <%= link_to("Skills", character_skills_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_mails %>
    <li class="nav-item">
      <%= link_to("Mail", character_mails_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_standings %>
    <li class="nav-item">
      <%= link_to("Standings", character_standings_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_journal %>
    <li class="nav-item">
      <%= link_to("Wallet journal", character_wallet_journals_path(@character.character_id), class: "nav-link active") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_transactions %>
    <li class="nav-item">
      <%= link_to("Wallet transactions", nil, class: "nav-link") %>
    </li>
  <% end %>
</ul>

<hr>

<div class="row">
  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <div class="clearfix">
      <h4 class="float-left"><%= @character.name %></h4>
      <%= form_with(url: character_path(@character.character_id), method: :patch, class: "float-right") do %>
        <%= button_tag("Refresh", class: "btn btn-primary mb-2") do %>
          <%= image_tag("bootstrap-icons/icons/arrow-repeat.svg") %>
        <% end %>
      <% end %>
    </div>

    <div class="card">
      <ul class="list-group list-group-flush">
        <li class="list-group-item text-center">
          <%= image_tag(@character.icon_medium,
                        alt: @character.name,
                        class: "rounded border",
                        size: "130x130",
                        loading: "lazy") %>
        </li>
        <% if @character.corporation %>
          <li class="list-group-item text-break">
            Corporation: <%= link_to(@character.corporation.name,
                                     universe_corporation_path(@character.corporation.corporation_id)) %>
          </li>
        <% end %>
        <% if @character.alliance %>
          <li class="list-group-item text-break">
            Alliance: <%= link_to(@character.alliance.name,
                                  universe_alliance_path(@character.alliance.alliance_id)) %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Total SP: <%= @character.full_sp_formatted %>
        </li>
        <% if @character.unallocated_sp && @character.unallocated_sp > 0 %>
          <li class="list-group-item text-break">
            Unallocated SP: <%= @character.unallocated_sp_formatted %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Security status: <%= @character.security_status %>
        </li>
        <li class="list-group-item text-break">
          Wallet: <%= @character.wallet_formatted %> ISK
        </li>
      </ul>
      <p class="card-text text-center">
        <small class="text-muted">
          Last updated <%= time_ago_in_words(@character.updated_at) %> ago
        </small>
      </p>
    </div>
  </div>

  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <h4 class="text-center">Wallet Journals</h4>

    <% @wallet_journals.each_with_index do |wallet_journal, index| %>
      <div class="card <%= index % 2 == 0 ? "bg-dark" : "bg-transparent" %> rounded-0 border-secondary <%= index == 0 ? "" : "border-top-0" %>">
        <div class="row no-gutters">
          <div class="col-6">
            <span class="text-primary"><%= wallet_journal.description %></span>
          </div>
          <div class="col-6">
            <% if wallet_journal.amount >= 0.0 %>
              <span class="text-success"><%= wallet_journal.amount %></span>
            <% else %>
              <span class="text-danger"><%= wallet_journal.amount %></span>
            <% end %>
          </div>
        </div>
        <div class="row no-gutters">
          <div class="col-6">
            <%= wallet_journal.date %>
          </div>
          <div class="col-6">
            Balance: <span class="text-secondary"><%= wallet_journal.balance %></span>
          </div>
        </div>
      </div>
    <% end %>
  </div>
</div><commit_msg>Add pagination<commit_after><div class="row">
  <div class="col">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li>
        <li class="breadcrumb-item"><%= link_to("My characters", characters_path) %></li>
        <li class="breadcrumb-item"><%= link_to(@character.name, character_path(@character.character_id)) %></li>
        <li class="breadcrumb-item active" aria-current="page">Wallet Journals</li>
      </ol>
    </nav>
  </div>
</div>

<ul class="nav nav-pills">
  <li class="nav-item">
    <%= link_to("Sheet", character_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Employment History", character_employment_histories_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Agents", character_agents_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_assets %>
    <li class="nav-item">
      <%= link_to("Assets", character_assets_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <li class="nav-item">
    <%= link_to("Loyalty points", character_loyalty_points_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_skillqueue %>
    <li class="nav-item">
      <%= link_to("Skill queue", character_skillqueues_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_skills %>
    <li class="nav-item">
      <%= link_to("Skills", character_skills_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_mails %>
    <li class="nav-item">
      <%= link_to("Mail", character_mails_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_standings %>
    <li class="nav-item">
      <%= link_to("Standings", character_standings_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_journal %>
    <li class="nav-item">
      <%= link_to("Wallet journal", character_wallet_journals_path(@character.character_id), class: "nav-link active") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_transactions %>
    <li class="nav-item">
      <%= link_to("Wallet transactions", nil, class: "nav-link") %>
    </li>
  <% end %>
</ul>

<hr>

<div class="row">
  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <div class="clearfix">
      <h4 class="float-left"><%= @character.name %></h4>
      <%= form_with(url: character_path(@character.character_id), method: :patch, class: "float-right") do %>
        <%= button_tag("Refresh", class: "btn btn-primary mb-2") do %>
          <%= image_tag("bootstrap-icons/icons/arrow-repeat.svg") %>
        <% end %>
      <% end %>
    </div>

    <div class="card">
      <ul class="list-group list-group-flush">
        <li class="list-group-item text-center">
          <%= image_tag(@character.icon_medium,
                        alt: @character.name,
                        class: "rounded border",
                        size: "130x130",
                        loading: "lazy") %>
        </li>
        <% if @character.corporation %>
          <li class="list-group-item text-break">
            Corporation: <%= link_to(@character.corporation.name,
                                     universe_corporation_path(@character.corporation.corporation_id)) %>
          </li>
        <% end %>
        <% if @character.alliance %>
          <li class="list-group-item text-break">
            Alliance: <%= link_to(@character.alliance.name,
                                  universe_alliance_path(@character.alliance.alliance_id)) %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Total SP: <%= @character.full_sp_formatted %>
        </li>
        <% if @character.unallocated_sp && @character.unallocated_sp > 0 %>
          <li class="list-group-item text-break">
            Unallocated SP: <%= @character.unallocated_sp_formatted %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Security status: <%= @character.security_status %>
        </li>
        <li class="list-group-item text-break">
          Wallet: <%= @character.wallet_formatted %> ISK
        </li>
      </ul>
      <p class="card-text text-center">
        <small class="text-muted">
          Last updated <%= time_ago_in_words(@character.updated_at) %> ago
        </small>
      </p>
    </div>
  </div>

  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <h4 class="text-center">Wallet Journals</h4>

    <% @wallet_journals.each_with_index do |wallet_journal, index| %>
      <div class="card <%= index % 2 == 0 ? "bg-dark" : "bg-transparent" %> rounded-0 border-secondary <%= index == 0 ? "" : "border-top-0" %>">
        <div class="row no-gutters">
          <div class="col-6">
            <span class="text-primary"><%= wallet_journal.description %></span>
          </div>
          <div class="col-6">
            <% if wallet_journal.amount >= 0.0 %>
              <span class="text-success"><%= wallet_journal.amount %></span>
            <% else %>
              <span class="text-danger"><%= wallet_journal.amount %></span>
            <% end %>
          </div>
        </div>
        <div class="row no-gutters">
          <div class="col-6">
            <%= wallet_journal.date %>
          </div>
          <div class="col-6">
            Balance: <span class="text-secondary"><%= wallet_journal.balance %></span>
          </div>
        </div>
      </div>
    <% end %>

    <div class="w-100"></div>

    <%= paginate @wallet_journals %>
  </div>
</div>
{'fraction_non_alphanumeric': 0.1857614742698192, 'fraction_numerical': 0.006693324061196106, 'mean_word_length': 2.5076219512195124, 'pattern_counts': {'":': 0, '<': 320, '<?xml version=': 0, '>': 324, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5615546', 'n_tokens_mistral': 3970, 'n_tokens_neox': 3681, 'n_words': 666}