<commit_before>{% extends base_template %}

{% load case_tags %}
{% load hq_shared_tags %}

{% block head %}
    {{ block.super }}
    {% include "imports/datatables.html" %}
    <style>
        h2 {
            padding-top: 1em;
        }
        .no_data {
            text-align: center;
            color: #ccc;
        }
        .inner_container {
            text-align: left;   
            width: 95%;
            margin: auto;
            padding: 1em 0 1em 0;
        }
        table.case_details, table.case_history, table.case_properties {
            border: 1px solid #ccc;
            width: 100%;
        }
        .xform_ref {
            color: #0067B1;
            cursor: pointer;
        }
    </style>
    <script>
    var form_lookup_dict = {{ form_lookups|JSON }};
    $(document).ready(function() {
        // this adds a clickable link to our form elements
        var url_base = "{% url render_form_data domain 'placeholder' %}";
        $(".xform_ref").click(function() {
            var url = url_base.replace("placeholder", $(this).data("formid"));
            window.location = url;
        });
        $(".xform_ref").each(function() {
            var formid = $(this).data("formid");
            $(this).text(form_lookup_dict[formid]);
        });
    });
         
    </script>
{% endblock %}

{% block content %}
    <div id="main_container">
    <div class="inner_container">
        {% render_case case_id %} 
    </div>
    </div>
{% endblock %}<commit_msg>use real links for xforms. don't make links when there's not form id<commit_after>{% extends base_template %}

{% load case_tags %}
{% load hq_shared_tags %}

{% block head %}
    {{ block.super }}
    {% include "imports/datatables.html" %}
    <style>
        h2 {
            padding-top: 1em;
        }
        .no_data {
            text-align: center;
            color: #ccc;
        }
        .inner_container {
            text-align: left;   
            width: 95%;
            margin: auto;
            padding: 1em 0 1em 0;
        }
        table.case_details, table.case_history, table.case_properties {
            border: 1px solid #ccc;
            width: 100%;
        }
    </style>
    <script>
    var form_lookup_dict = {{ form_lookups|JSON }};
    $(document).ready(function() {
        // this adds a clickable link to our form elements
        var url_base = "{% url render_form_data domain 'placeholder_formid' %}";
        var link_template = '<a href="placeholder_url">placeholder_text</a>'
        $(".xform_ref").each(function() {
            var formid = $(this).data("formid");
            if (formid) {
                var text = form_lookup_dict[formid];
                var url = url_base.replace("placeholder_domain", formid);
                var body = link_template.replace("placeholder_url", url).replace("placeholder_text", text);
                $(this).html(body);
            }
        });
    });
         
    </script>
{% endblock %}

{% block content %}
    <div id="main_container">
    <div class="inner_container">
        {% render_case case_id %} 
    </div>
    </div>
{% endblock %}
{'fraction_non_alphanumeric': 0.13948292371528886, 'fraction_numerical': 0.00925630386211299, 'mean_word_length': 1.7932263814616756, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3223296', 'n_tokens_mistral': 993, 'n_tokens_neox': 920, 'n_words': 204}