{% extends "base.html" %} {% import "macros.html" as m %} {# The header (name, the line under it, Disqualify) stays on top. Below it the sections come in layout.toml's order (help: adjust-layout); their names, in the default order: enrich, next-step, details, contacts, tasks, drafts, merge, timeline. `hide` is the fields layout.toml hides on this page. #} {% block title %}{{ company.name }}{% endblock %} {% block content %} {%- set hide = layout_hidden('company') %}

{{ company.name }}

{% if company.product_oneliner and 'product_oneliner' not in hide %}

{{ company.product_oneliner }}

{% endif %}
{% if company.website and 'website' not in hide %}{{ company.website | replace('https://', '') | replace('http://', '') }}{% endif %} {% if company.linkedin and 'linkedin' not in hide %}linkedin{% endif %} {{ company.stage }}{% if company.lost_reason and 'lost_reason' not in hide %} ({{ company.lost_reason }}){% endif %}{% if company.requalify_on and 'requalify_on' not in hide %}, requalifies on {{ fmt_date(company.requalify_on) }}{% endif %} · {{ company.days_in_stage(today) }}d in stage last touch: {{ company.last_touch_summary }} {% for f in custom_fields_for('company') if f.shows_in('detail') and f.key not in hide and company.extra.get(f.key) not in (none, '') %} {{ f.label }} {{ f.display(company.extra.get(f.key)) }} {% endfor %} {% set exits = stage_exits(company.stages) %} {% if company.stages.role_of(company.stage) in ['closed', 'parked'] %}
{% elif exits %}
{% if exits | map(attribute='name') | select('in', ['disqualified', 'temp-disqualified']) | list | length == exits | length %}Disqualify{% else %}Close or park{% endif %}
{% endif %}
{%- for section in layout_sections('company') %}{% if section == 'enrich' %}
{% if enricher and enricher.available %}
{% endif %}
Fetch from URL
{% elif section == 'next-step' %}{% set nxt = company.next_todo() %}
next step: {{ (nxt.text or '(no text)') if nxt else 'none' }}{% if nxt and nxt.contact %} ({{ nxt.contact.name }}){% endif %}{% if nxt and nxt.due %}, due {{ fmt_date(nxt.due) }}{% endif %} {% if nxt %} {{ 'done' if nxt.done else 'open' }} {{ m.todo_actions(company, nxt) }} {% if nxt.due and not nxt.done %} Add to Google Calendar {% endif %} {% endif %} all tasks
{% elif section == 'details' %}

Company

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

slug {{ company.slug }} · created {{ fmt_datetime(company.created) }} · updated {{ fmt_datetime(company.updated) }} · stage changed {{ fmt_date(company.stage_changed) }}

{% if company.stage_history %}
Stage history ({{ company.stage_history | length }})
{% for e in company.stage_history | reverse %} {% endfor %}
datefromtoreason
{{ fmt_date(e.date) }}{{ e.from_stage or '-' }}{{ e.to_stage }}{{ e.reason }}
{% endif %}
{% elif section == 'contacts' %}

Contacts ({{ company.contacts | length }})

{% for slug, c in company.contacts.items() %} {% else %} {% endfor %}
nametitleroleemaillinkedin
{{ c.name }} {{ c.title }} {{ c.role }} {% if c.email %}{{ c.email }}{% endif %} {% if c.linkedin %}profile{% endif %} log · drafts
No contacts yet.

New contact · an interaction is always with a person: log it, or a note, on their page.

{% elif section == 'tasks' %} {{ m.task_section(company, today) }} {% elif section == 'drafts' %} {{ m.drafts_section(company, draft_contact, drafts, signal, observation, '/companies/' ~ company.slug) }} {% elif section == 'merge' %}

Merge

{% elif section == 'timeline' %}

Timeline ({{ company.interactions | length }})

{{ m.timeline(company, company.interactions) }}
{% endif %}{% endfor %} {% if focus == 'lost_reason' %} {% endif %} {% endblock %}