<commit_before>{% extends "cvgraph/base.html" %}
{% load cvgraph_tags %}

{% block content %}

  <h1>{{ role.name }}</h1>
  {% if user.is_authenticated %}
    {% cvgraph_node_edit_properties role %}
  {% endif %}

  {% if role.companies %}
    {% with company=role.companies.single.0 %}
      <h2>{% include 'cvgraph/_node_detail_link.html' with url='cvgraph:company_detail' node=company text=company.name %}</h2>
      {% cvgraph_node_delete company %}
      {% cvgraph_node_unlink role "companies" company %}
    {% endwith %}
  {% else %}
    {% if user.is_authenticated %}
      {% cvgraph_node_create_related role "companies" "name" %}
      {% cvgraph_node_link_related role "companies" %}
    {% endif %}
  {% endif %}

  {% if role.via_roles %}
    {% for via_role in role.via_roles %}
      (via
      {% include 'cvgraph/_node_detail_link.html' with url='cvgraph:role_detail' node=via_role text=via_role %})
      {% cvgraph_node_delete via_role %}
      {% cvgraph_node_unlink role "via_roles" via_role %}
    {% endfor %}
  {% else %}
    {% if user.is_authenticated %}
      {% cvgraph_node_create_related role "via_roles" "name" %}
      {% cvgraph_node_link_related role "via_roles" %}
    {% endif %}
  {% endif %}

  {% for person in role.people %}
    {% with performed=role.people|relationship:person %}
      <p>
        {% include 'cvgraph/_node_detail_link.html' with url='cvgraph:person_detail' node=person text=person.name %}
        performed this role{% if performed.start_date and performed.end_date %}
        between {{ performed.start_date }} and {{ performed.end_date }}{% elif performed.start_date %}
        starting {{ performed.start_date }}{% elif performed.end_date %}
        until {{ performed.end_date }}{% endif %}.
      </p>
      {% if user.is_authenticated %}
        {% cvgraph_rel_edit_properties performed %}
      {% endif %}
    {% endwith %}
  {% endfor %}

  {% include 'cvgraph/_notes.html' with node=role %}

{% endblock %}<commit_msg>Tweak wording of role dates in role details.<commit_after>{% extends "cvgraph/base.html" %}
{% load cvgraph_tags %}

{% block content %}

  <h1>{{ role.name }}</h1>
  {% if user.is_authenticated %}
    {% cvgraph_node_edit_properties role %}
  {% endif %}

  {% if role.companies %}
    {% with company=role.companies.single.0 %}
      <h2>{% include 'cvgraph/_node_detail_link.html' with url='cvgraph:company_detail' node=company text=company.name %}</h2>
      {% cvgraph_node_delete company %}
      {% cvgraph_node_unlink role "companies" company %}
    {% endwith %}
  {% else %}
    {% if user.is_authenticated %}
      {% cvgraph_node_create_related role "companies" "name" %}
      {% cvgraph_node_link_related role "companies" %}
    {% endif %}
  {% endif %}

  {% if role.via_roles %}
    {% for via_role in role.via_roles %}
      (via
      {% include 'cvgraph/_node_detail_link.html' with url='cvgraph:role_detail' node=via_role text=via_role %})
      {% cvgraph_node_delete via_role %}
      {% cvgraph_node_unlink role "via_roles" via_role %}
    {% endfor %}
  {% else %}
    {% if user.is_authenticated %}
      {% cvgraph_node_create_related role "via_roles" "name" %}
      {% cvgraph_node_link_related role "via_roles" %}
    {% endif %}
  {% endif %}

  {% for person in role.people %}
    {% with performed=role.people|relationship:person %}
      {% if performed.start_date or performed.end_date %}
        <p>
          {% include 'cvgraph/_node_detail_link.html' with url='cvgraph:person_detail' node=person text=person.name %}
          {% if performed.start_date and performed.end_date %}
          performed this role between {{ performed.start_date }} and {{ performed.end_date }}{% elif performed.start_date %}
          started performing this role {{ performed.start_date }}{% elif performed.end_date %}
          will perform this role until {{ performed.end_date }}{% endif %}.
        </p>
      {% endif %}
      {% if user.is_authenticated %}
        {% cvgraph_rel_edit_properties performed %}
      {% endif %}
    {% endwith %}
  {% endfor %}

  {% include 'cvgraph/_notes.html' with node=role %}

{% endblock %}
{'fraction_non_alphanumeric': 0.14699493120926865, 'fraction_numerical': 0.0024137098720733766, 'mean_word_length': 3.2372188139059306, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5989689', 'n_tokens_mistral': 1505, 'n_tokens_neox': 1294, 'n_words': 267}