{% extends "base.html" %} {% import "macros.html" as m %} {# The header (name, the line under it) stays on top. Below it the sections come in layout.toml's order (help: adjust-layout); their names, in the default order: details, timeline, quick-add, tasks, drafts, merge, delete. `hide` is the fields layout.toml hides on this page. The odd blank lines keep the default page byte for byte what it was before layouts. #} {% block title %}{{ contact.name }}{% endblock %} {% block content %} {%- set hide = layout_hidden('contact') %}

{{ contact.name }}

{{ company.name }}{% if 'title' not in hide %} · {{ contact.title or 'no title' }}{% endif %}{% if 'role' not in hide %} · {{ contact.role or 'no role' }}{% endif %}{% if 'email' not in hide %} · {% if contact.email %}{{ contact.email }}{% else %}no email{% endif %}{% endif %}{% if 'phone' not in hide %} · {{ contact.phone or 'no phone' }}{% endif %} {% if contact.linkedin and 'linkedin' not in hide %} · linkedin{% endif %} {% if enricher and enricher.available %}
{% endif %}
{% for section in layout_sections('contact') %}{% if section == 'details' %}

Contact

{{ m.errors_box(errors) }}
{{ m.contact_fields(values, errors) }}

slug {{ contact.slug }} · created {{ fmt_datetime(contact.created) }} · updated {{ fmt_datetime(contact.updated) }}

{% elif section == 'timeline' %}

Interactions ({{ interactions | length }})

{{ m.timeline(company, interactions) }}
{% elif section == 'quick-add' %}

Log an interaction

{{ m.interaction_form('/companies/' ~ company.slug ~ '/interactions', company, interaction, contact=contact) }}
{% elif section == 'tasks' %}

Tasks for {{ contact.name }}

Things you owe this person. {{ company.name }}'s next step is its open task due first, which can be one of these.

{{ m.task_list(company, contact.tasks, today, contact=contact.slug) }}
{% elif section == 'drafts' %} {{ m.drafts_section(company, contact, drafts, signal, observation, '/companies/' ~ company.slug ~ '/contacts/' ~ contact.slug) }} {% elif section == 'merge' %} {% if company.contacts | length > 1 %}

Merge

{% endif %} {% elif section == 'delete' %}

Delete

{% set open_tasks = contact.tasks | rejectattr('done') | list %} {% set confirm_text = 'Delete ' ~ contact.name ~ '?' ~ ((' Their ' ~ interactions | length ~ ' interaction(s) stay on ' ~ company.name ~ ' without a contact.') if interactions else '') ~ ((' Their ' ~ open_tasks | length ~ ' open task(s) go with them.') if open_tasks else '') %}
{% if interactions %}{{ interactions | length }} interaction(s) stay on {{ company.name }}, without a contact.{% else %}No interactions are linked to this contact.{% endif %}
{% endif %}{% endfor %}{% endblock %}