<commit_before>{% extends "base.html" %}
{% load thing_extras %}

{% block title %}Home{% endblock %}

{% block extra_head %}
      <script type="text/javascript">
        $(document).ready(function() {
          // make tooltips appear to the right of icons
          $("[rel=tooltip]").each(function () {
            $(this).data('tooltip').options.placement = 'right';
          });
        });

        var tooltips_on = false;
        function toggle_tooltips() {
          $("[rel=tooltip]").each(function () {
            if (tooltips_on)
              $(this).tooltip('hide');
            else
              $(this).tooltip('show');
          });
          tooltips_on = !tooltips_on;
        }

        function screenshot_mode() {
          // replace sensitive data with placeholders
          $('.sensitive').each(function () {
            var $this = $(this);
            var $oldname = $this.attr('oldname');

            if ($oldname === undefined) {
              $this.attr('oldname', $this.text());
              if ($this.hasClass('character-name'))
                $this.text('Character Name');
              else if ($this.hasClass('apikey-name'))
                $this.text('apikey.name');
              else if ($this.hasClass('corporation-name'))
                $this.text('corporation.name [ticker]');
            }
            else {
              $this.text($oldname);
              $this.removeAttr('oldname');
            }
          });

          var seen_tooltips = Array();
          $('.well').each(function () {
            var $well = $(this);
            var seen = false;
            
            $('[rel=tooltip]', $well.children('div')).each(function () {
              var $img = $(this);
              if (seen == false && seen_tooltips[$img.attr('src')] == null) {
                seen = true;
                seen_tooltips[$img.attr('src')] = true;

                if ($img.attr('shown') === undefined) {
                  $img.tooltip('show');
                  $img.attr('shown', 'yup');
                }
                else {
                  $img.tooltip('hide');
                  $img.removeAttr('shown');
                }
              }
            });
          });
        }
      </script>
{% endblock %}

{% block content %}
    <div class="row-fluid">
      <div class="span12">
        <span><strong>Total Balance:</strong> {{ total_balance|commas }} ISK</span>
        <span class="divider">/</span>
        <span><strong>Total SP:</strong> {{ total_sp|commas }}</span>
        <span class="pull-right">
          {% if user.is_staff -%}
          <strong>Queued task{{ task_count|pluralize }}:</strong> {{ task_count|commas }}
          <span class="divider">/</span>
          {%- endif %}
          <a href="#" onclick="screenshot_mode();">
            <img src="{{ STATIC_URL }}icons/silk/photo.png" title="Screenshot sanitised mode">
          </a>
        </span>
      </div>
    </div>
    {% for chars in characters|tablecols(profile.home_chars_per_row) %}
    <div class="row-fluid">
      {% for character in chars %}
      {% if character %}
      <div class="span{{ 12 // profile.home_chars_per_row }}">
        <div class="well-small well{% if character.z_apikey in not_training %} alert-error{% endif %}">
          <div>
            <span class="large">
              <a href="{% url thing.views.character character.name %}" class="sensitive character-name">
                {{ character.name }}
              </a>
            </span>
            <span class="small pull-right sensitive apikey-name">
              [{{ character.z_apikey.name }}]
            </span>
          </div>

          <div>
            <span>{{ character.wallet_balance|commas }} ISK</span>
            <span class="small pull-right">
              {{ character.z_total_sp|commas }} SP
            </span>
          </div>

          {% if character.z_training %}
          <div class="margin-half-top">
            <span>{{ character.z_training.sq.skill.item.name }} {{ character.z_training.sq.get_roman_level() }}</span>
            <span class="small">(Rank {{ character.z_training.sq.skill.rank }})</span>
            <br>
            <em class="small">{{ character.z_training.skill_duration|shortduration }} @ {{ character.z_training.sp_per_hour }} SP/hr</em>
            {% if character.z_training.queue_duration > character.z_training.skill_duration %}
            <em class="small pull-right">Queue: {{ character.z_training.queue_duration|shortduration }}</em>
            {% endif %}
            <div class="progress progress-striped {% if character.z_training.queue_duration < 86400 %} progress-danger{% endif%}">
              <div class="bar" style="width: {{ character.z_training.complete_per }}%">{{ character.z_training.complete_per }}%</div>
            </div>
          </div>
          {% endif %}

          {% if character.z_notifications %}
          <div class="margin-half-top smaller">
            {% for notif in character.z_notifications %}
            <i class="icons-{{ notif.icon }}" rel="tooltip" title="{{ notif.tooltip }}"></i>
            {% if notif.span_class %}<span class="{{ notif.span_class }}">{% endif %}
            {{ notif.text }}
            {% if notif.span_class %}</span>{% endif %}
            {% endfor %}
          </div>
          {% endif %}
        </div>
      </div>
      {% endif %}
      {% endfor %}
    </div>
    {% endfor %}
    
    {% if corporations %}
    <hr class="nomargin">
    <div class="row-fluid">
      {% for corporation in corporations %}
      <div class="span3">
        <h4 class="sensitive corporation-name">
          {{ corporation.name }} [{{ corporation.ticker }}]
        </h4>
        <table class="table table-striped table-bordered table-condensed">
          <thead>
            <tr class="l">
              <th>Wallet Division</th>
              <th class="c">Balance</th>
            </tr>
          </thead>
          <tbody>
            {% for wallet in corporation.corpwallet_set.all() %}
            <tr>
              <td>{{ wallet.description }}</td>
              <td class="r">{{ wallet.balance|commas }}</td>
            </tr>
            {% endfor %}
          </tbody>
        </table>
        </ul>
      </div>
      {% endfor %}
    </div>
    {% endif %}

    {% if events %}
    <hr class="nomargin">
    <div class="row-fluid">
      <h4>Event log</h4>
      <ul>
        {% for event in events %}
        <li>{{ event.get_age()|duration }} ago <strong>/</strong> {{ event.text|safe }}</li>
        {% endfor %}
      </ul>
      <span><a href="{% url thing.views.events %}">See all</a></span>
    </div>
    {% endif %}
{% endblock %}
<commit_msg>Change corporation name size in the home template<commit_after>{% extends "base.html" %}
{% load thing_extras %}

