<commit_before>{% load xform_tags %}
<h2>Case Details</h2>
<table class="case_details">
<thead>
    <tr>
        <th>Property</th>
        <th>Value</th>
    </tr>
</thead>
<tbody>
    <tr><td>name</td><td>{{ case.name }}</td></tr>
    <tr><td>opened_on</td><td>{{ case.opened_on }}</td></tr>
    <tr><td>modified_on</td><td>{{ case.modified_on }}</td></tr>
    <tr><td>type</td><td>{{ case.type }}</td></tr>
    <tr><td>closed?</td><td>{{ case.closed|yesno }}</td></tr>
    <tr><td>closed_on</td><td>{{ case.closed_on }}</td></tr>
    <tr><td>domain</td><td>{{ case.domain }}</td></tr>
    <tr><td>external_id</td><td>{{ case.external_id }}</td></tr>
    <tr><td>user_id</td><td>{{ case.user_id }}</td></tr>
    <tr><td>forms</td><td>{% for form_id in case.xform_ids %}
    <p class="xform_ref" data-formid="{{ form_id }}">{% form_inline_display form_id %}</p>
    {% if not forloop.first %}<br>{% endif %}
    {% endfor %}</td></tr>
    <tr>
        <td>Attachments</td><td>
            {% for form_id, filename in case.attachments %}
            {% if not forloop.first %}<br>{% endif %}
            <a href="{% url xform_attachment form_id filename %}">{{ filename }}</a>
            {% endfor %}
        </td>
    </tr>
    
</tbody>
</table>
<h2>Dynamic Properties</h2>
<table class="case_properties">
<thead>
    <tr>
        <th>Property</th>
        <th>Value</th>
    </tr>
</thead>
<tbody>
    {% for prop, val in case.dynamic_case_properties %}
    <tr><td>{{ prop }}</td><td>{{ val }}</td></tr>
    {% empty %}
    <tr><td colspan="2" class="no_data">No data</td></tr>
    {% endfor %}
</tbody>
</table>

<h2>Referrals</h2>
<table class="case_history">
<thead>
    <tr>
        <th>Date Opened</th>
        <th>Type</th>
        <th>Date Modified</th>
        <th>Status</th>
    </tr>
</thead>
<tbody>
{% for referral in case.referrals %}
    <tr>
        <td>{{ referral.opened_on }}</td>
        <td>{{ referral.type }}</td>
        <td>{{ referral.modified_on }}</td>
        <td>{{ referral.closed|yesno:"closed,open" }}</td>
    </tr>
{% empty %}
    <tr><td colspan="4" class="no_data">No referrals</td></tr>
{% endfor %}

</tbody>
</table>

<h2>Case History</h2>
<table class="case_history">
<thead>
    <tr>
        <th>Date</th>
        <th>Type</th>
        <th>Form</th>
    </tr>
</thead>
<tbody>
{% for action in case.actions %}
    <tr><td>{{ action.date }}</td><td>{{ action.action_type }}</td><td>
    {# this makes one call to couch per action, which could be optimized but shouldn't be a big deal since it's small amounts of data #}
    <p class="xform_ref" {% if action.xform_id %}data-formid="{{ action.xform_id }}"{% endif %}>{% form_inline_display action.xform_id %}</p>
    </td></tr>
{% endfor %}
</tbody>
</table><commit_msg>modified a template for the hq report redesign<commit_after>{% load xform_tags %}
<h2>Case Details</h2>
<table class="table table-striped case_details">
<thead>
    <tr>
        <th>Property</th>
        <th>Value</th>
    </tr>
</thead>
<tbody>
    <tr><td>name</td><td>{{ case.name }}</td></tr>
    <tr><td>opened_on</td><td>{{ case.opened_on }}</td></tr>
    <tr><td>modified_on</td><td>{{ case.modified_on }}</td></tr>
    <tr><td>type</td><td>{{ case.type }}</td></tr>
    <tr><td>closed?</td><td>{{ case.closed|yesno }}</td></tr>
    <tr><td>closed_on</td><td>{{ case.closed_on }}</td></tr>
    <tr><td>domain</td><td>{{ case.domain }}</td></tr>
    <tr><td>external_id</td><td>{{ case.external_id }}</td></tr>
    <tr><td>user_id</td><td>{{ case.user_id }}</td></tr>
    <tr><td>forms</td><td>{% for form_id in case.xform_ids %}
    <p class="xform_ref" data-formid="{{ form_id }}">{% form_inline_display form_id %}</p>
    {% if not forloop.first %}<br>{% endif %}
    {% endfor %}</td></tr>
    <tr>
        <td>Attachments</td><td>
            {% for form_id, filename in case.attachments %}
            {% if not forloop.first %}<br>{% endif %}
            <a href="{% url xform_attachment form_id filename %}">{{ filename }}</a>
            {% endfor %}
        </td>
    </tr>

</tbody>
</table>
<h2>Dynamic Properties</h2>
<table class="table table-striped case_properties">
<thead>
    <tr>
        <th>Property</th>
        <th>Value</th>
    </tr>
</thead>
<tbody>
    {% for prop, val in case.dynamic_case_properties %}
    <tr><td>{{ prop }}</td><td>{{ val }}</td></tr>
    {% empty %}
    <tr><td colspan="2" class="no_data">No data</td></tr>
    {% endfor %}
</tbody>
</table>

<h2>Referrals</h2>
<table class="table table-striped case_history">
<thead>
    <tr>
        <th>Date Opened</th>
        <th>Type</th>
        <th>Date Modified</th>
        <th>Status</th>
    </tr>
</thead>
<tbody>
{% for referral in case.referrals %}
    <tr>
        <td>{{ referral.opened_on }}</td>
        <td>{{ referral.type }}</td>
        <td>{{ referral.modified_on }}</td>
        <td>{{ referral.closed|yesno:"closed,open" }}</td>
    </tr>
{% empty %}
    <tr><td colspan="4" class="no_data">No referrals</td></tr>
{% endfor %}

</tbody>
</table>

<h2>Case History</h2>
<table class="table table-striped case_history">
<thead>
    <tr>
        <th>Date</th>
        <th>Type</th>
        <th>Form</th>
    </tr>
</thead>
<tbody>
{% for action in case.actions %}
    <tr><td>{{ action.date }}</td><td>{{ action.action_type }}</td><td>
    {# this makes one call to couch per action, which could be optimized but shouldn't be a big deal since it's small amounts of data #}
    <p class="xform_ref" {% if action.xform_id %}data-formid="{{ action.xform_id }}"{% endif %}>{% form_inline_display action.xform_id %}</p>
    </td></tr>
{% endfor %}
</tbody>
</table>
{'fraction_non_alphanumeric': 0.2391342912896931, 'fraction_numerical': 0.003547986517651233, 'mean_word_length': 3.050287356321839, 'pattern_counts': {'":': 0, '<': 339, '<?xml version=': 0, '>': 339, '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': '3747539', 'n_tokens_mistral': 2268, 'n_tokens_neox': 2102, 'n_words': 440}