<commit_before>{% extends "eproms/base.html" %}
{%- from "flask_user/_macros.html" import footer -%}
{% block main %}
{%- if config.get("SHOW_WELCOME") and user.has_role(ROLE.WRITE_ONLY.value) -%}
    <div class="portal-item">
        <h2 class="tnth-subhead">{{ _("Welcome to TrueNTH") }}</h2>
        {{ _("Tools for navigating the prostate cancer journey") }}
    </div>
{%- endif -%}
<div class="portal-body">
    {# present each intervention in turn if configured for user #}
    {%- for intervention in interventions -%}
        {% set display = intervention.display_for_user(user) %}
        {%- if display.access -%}
            <div class="portal-item">
                {%- if intervention.name == "assessment_engine" %}
                    {%- if display.card_html -%}
                        {%  set ae_html = assessment_engine_view(user) %}
                        {{ ae_html | safe }}
                        <input type="hidden" class="link-label" value="{{display.link_label}}" />
                        <input type="hidden" class="link-url" value="{{display.link_url}}" />
                    {%- else -%}
                        {{render_card_content(intervention, display, class='portal-description-incomplete portal-no-description-container')}}
                    {%- endif %}
                {%- else -%}
                    {% call render_card_content(intervention, display) %}
                        <div class="portal-description-body">
                            {%- if display.card_html -%}
                                {{ display.card_html | safe }}
                            {%- else -%}
                                {{_("Not available")}}
                            {%- endif -%}
                        </div>
                    {% endcall %}
                {%- endif -%}
            </div>
        {%- endif -%}
    {%- endfor -%}
</div>
{% endblock %}
{% block footer %}{{footer(False, True, user)}}{% endblock %}
{% block additional_scripts %}<script src="{{ url_for('.static', filename='js/portal.js') }}"></script>{% endblock %}
{% macro render_card_content(intervention, display, class='') -%}
    <div class="portal-description {{class}}"><commit_msg>Obsolete code fragment left behind caused stack (#3798)<commit_after>{% extends "eproms/base.html" %}
{%- from "flask_user/_macros.html" import footer -%}
{% block main %}
{%- if config.get("SHOW_WELCOME") and user.has_role(ROLE.WRITE_ONLY.value) -%}
    <div class="portal-item">
        <h2 class="tnth-subhead">{{ _("Welcome to TrueNTH") }}</h2>
        {{ _("Tools for navigating the prostate cancer journey") }}
    </div>
{%- endif -%}
<div class="portal-body">
    {# present each intervention in turn if configured for user #}
    {%- for intervention in interventions -%}
        {% set display = intervention.display_for_user(user) %}
        {%- if display.access -%}
            <div class="portal-item">
                {%- if intervention.name == "assessment_engine" %}
                    {{ assessment_engine_view(user) | safe }}
                {%- else -%}
                    {% call render_card_content(intervention, display) %}
                        <div class="portal-description-body">
                            {%- if display.card_html -%}
                                {{ display.card_html | safe }}
                            {%- else -%}
                                {{_("Not available")}}
                            {%- endif -%}
                        </div>
                    {% endcall %}
                {%- endif -%}
            </div>
        {%- endif -%}
    {%- endfor -%}
</div>
{% endblock %}
{% block footer %}{{footer(False, True, user)}}{% endblock %}
{% block additional_scripts %}<script src="{{ url_for('.static', filename='js/portal.js') }}"></script>{% endblock %}
{% macro render_card_content(intervention, display, class='') -%}
    <div class="portal-description {{class}}">
{'fraction_non_alphanumeric': 0.16802030456852793, 'fraction_numerical': 0.0020304568527918783, 'mean_word_length': 1.7792665726375176, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3942735', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1080, 'n_words': 225}