<commit_before>{# This template is used as the landing page for Model Program resource #}

{% extends "pages/genericresource.html" %}
{% load pages_tags mezzanine_tags crispy_forms_tags %}
{% load staticfiles  %}

{% block extended_metadata %}
    {% if extended_metadata_exists %}
        <div class="row">
            <div class="col-md-12">
                {# Add the view mode html code below #}
                {% if mpmetadata %}
                    {########################}
                    {#       CONTENT FILES     #}
                    {########################}

                    {% if mpmetadata.get_engine_list.items|first|first or mpmetadata.get_software_list.items|first|first or mpmetadata.get_releasenotes_list.items|first|first or mpmetadata.get_documentation_list.items|first|first %}
                    <legend>Content files</legend>
                    <table class="custom-table">
                        <tbody>
                        {% if mpmetadata.get_engine_list.items|first|first %}
                            {% for name, path in mpmetadata.get_engine_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Computational Engine {}</th>
                                    {% endif %}
                                    <td><a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a></td>
                                </tr>
                            {% endfor %}
                        {% endif %}

                        {% if mpmetadata.get_software_list.items|first|first %}
                            {% for name, path in mpmetadata.get_software_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Software</th>
                                    {% endif %}
                                    <td><a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a></td>
                                </tr>
                            {% endfor %}
                        {% endif %}

                        {% if mpmetadata.get_documentation_list.items|first|first %}
                            {% for name, path in mpmetadata.get_documentation_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Documentation</th>
                                    {% endif %}
                                    <td><a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a></td>
                                </tr>
                            {% endfor %}
                        {% endif %}


                        {% if mpmetadata.get_releasenotes_list.items|first|first %}
                            {% for name, path in mpmetadata.get_releasenotes_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Release Notes</th>
                                    {% endif %}
                                    <td>
                                        <a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a>
                                    </td>
                                </tr>
                            {% endfor %}
                        {% endif %}
                        </tbody>
                    </table>
                    <hr style="border:0">

                {% endif %}

                    {########################}
                    {#  SOFTWARE  METADATA  #}
                    {########################}
                {% if mpmetadata.modelVersion or mpmedata.modelProgramLanguage or mpmetadata.modelCodeRepository or mpmetadata.modelOperatingSystem %}
                    <legend>Software</legend>
                    <table class="custom-table">
                        <tbody>
                           {% if mpmetadata.modelVersion %}<tr><th class="text-muted">Version </th><td>{{ mpmetadata.modelVersion }}</td></tr>{% endif %}
                           {% if mpmetadata.modelProgramLanguage %}<tr><th class="text-muted">Language </th><td>{{ mpmetadata.modelProgramLanguage }}</td></tr>{% endif %}
                           {% if mpmetadata.modelCodeRepository %}<tr><th class="text-muted">Software Repository </th><td><a target="_blank" href="{{ mpmetadata.modelCodeRepository }}">{{ mpmetadata.modelCodeRepository }}</a></td></tr>{% endif %}
                           {% if mpmetadata.modelOperatingSystem %}<tr><th class="text-muted">Operating System </th><td>{{ mpmetadata.modelOperatingSystem }}</td></tr>{% endif %}
                        </tbody>
                    </table>
                    <hr style="border:0"/>
                {% endif %}

                    {########################}
                    {#   MODEL  METADATA  #}
                    {########################}
                {% if mpmetadata.modelReleaseDate or mpmedata.modelWebsite %}
                    <legend>General</legend>
                    <table class="custom-table">
                        <tbody>
                            {% if mpmetadata.modelReleaseDate %}
                            <tr>
                                <th class="text-muted">Release Date </th>
                                <td>{{ mpmetadata.modelReleaseDate |date:"SHORT_DATE_FORMAT" }}</td>
                            </tr>
                            {% endif %}
                            {% if mpmetadata.modelWebsite %}
                            <tr>
                                <th class="text-muted">Website </th>
                                <td><a href="{{ mpmetadata.modelWebsite }}" target="_blank">{{ mpmetadata.modelWebsite }}</a></td>
                            </tr>
                            {% endif %}
                        </tbody>
                    </table>
                    <hr style="border:0"/>
                {% endif %}

                {% endif %}

            </div>
        </div>
    {% endif %}
{% endblock %}

{% block extra_css %}
    <link rel="stylesheet" type="text/css" href="{% static "css/bootstrap-multiselect.css" %}" />
    <link rel="stylesheet" type="text/css" href="{% static "css/model_program.css" %}" />
{% endblock %}

{% block extra_js %}
    {{ block.super }}
    <script src="{% static "js/bootstrap-multiselect.js"%}"></script>
    <script src="{% static "js/model_program.js"%}"></script>
{% endblock %}



<commit_msg>[#1700] took out 'General' heading and reordered items to match edit mode<commit_after>{# This template is used as the landing page for Model Program resource #}

{% extends "pages/genericresource.html" %}
{% load pages_tags mezzanine_tags crispy_forms_tags %}
{% load staticfiles  %}

{% block extended_metadata %}
    {% if extended_metadata_exists %}
        <div class="row">
            <div class="col-md-12">
                {# Add the view mode html code below #}
                {% if mpmetadata %}
                    {########################}
                    {#       CONTENT FILES     #}
                    {########################}

                    {% if mpmetadata.get_engine_list.items|first|first or mpmetadata.get_software_list.items|first|first or mpmetadata.get_releasenotes_list.items|first|first or mpmetadata.get_documentation_list.items|first|first %}
                    <legend>Content files</legend>
                    <table class="custom-table">
                        <tbody>
                        {% if mpmetadata.get_engine_list.items|first|first %}
                            {% for name, path in mpmetadata.get_engine_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Computational Engine {}</th>
                                    {% endif %}
                                    <td><a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a></td>
                                </tr>
                            {% endfor %}
                        {% endif %}

                        {% if mpmetadata.get_software_list.items|first|first %}
                            {% for name, path in mpmetadata.get_software_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Software</th>
                                    {% endif %}
                                    <td><a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a></td>
                                </tr>
                            {% endfor %}
                        {% endif %}

                        {% if mpmetadata.get_documentation_list.items|first|first %}
                            {% for name, path in mpmetadata.get_documentation_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Documentation</th>
                                    {% endif %}
                                    <td><a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a></td>
                                </tr>
                            {% endfor %}
                        {% endif %}


                        {% if mpmetadata.get_releasenotes_list.items|first|first %}
                            {% for name, path in mpmetadata.get_releasenotes_list.items %}
                                <tr>
                                    {% if forloop.counter0 > 0 %}
                                        <th></th>
                                    {% else %}
                                        <th class="text-muted">Release Notes</th>
                                    {% endif %}
                                    <td>
                                        <a id="permalink"
                                           href="http://{{ request.get_host }}/resource/{{ path }}"
                                           target="_blank">{{ name }}</a>
                                    </td>
                                </tr>
                            {% endfor %}
                        {% endif %}
                        </tbody>
                    </table>
                    <hr style="border:0">

                {% endif %}

                    {########################}
                    {#  SOFTWARE  METADATA  #}
                    {########################}
                {% if mpmetadata.modelProgramLanguage or mpmedata.modelOperatingSystem or mpmetadata.modelCodeRepository or mpmetadata.modelReleaseDate or mpmetadata.modelVersion or mpmetadata.modelWebsite%}
                    <legend>Software</legend>
                    <table class="custom-table">
                        <tbody>
                           {% if mpmetadata.modelProgramLanguage %}<tr><th class="text-muted">Programming Language </th><td>{{ mpmetadata.modelProgramLanguage }}</td></tr>{% endif %}
                           {% if mpmetadata.modelOperatingSystem %}<tr><th class="text-muted">Operating System </th><td>{{ mpmetadata.modelOperatingSystem }}</td></tr>{% endif %}
                           {% if mpmetadata.modelCodeRepository %}<tr><th class="text-muted">Software Repository </th><td><a target="_blank" href="{{ mpmetadata.modelCodeRepository }}">{{ mpmetadata.modelCodeRepository }}</a></td></tr>{% endif %}
                           {% if mpmetadata.modelReleaseDate %}<tr><th class="text-muted">Release Date </th><td>{{ mpmetadata.modelReleaseDate |date:"SHORT_DATE_FORMAT" }}</td></tr>{% endif %}
                           {% if mpmetadata.modelVersion %}<tr><th class="text-muted">Version </th><td>{{ mpmetadata.modelVersion }}</td></tr>{% endif %}
                           {% if mpmetadata.modelWebsite %}<tr><th class="text-muted">Website </th><td><a href="{{ mpmetadata.modelWebsite }}" target="_blank">{{ mpmetadata.modelWebsite }}</a></td></tr>{% endif %}
                        </tbody>
                    </table>
                    <hr style="border:0"/>
                {% endif %}
                {% endif %}

            </div>
        </div>
    {% endif %}
{% endblock %}

{% block extra_css %}
    <link rel="stylesheet" type="text/css" href="{% static "css/bootstrap-multiselect.css" %}" />
    <link rel="stylesheet" type="text/css" href="{% static "css/model_program.css" %}" />
{% endblock %}

{% block extra_js %}
    {{ block.super }}
    <script src="{% static "js/bootstrap-multiselect.js"%}"></script>
    <script src="{% static "js/model_program.js"%}"></script>
{% endblock %}




{'fraction_non_alphanumeric': 0.140636820026133, 'fraction_numerical': 0.0019943607729867273, 'mean_word_length': 1.0247841826789195, 'pattern_counts': {'":': 0, '<': 218, '<?xml version=': 0, '>': 226, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 104, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4227529', 'n_tokens_mistral': 3603, 'n_tokens_neox': 3241, 'n_words': 605}