{% extends "base.html" %} {% import "_fields.html" as fm %} {% import "_agreement_text.html" as ag %} {% import "_journal.html" as jn %} {% block main %}
Contracts / {{ client_name }}
{{ head.code }}

{{ head.title }}

{% if artist %}artist {% endif %}{{ kind_label }}·for {{ client_name }}{% if shown.status %} {{ shown.status.label }}{% endif %}

Facts

{% for it in shown.items %}
{{ it.label }}
{% if it.href %}{{ it.value }}{% else %}{{ it.value }}{% endif %}
{% endfor %}
Opened
{{ opened }}{% if head.created_by %} by {{ head.created_by }}{% endif %}

Versions

never changed once added
{% for v in versions %}
Version {{ v.version }}{% if loop.first %}newest{% endif %}{{ v.at }} · {{ v.by }}
{{ v.note }}
{% if v.body_sha %}
text {{ v.body_sha[:16] }}…
{% endif %} {% if v.file_sha %}
file {{ v.file_sha[:16] }}…
{% endif %}
{% else %}

No version yet: add the first draft below, as a text, a file or both.

{% endfor %}
{% if reading %}

{% if compare %}Version {{ reading }} against version {{ before }}{% else %}Version {{ reading }}{% endif %}{% if reading_note %}: {{ reading_note }}{% endif %}

{% if before %}{% if compare %}Show the text{% else %}Compare with version {{ before }}{% endif %}{% endif %}
{% if compare %} {% if diff %}

Lines taken out are struck through in red, lines added are marked in green.

{% for l in diff %}
{% if l.op == "removed" %}{{ l.text or " " }}{% elif l.op == "added" %}{{ l.text or " " }}{% else %}{{ l.text or " " }}{% endif %}
{% endfor %}
{% else %}

The texts are too long to compare here.

{% endif %} {% else %} {{ ag.text(blocks) }} {% if reading_sha %}

SHA-256 {{ reading_sha }}

{% endif %} {% endif %}
{% endif %}

Add version {{ next_version }}

A new draft, the other side's changes, the final text, the scan of the signed paper: each is a version. Keep the text here, attach the file (PDF or a scan), or both. A version never changes once added; its fingerprints go into the journal.

{{ fm.text("note", "What this version is", draft_note, err=errors.note, req=true, cls="wide", ph="Such as: first draft, the label's changes, signed by both sides") }} {{ fm.area("body", "Text", draft_body, err=errors.body, rows=14, fcls="wide", hint="Paragraphs separated by an empty line, # before a heading, - before a list item. It starts as the last version's text; leave it as it is to add only a file.") }}
{% if uploads %}

PDF, JPEG, PNG or WebP, up to {{ file_mb }} MB. Stored encrypted, like every document.

{% else %}

This server keeps no files: add the text only.

{% endif %} {% if errors.file %}

{{ errors.file }}

{% endif %}

Paper copies

Each paper gets an id to write on it, or a label to print. Its record says where it lies; every move goes into the journal.

{% if papers %}
{% for p in papers %} {% endfor %}
IdPaperWhere it is
{{ p.code }} {{ p.what }}{% if p.version %}
version {{ p.version }}
{% endif %}
{{ p.state_label }} {{ p.location }}{% if p.holder %}
with {{ p.holder }}
{% endif %}
since {{ p.moved }}
Label
Move
{% endif %}

Register a paper copy

{{ fm.text("what", "What it is", "", req=true, list="whats", ph="Signed original") }}
{{ fm.text("location", "Where it is filed", "", req=true, list="locations", cls="wide", ph="Office, cabinet A, drawer 2, folder of the client") }}
{% for w in whats %}{% endfor %} {% for l in locations %}{% endfor %}

Journal of this contract

The whole journal, checked
{% if entries %}{{ jn.list(entries) }}{% else %}

Nothing yet.

{% endif %}
{% endblock %}