<commit_before>{% extends "base.html" %}
{% load navigation_tags %}
{% block content %}
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading tight">
                    <h3 class="has-filters">
                        Active Engagements
                        <div class="dropdown pull-right">
                            <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1"
                                    data-toggle="dropdown" aria-expanded="true">
                                <span class="fa fa-wrench"></span>
                                <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right" role="menu"
                                aria-labelledby="dropdownMenu1">
                                {% if request.user.is_staff %}
                                    <li role="presentation">
                                        <a href="{% url 'new_eng' %}">
                                            <i class="fa fa-plus"></i> New Engagement
                                        </a>
                                    </li>
                                {% endif %}
                            </ul>
                        </div>
                    </h3>
                </div>
                <div id="the-filters" class="panel-body collapse {% if request.META.QUERY_STRING %}in{% endif %}">
                    {% include "dojo/filter_snippet.html" with form=filtered.form %}
                </div>
            </div>
            {% if products %}

                <div class="clearfix">
                    {% include "dojo/paging_snippet.html" with page=products page_size=True %}
                </div>

                <div class="table-responsive panel panel-default">
                    <table id="engagements"
                           class="tablesorter-bootstrap table table-bordered table-condensed table-striped table-hover">
                        <tr>
                            <th class="prod_name">{% dojo_sort request 'Product' 'name' 'asc' %}</th>
                            <th class="prod_name">{% dojo_sort request 'Product Type' 'prod_type__name' %}</th>
                            <th>Active Engagements</th>
                        </tr>

                        {% for p in products %}
                            <tr>
                                <td class="prod_name"><a href="{% url 'view_product' p.id %}">{{ p.name }}</a>
                                  <sup>
                                   {% for tag in p.tags %}
                                        <a title="Search {{ tag }}" class="btn btn-tag btn-primary" href="{% url 'simple_search' %}?query={{ tag }}">{{ tag }}</a>
                                    {% endfor %}
                                  </sup>
                                </td>
                                <td class="prod_name"><a
                                        href="{% url 'product_type_metrics' p.prod_type.id %}">{{ p.prod_type.name }}</a>
                                </td>
                                <td>
                                    {% for e in p.engagement_set.all %}
                                        {% if e.active %}
						<div class="lineContainer">
							<a  style="display: inline" class="eng_link" href="{% url 'view_engagement' e.id %}">
                                                {% if e.name %}{{ e.name }} {% endif %}{{ e.target_start }}</a>
							| Lead: {{ e.lead.first_name }}
                                                        |
                                                        {%  for test in e.test_set.all %}
								{% if test.lead %}
                                                                <a href="{% url 'view_test' test.id %}"> {{ test.test_type }}: {{ test.lead.first_name }} </a> |
								{% else %}
                                                                <a href="{% url 'view_test' test.id %}"> {{ test.test_type }} </a> |
								{% endif %}
                                                        {% endfor %}
						</div>
                                                <sup>
                                                 {% for tag in e.tags %}
                                                      <a title="Search {{ tag }}" class="btn btn-tag btn-primary" href="{% url 'simple_search' %}?query={{ tag }}">{{ tag }}</a>
                                                  {% endfor %}
                                                </sup>
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endfor %}
                    </table><commit_msg>Fixed Enagement from all engagements<commit_after>{% extends "base.html" %}
{% load navigation_tags %}
{% block content %}
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading tight">
                    <h3 class="has-filters">
                        Active Engagements
                        <div class="dropdown pull-right">

                        </div>
                    </h3>
                </div>
                <div id="the-filters" class="panel-body collapse {% if request.META.QUERY_STRING %}in{% endif %}">
                    {% include "dojo/filter_snippet.html" with form=filtered.form %}
                </div>
            </div>
            {% if products %}

                <div class="clearfix">
                    {% include "dojo/paging_snippet.html" with page=products page_size=True %}
                </div>

                <div class="table-responsive panel panel-default">
                    <table id="engagements"
                           class="tablesorter-bootstrap table table-bordered table-condensed table-striped table-hover">
                        <tr>
                            <th class="prod_name">{% dojo_sort request 'Product' 'name' 'asc' %}</th>
                            <th class="prod_name">{% dojo_sort request 'Product Type' 'prod_type__name' %}</th>
                            <th>Active Engagements</th>
                            {% if user.is_staff %}
                                <th> Engagement</th>
                            {% endif %}
                        </tr>

                        {% for p in products %}
                            <tr>
                                <td class="prod_name"><a href="{% url 'view_product' p.id %}">{{ p.name }}</a>
                                  <sup>
                                   {% for tag in p.tags %}
                                        <a title="Search {{ tag }}" class="btn btn-tag btn-primary" href="{% url 'simple_search' %}?query={{ tag }}">{{ tag }}</a>
                                    {% endfor %}
                                  </sup>
                                </td>
                                <td class="prod_name"><a
                                        href="{% url 'product_type_metrics' p.prod_type.id %}">{{ p.prod_type.name }}</a>
                                </td>
                                <td>
                                    {% for e in p.engagement_set.all %}
                                        {% if e.active %}
						<div class="lineContainer">
							<a  style="display: inline" class="eng_link" href="{% url 'view_engagement' e.id %}">
                                                {% if e.name %}{{ e.name }} {% endif %}{{ e.target_start }}</a>
							| Lead: {{ e.lead.first_name }}
                                                        |
                                                        {%  for test in e.test_set.all %}
								{% if test.lead %}
                                                                <a href="{% url 'view_test' test.id %}"> {{ test.test_type }}: {{ test.lead.first_name }} </a> |
								{% else %}
                                                                <a href="{% url 'view_test' test.id %}"> {{ test.test_type }} </a> |
								{% endif %}
                                                        {% endfor %}
						</div>
                                                <sup>
                                                 {% for tag in e.tags %}
                                                      <a title="Search {{ tag }}" class="btn btn-tag btn-primary" href="{% url 'simple_search' %}?query={{ tag }}">{{ tag }}</a>
                                                  {% endfor %}
                                                </sup>
                                        {% endif %}
                                    {% endfor %}
                                </td>
                                {% if user.is_staff %}
                                    <td>
                                        <a class="btn btn-sm btn-success" href="{% url 'new_eng_for_prod' p.id %}">
                                            <i class="fa fa-plus"></i> Add
                                        </a>
                                    </td>
                                {% endif %}
                            </tr>
                        {% endfor %}
                    </table>
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0010566356720202875, 'mean_word_length': 0.7818147590361446, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 93, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4314218', 'n_tokens_mistral': 2342, 'n_tokens_neox': 2006, 'n_words': 466}