{% extends "base.html" %} {% block title %} SAR job details {% endblock %} {% block content %}

#{{ sar.SARCall.id }} : {{ sar.SARCall.title }}

Created at: {{ sar.SARCall.created }}

Last updated: {{ sar.SARCall.updated }}

Coordination manager: {{ sar.SARCall.coordination_officer.full_name }}

Search manager: {{ sar.SARCall.search_officer.full_name }}

Status: {{ sar.SARStatus.name }}

{% if is_logged_in %}

Category: {{ sar.SARCategory.name }}

{% endif %}

Start Date: {{ sar.SARCall.start_date }}

Finish Date: {{ sar.SARCall.finish_date }}

Result: {{ sar.SARResult.name }}

IPP lat: {{ sar.SARCall.latitude }}

IPP lon: {{ sar.SARCall.longitude }}

Found lat: {{ sar.SARCall.latitude_found }}

Found lon: {{ sar.SARCall.longitude_found }}

Description: {{ sar.SARCall.description }}

{% if is_logged_in %}

Description private: {{ sar.SARCall.description_hidden }}

{% endif %}
{% if is_logged_in %} {# EDIT #} 🗑 {# DELETE #} {% endif %}
{% for comment in sar.SARCall.comments %}
Comment # {{ comment.id }} by {{ comment.user.full_name }} at {{ comment.created }}, updated {{ comment.updated }}
{# Comment text #}
{% if is_logged_in %}

{{ comment.text }}

{% if current_user.id == comment.user_id or current_user.id == 1 or current_user.id == sar.SARCall.user_id %} {% endif %}
{# GPX tracks part #}
{% set ns = namespace(drawn = false) %} GPX track: {% for gpx_track in comments_with_gpx %} {% if gpx_track.comment_id == comment.id %}
  • {{ gpx_track.name }}
  • {% set ns.drawn = true %} {% endif %} {% endfor %} {% if ns.drawn == false %} {% endif %}
    {# File attachments part #} File attachment:

    {% set ns=namespace(has_file = false) %} {% set fs=namespace(filename = 0) %} {% for file in comments_with_attachment %} {% if file.comment_id == comment.id %} {% set ns.has_file = true %} {% if file.is_image %} {% else %} {{ file.file_name }} {% endif %} {% set fs.filename = file.id %} {% endif %} {% endfor %} {% if is_logged_in %} {% if ns.has_file %}

    {# Delete attachment #}
    {% else %}
    {% endif %} {% endif %} {% endif %}
    {% endfor %} {% if is_logged_in %}
    {% endif %}
    {% endblock %}