{% load i18n tz %}

{% trans "Field notes" %} ({{ note_count|default:0 }})

{% trans "Human context, separate from detection evidence. Notes are private by default. Add a follow-up to correct an earlier entry." %}

{% if note_target %}

{% trans "Report" %} #{{ note_target.pk }} · {{ note_target.occurrences }} {% trans "bangs" %}

{% endif %} {% if note_saved %}

{% trans "Field note saved." %}

{% endif %}
{% trans "Add field note" %}
{% csrf_token %} {% if note_token %}{% elif note_kind %}{% endif %} {{ note_form.non_field_errors }}
{{ note_form.content.label_tag }}{{ note_form.content }}{{ note_form.content.errors }}
{% trans "Optional details" %}
{% for field in note_form %}{% if field.name != 'content' %}
{{ field.label_tag }}{{ field }}{% if field.help_text %}{{ field.help_text }}{% endif %}{{ field.errors }}
{% endif %}{% endfor %}
    {% for note in field_notes %}
  1. {{ note.get_category_display }} · {{ note.author.get_username }} · {{ note.get_visibility_display }}

    {{ note.get_source_type_display }} · {{ note.get_verification_status_display }}

    {{ note.content }}

    {% trans "Entered" %}: {% if note.observed_at %}
    {% trans "Observed" %}: {% endif %}

    {% if note.context.event_id %}{% trans "Event" %} #{{ note.context.event_id }}{% elif note.context.pending_event_id %}{% trans "Pending report" %} #{{ note.context.pending_event_id }}{% else %}{% if note_token %}{% trans "Current observation — not yet submitted" %}{% else %}{% trans "Standalone observation" %}{% endif %}{% endif %} {% if note.context.associations.all %}
    {% trans "Association history" %}
      {% for change in note.context.associations.all %}
    • {{ change.created_at|localtime|date:"j M Y, H:i" }} · {{ change.reason }} · {{ change.previous.kind|default:"standalone" }} {{ change.previous.id|default:"" }} → {{ change.target.kind }} {{ change.target.id }}
    • {% endfor %}
    {% endif %} {% if not note_kind and not note.context.event_id and not note.context.pending_event_id and note.author_id == request.user.pk %}
    {% csrf_token %}
    {% endif %}
  2. {% empty %}
  3. {% trans "No field notes visible to you yet." %}
  4. {% endfor %}

{% trans "My field notes" %}