<commit_before>{# Dashboard for logged in user #}
{% extends 'base.html' %}
{% set page_title = _('Projects Dashboard') %}
{% set stateList = ['licence_type', 'copyright_notice', 'trademark_notice', 'trademark_permission', 'rfn_asserted', 'rfn_permission', 'source_drawing_filetype', 'source_cff_filetype', 'source_ttf_filetype', 'price_design_usd', 'price_total_usd', 'hinting_level', 'quality_vendor_category', 'quality_vendor', 'quality_design', 'quality_hinting', 'quality_prints', 'stats_family_name'] %}
{% set stateListLength = count(stateList) %}

{% block body %}

<h2>{{ page_title }}</h2>

<a href='{{ url_for('settings.repos') }}' class="btn btn-mini"><i class="icon-cog"></i> {{ _("Add new projects") }}</a>

<table class="table table-striped tablesorter" id="dashboard" style="">
  <thead>
    <tr>
      <th>{{ _("ID") }}</th>
      <th>{{ _("Project") }}</th>
      <th colspan="{{ len|d(18) }}" style="text-align: center; font-size: small">State</th>
      <th style="text-align: center">{{ _("Actions") }}</th>
      <th style="text-align: center">{{ _("Total") }}</th>
      <th style="text-align: center">{{ _("Month") }}</th>
      <th style="text-align: center">{{ _("Week") }}</th>
      <th style="text-align: center">{{ _("Yesterday") }}</th> 
      <th style="text-align: center">{{ _("Rate") }}</th>
    </tr>
  </thead>

  <tbody>
    {% for repo in repos -%}
      <tr>
        <td>
            <span class="apopover" data-trigger="hover" data-placement="bottom" data-title="project.config" data-content="{{ repo.config }}">{{repo.id}}</span>
            {# show repo.config for debugging #}
        </td>
        <td><commit_msg>WIP: Add workaround for stateListLength count<commit_after>{# Dashboard for logged in user #}
{% extends 'base.html' %}
{% set page_title = _('Projects Dashboard') %}
{% set stateList = ['licence_type', 'copyright_notice', 'trademark_notice', 'trademark_permission', 'rfn_asserted', 'rfn_permission', 'source_drawing_filetype', 'source_cff_filetype', 'source_ttf_filetype', 'price_design_usd', 'price_total_usd', 'hinting_level', 'quality_vendor_category', 'quality_vendor', 'quality_design', 'quality_hinting', 'quality_prints', 'stats_family_name'] %}
{% set stateListLength = stateList.count(stateList) %}

{% block body %}

<h2>{{ page_title }} DEBUG: stateListLength is {{ stateListLength }}</h2>

<a href='{{ url_for('settings.repos') }}' class="btn btn-mini"><i class="icon-cog"></i> {{ _("Add new projects") }}</a>

<table class="table table-striped tablesorter" id="dashboard" style="">
  <thead>
    <tr>
      <th>{{ _("ID") }}</th>
      <th>{{ _("Project") }}</th>
      <th colspan="{{ len|d(18) }}" style="text-align: center; font-size: small">State</th>
      <th style="text-align: center">{{ _("Actions") }}</th>
      <th style="text-align: center">{{ _("Total") }}</th>
      <th style="text-align: center">{{ _("Month") }}</th>
      <th style="text-align: center">{{ _("Week") }}</th>
      <th style="text-align: center">{{ _("Yesterday") }}</th> 
      <th style="text-align: center">{{ _("Rate") }}</th>
    </tr>
  </thead>

  <tbody>
    {% for repo in repos -%}
      <tr>
        <td>
            <span class="apopover" data-trigger="hover" data-placement="bottom" data-title="project.config" data-content="{{ repo.config }}">{{repo.id}}</span>
            {# show repo.config for debugging #}
        </td>
        <td>
{'fraction_non_alphanumeric': 0.2227112676056338, 'fraction_numerical': 0.002347417840375587, 'mean_word_length': 4.318252730109204, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '5876454', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1154, 'n_words': 256}