<commit_before>{% extends "base.html" %}
{% load aktivator_tags %}

<html>
<head>
  {% block head %}
  <script type="text/javascript" src="/static/chosen/chosen.jquery.js"></script>
  <link rel="stylesheet" type="text/css" href="/static/chosen/chosen.css" />
  <script type="text/javascript" src="/static/chosen/chosen.jquery.js"></script>
  <script type="text/javascript">
    $(window).load(function() {
      $("select[multiple]").chosen();
    });

    $("a[href='#contact_form']").live("click", function() {
      $("a[href='#contact-history']").click();
      return true;
    });
    saveSkills = function() {
      var form = $("#skills");
      $.post(form.attr("action"), form.serialize());
    };
    addSkill = function() {
      $("<div class='input-prepend'><span class='add-on'><a href='#' class='icon-minus-sign'></a></span><input type='text' name='skills' /></div>").appendTo("#skills");
    };
    $("#skills .input-prepend a.icon-minus-sign").live("click", function() {
      $(this).closest(".input-prepend").remove();
      saveSkills();
      return false;
    });
    $("#skills a.add").live("click", function() {
      addSkill();
      return false;
    });
    $("#skills").live("submit", function() {
      saveSkills();
      return false;
    });
    $("#skills").live("change", function() {
      saveSkills();
      return false;
    });
    $("#skills").live("blur", function() {
      saveSkills();
      return false;
    });
    $("#user_tags a[data-tag-name]").live("click", function() {
      var tag = $(this).data("tag-name");
      var form = $("ul#user_tags li#" + tag).find("form.remove_tag");
      $.post(form.attr("action"), form.serialize(), function(data) {
        return;
      });
      $("ul#user_tags li#" + tag).remove();
      return false;
    });

  </script>
  <script type="text/javascript">
    $(window).load(function() {
      $("#num_results").text($("tr.gradeA").length);
      $("table.datatable").dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers"
      });
    });
  </script>
  <style type="text/css">
    form.remove_tag {
      display: none;
    }
    li.bsmListItem {
      border-radius: 5px;
      margin: 2px 0;
    }
    a.bsmListItemRemove {
      color: #C95A00;
      font-size: 0.75em;
    }
    div.includeSet {
      background-color: #EEE;
      border-radius: 9px;
    }
  </style>
  {% endblock %}
</head>
<body>
{% block nav %}
<li><a href="{% url home %}">New Search</a></li>
{% if query %}
<li><a href="{% url search %}?{{query}}">Back to Results</a></li>
{% endif %}
{% endblock %}
{% block content %}
<div class="row">
<div class="span6" id="content-box">
 <p>
   <strong>AKID:</strong>
   <a target="_blank" href="{{ ACTIONKIT_URL }}/admin/core/user/{{ agent.id }}/">
     {{ agent.id }}
   </a>
 </p>
 <p>
   <strong>Name:</strong> {{ agent }}
 </p>
 <p>
   <strong>Email:</strong> {{ agent.email }}
 </p>
 <p>
   <strong>Phone:</strong> {{ agent.phone }}
 </p>
 <p>
   <strong>ZIP:</strong> {{ agent.zip }}
 </p>
 <p>
   <strong>Address:</strong> {{ agent.formatted_address }}
 </p>

 <p>
   <strong>Tags:</strong>
   {{ agent_tags|joined_by:", " }}
 </p>

</div>
<div class="span6">
  <p>
    <strong>Lifetime Donations:</strong> ${{ total_donations }}
  </p>
  <p>
    <strong>Opens:</strong> {{ opens|length }}
    &mdash;
    <strong>Clicks:</strong> {{ clicks|length }}
    &mdash;
    <strong>Sends:</strong> {{ sends.count }}
  </p>

  <p>
    <a href="#contact_form">Add New Contact Record</a>
  </p>

</div>
</div>

<div class="row">
  <div class="span12">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#contact-history" data-toggle="tab">Contact History</a></li>
      <li><a href="#action-history" data-toggle="tab">Action History</a></li>
      <li><a href="#donation-history" data-toggle="tab">Donation History</a></li>
      <li><a href="#mailing-history" data-toggle="tab">Mailing History</a></li>
      <li><a href="#tags" data-toggle="tab">Tags</a></li>
    </ul>

    <div class="tab-content">
    <div class="tab-pane active" id="contact-history">
      <div class="datatables_wrapper">
	<table class="display datatable" id="contact_data"><commit_msg>lifetime X<commit_after>{% extends "base.html" %}
{% load aktivator_tags %}