{% block title %}Home{% endblock %}

{% block extra_head %}
      <script type="text/javascript">
        $(document).ready(function() {
          // make tooltips appear to the right of icons
          $("[rel=tooltip]").each(function () {
            $(this).data('tooltip').options.placement = 'right';
          });
        });

        var tooltips_on = false;
        function toggle_tooltips() {
          $("[rel=tooltip]").each(function () {
            if (tooltips_on)
              $(this).tooltip('hide');
            else
              $(this).tooltip('show');
          });
          tooltips_on = !tooltips_on;
        }

        function screenshot_mode() {
          // replace sensitive data with placeholders
          $('.sensitive').each(function () {
            var $this = $(this);
            var $oldname = $this.attr('oldname');

            if ($oldname === undefined) {
              $this.attr('oldname', $this.text());
              if ($this.hasClass('character-name'))
                $this.text('Character Name');
              else if ($this.hasClass('apikey-name'))
                $this.text('apikey.name');
              else if ($this.hasClass('corporation-name'))
                $this.text('corporation.name [ticker]');
            }
            else {
              $this.text($oldname);
              $this.removeAttr('oldname');
            }
          });

          var seen_tooltips = Array();
          $('.well').each(function () {
            var $well = $(this);
            var seen = false;
            
            $('[rel=tooltip]', $well.children('div')).each(function () {
              var $img = $(this);
              if (seen == false && seen_tooltips[$img.attr('src')] == null) {
                seen = true;
                seen_tooltips[$img.attr('src')] = true;

                if ($img.attr('shown') === undefined) {
                  $img.tooltip('show');
                  $img.attr('shown', 'yup');
                }
                else {
                  $img.tooltip('hide');
                  $img.removeAttr('shown');
                }
              }
            });
          });
        }
      </script>
{% endblock %}

