{% block inspection_pictures %} {% set observations_per_page = 2 %} {% set total_observations = inspection.observations|length %} {% set total_pages = ((total_observations / observations_per_page) | round(0, 'ceil')) | int %} {% for page_num in range(1, total_pages + 1) %}
{% set title = "Inspection Pictures / Inspection : Manhole ID: " ~ (inspection.header.location.access_point_no if inspection.header.location.access_point_no else "") %} {% set border_bottom = false %} {% set border_top = false %} {% include "nassco/macp/page_title.html" %}

Place:

{% if inspection.header.location.city %}

{{ inspection.header.location.city }}

{% endif %}

Road:

{% if inspection.header.location.street %}

{{ inspection.header.location.street }}

{% endif %}

Date (YYYY/MM/DD):

{% if inspection.header.survey.survey_date %}

{{ inspection.header.survey.survey_date.strftime("%Y/%m/%d") }}

{% endif %}

Camera:

{% if inspection.header.survey.inspection_technology and inspection.header.survey.inspection_technology.label %}

{{ inspection.header.survey.inspection_technology.label }}

{% endif %}

Operator:

{% if inspection.header.survey.surveyed_by %}

{{ inspection.header.survey.surveyed_by }}

{% endif %}
{% set start_index = (page_num - 1) * observations_per_page %} {% set end_index = start_index + observations_per_page if start_index + observations_per_page <= total_observations else total_observations %} {% for i in range(start_index, end_index) %} {% set observation = inspection.observations[i] %}
{% if observation.annotated_frame %} {% endif %}

Photo: {{ image_prefix }}{{ i + 1 }}.png{% if observation.video_ref %}, {{ observation.video_ref }}{% endif %}

{% if observation.distance is not none %}{{ observation.distance }}{{ measurement_units }}{% endif %}{% if observation.code and observation.code.full_name %}, {{ observation.code.label }}{% endif %}{% if observation.component %}, {{ observation.component.full_name }}{% endif %}

{% if not loop.last %}
{% endif %} {% endfor %}
{% endfor %} {% endblock %}