<html>
<head>
  {% block head %}
  <script type="text/javascript" src="/static/chosen/chosen.jquery.js"></script>
  <link rel="stylesheet" type="text/css" href="/static/chosen/chosen.css" />
  <script type="text/javascript" src="/static/chosen/chosen.jquery.js"></script>
  <script type="text/javascript">
    $(window).load(function() {
      $("select[multiple]").chosen();
    });

    $("a[href='#contact_form']").live("click", function() {
      $("a[href='#contact-history']").click();
      return true;
    });
    saveSkills = function() {
      var form = $("#skills");
      $.post(form.attr("action"), form.serialize());
    };
    addSkill = function() {
      $("<div class='input-prepend'><span class='add-on'><a href='#' class='icon-minus-sign'></a></span><input type='text' name='skills' /></div>").appendTo("#skills");
    };
    $("#skills .input-prepend a.icon-minus-sign").live("click", function() {
      $(this).closest(".input-prepend").remove();
      saveSkills();
      return false;
    });
    $("#skills a.add").live("click", function() {
      addSkill();
      return false;
    });
    $("#skills").live("submit", function() {
      saveSkills();
      return false;
    });
    $("#skills").live("change", function() {
      saveSkills();
      return false;
    });
    $("#skills").live("blur", function() {
      saveSkills();
      return false;
    });
    $("#user_tags a[data-tag-name]").live("click", function() {
      var tag = $(this).data("tag-name");
      var form = $("ul#user_tags li#" + tag).find("form.remove_tag");
      $.post(form.attr("action"), form.serialize(), function(data) {
        return;
      });
      $("ul#user_tags li#" + tag).remove();
      return false;
    });

  </script>
  <script type="text/javascript">
    $(window).load(function() {
      $("#num_results").text($("tr.gradeA").length);
      $("table.datatable").dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers"
      });
    });
  </script>
  <style type="text/css">
    form.remove_tag {
      display: none;
    }
    li.bsmListItem {
      border-radius: 5px;
      margin: 2px 0;
    }
    a.bsmListItemRemove {
      color: #C95A00;
      font-size: 0.75em;
    }
    div.includeSet {
      background-color: #EEE;
      border-radius: 9px;
    }
  </style>
  {% endblock %}
</head>
<body>
{% block nav %}
<li><a href="{% url home %}">New Search</a></li>
{% if query %}
<li><a href="{% url search %}?{{query}}">Back to Results</a></li>
{% endif %}
{% endblock %}
{% block content %}
<div class="row">
<div class="span6" id="content-box">
 <p>
   <strong>AKID:</strong>
   <a target="_blank" href="{{ ACTIONKIT_URL }}/admin/core/user/{{ agent.id }}/">
     {{ agent.id }}
   </a>
 </p>
 <p>
   <strong>Name:</strong> {{ agent }}
 </p>
 <p>
   <strong>Email:</strong> {{ agent.email }}
 </p>
 <p>
   <strong>Phone:</strong> {{ agent.phone }}
 </p>
 <p>
   <strong>ZIP:</strong> {{ agent.zip }}
 </p>
 <p>
   <strong>Address:</strong> {{ agent.formatted_address }}
 </p>

 <p>
   <strong>Tags:</strong>
   {{ agent_tags|joined_by:", " }}
 </p>

</div>
<div class="span6">
  <p>
    <strong>Lifetime donations:</strong> ${{ total_donations }}
  </p>
  <p>
    <strong>Lifetime email opens:</strong> {{ opens|length }}
  </p>
  <p>
    <strong>Lifetime email clicks:</strong> {{ clicks|length }}
  </p>
  <p>
    <strong>Lifetime email sends:</strong> {{ sends.count }}
  </p>

  <p>
    <a href="#contact_form">Add New Contact Record</a>
  </p>

</div>
</div>

<div class="row">
  <div class="span12">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#contact-history" data-toggle="tab">Contact History</a></li>
      <li><a href="#action-history" data-toggle="tab">Action History</a></li>
      <li><a href="#donation-history" data-toggle="tab">Donation History</a></li>
      <li><a href="#mailing-history" data-toggle="tab">Mailing History</a></li>
      <li><a href="#tags" data-toggle="tab">Tags</a></li>
    </ul>

    <div class="tab-content">
    <div class="tab-pane active" id="contact-history">
      <div class="datatables_wrapper">
	<table class="display datatable" id="contact_data">
{'fraction_non_alphanumeric': 0.23440453686200377, 'fraction_numerical': 0.003544423440453686, 'mean_word_length': 3.1699507389162562, 'pattern_counts': {'":': 4, '<': 227, '<?xml version=': 0, '>': 227, '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': '3193903', 'n_tokens_mistral': 3026, 'n_tokens_neox': 2953, 'n_words': 524}