{% block content %}
    <div class="row-fluid">
      <div class="span12">
        <span><strong>Total Balance:</strong> {{ total_balance|commas }} ISK</span>
        <span class="divider">/</span>
        <span><strong>Total SP:</strong> {{ total_sp|commas }}</span>
        <span class="pull-right">
          {% if user.is_staff -%}
          <strong>Queued task{{ task_count|pluralize }}:</strong> {{ task_count|commas }}
          <span class="divider">/</span>
          {%- endif %}
          <a href="#" onclick="screenshot_mode();">
            <img src="{{ STATIC_URL }}icons/silk/photo.png" title="Screenshot sanitised mode">
          </a>
        </span>
      </div>
    </div>
    {% for chars in characters|tablecols(profile.home_chars_per_row) %}
    <div class="row-fluid">
      {% for character in chars %}
      {% if character %}
      <div class="span{{ 12 // profile.home_chars_per_row }}">
        <div class="well-small well{% if character.z_apikey in not_training %} alert-error{% endif %}">
          <div>
            <span class="large">
              <a href="{% url thing.views.character character.name %}" class="sensitive character-name">
                {{ character.name }}
              </a>
            </span>
            <span class="small pull-right sensitive apikey-name">
              [{{ character.z_apikey.name }}]
            </span>
          </div>

          <div>
            <span>{{ character.wallet_balance|commas }} ISK</span>
            <span class="small pull-right">
              {{ character.z_total_sp|commas }} SP
            </span>
          </div>

          {% if character.z_training %}
          <div class="margin-half-top">
            <span>{{ character.z_training.sq.skill.item.name }} {{ character.z_training.sq.get_roman_level() }}</span>
            <span class="small">(Rank {{ character.z_training.sq.skill.rank }})</span>
            <br>
            <em class="small">{{ character.z_training.skill_duration|shortduration }} @ {{ character.z_training.sp_per_hour }} SP/hr</em>
            {% if character.z_training.queue_duration > character.z_training.skill_duration %}
            <em class="small pull-right">Queue: {{ character.z_training.queue_duration|shortduration }}</em>
            {% endif %}
            <div class="progress progress-striped {% if character.z_training.queue_duration < 86400 %} progress-danger{% endif%}">
              <div class="bar" style="width: {{ character.z_training.complete_per }}%">{{ character.z_training.complete_per }}%</div>
            </div>
          </div>
          {% endif %}

          {% if character.z_notifications %}
          <div class="margin-half-top smaller">
            {% for notif in character.z_notifications %}
            <i class="icons-{{ notif.icon }}" rel="tooltip" title="{{ notif.tooltip }}"></i>
            {% if notif.span_class %}<span class="{{ notif.span_class }}">{% endif %}
            {{ notif.text }}
            {% if notif.span_class %}</span>{% endif %}
            {% endfor %}
          </div>
          {% endif %}
        </div>
      </div>
      {% endif %}
      {% endfor %}
    </div>
    {% endfor %}
    
    {% if corporations %}
    <hr class="nomargin">
    <div class="row-fluid">
      {% for corporation in corporations %}
      <div class="span3">
        <h5 class="sensitive corporation-name">
          {{ corporation.name }} [{{ corporation.ticker }}]
        </h5>
        <table class="table table-striped table-bordered table-condensed">
          <thead>
            <tr class="l">
              <th>Wallet Division</th>
              <th class="c">Balance</th>
            </tr>
          </thead>
          <tbody>
            {% for wallet in corporation.corpwallet_set.all() %}
            <tr>
              <td>{{ wallet.description }}</td>
              <td class="r">{{ wallet.balance|commas }}</td>
            </tr>
            {% endfor %}
          </tbody>
        </table>
        </ul>
      </div>
      {% endfor %}
    </div>
    {% endif %}

    {% if events %}
    <hr class="nomargin">
    <div class="row-fluid">
      <h4>Event log</h4>
      <ul>
        {% for event in events %}
        <li>{{ event.get_age()|duration }} ago <strong>/</strong> {{ event.text|safe }}</li>
        {% endfor %}
      </ul>
      <span><a href="{% url thing.views.events %}">See all</a></span>
    </div>
    {% endif %}
{% endblock %}

{'fraction_non_alphanumeric': 0.17196317196317196, 'fraction_numerical': 0.002079002079002079, 'mean_word_length': 1.730940794809408, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 219, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7455395', 'n_tokens_mistral': 4104, 'n_tokens_neox': 3811, 'n_words': 749}