{% block main_sections %}
{% set title = "&#8721;&#8709; / Main sections / Inspection: Sewer ID: " ~ (inspection.header.pipe.pipeline_length_reference if inspection.header.pipe.pipeline_length_reference else "") %}
{% include "wrc/mainline/page_title.html" %}
{% include "wrc/mainline/table_header_row.html" %}
<div class="container border-top-0" style="page-break-after: always;">
  <div class="column">
    <div class="row w-full">
      <div class="text-center font-semibold font-extra-small box flex-1 border-bottom-0 border-left-0">No:</div>
      <div class="text-center font-semibold font-extra-small box flex-2 border-bottom-0 border-left-0">Upstream MH:</div>
      <div class="text-center font-semibold font-extra-small box flex-2 border-bottom-0 border-left-0">Downstream MH:</div>
      <div class="text-center font-semibold font-extra-small box flex-1 border-bottom-0 border-left-0">Date:</div>
      <div class="text-center font-semibold font-extra-small box flex-2 border-bottom-0 border-left-0">Road:</div>
      <div class="text-center font-semibold font-extra-small box flex-1 border-bottom-0 border-left-0">Material:</div>
      <div class="text-center font-semibold font-extra-small box flex-2 border-bottom-0 border-left-0">SIP Length:</div>
      <div class="text-center font-semibold font-extra-small box flex-2 border-bottom-0 border-left-0">CCTV Length:</div>
    </div>
    <div class="row w-full">
      <div class="text-center font-extra-small box h-1 flex-1 border-left-0">1</div>
      <div class="text-center font-extra-small box h-1 flex-2 border-left-0">
        {% if inspection.header.measurements.start_node_reference %}
        {{ inspection.header.measurements.start_node_reference }}
        {% endif %}
      </div>
      <div class="text-center font-extra-small box h-1 flex-2 border-left-0">
        {% if inspection.header.measurements.finish_node_reference %}
        {{ inspection.header.measurements.finish_node_reference }}
        {% endif %}
      </div>
      <div class="text-center font-extra-small box h-1 flex-1 border-left-0">
        {% if inspection.header.survey.survey_date %}
        {{ inspection.header.survey.survey_date.strftime("%m/%d/%y") }}
        {% endif %}
      </div>
      <div class="text-center font-extra-small box h-1 flex-2 border-left-0">
        {% if inspection.header.location.location_street_name %}
        {{ inspection.header.location.location_street_name }}
        {% endif %}
      </div>
      <div class="text-center font-extra-small box h-1 flex-1 border-left-0">
        {% if inspection.header.pipe.material %}
        {{ inspection.header.pipe.material }}
        {% endif %}
      </div>
      <div class="text-center font-extra-small box h-1 flex-2 border-left-0">
        &nbsp;
      </div>
      <div class="text-center font-extra-small box h-1 flex-2 border-left-0">
        {% if inspection.header.pipe.expected_length %}
        {{ inspection.header.pipe.expected_length }} {{ measurement_units }}
        {% endif %}
      </div>
    </div>
    <div class="row font-small box h-1 w-full border-top-0 border-left-0 border-right-0" style="color: red; font-weight: bold;">
      <p class="text-center m-0 mx-auto">Pipe size: {% if inspection.header.pipe.height_or_diameter %}{{ inspection.header.pipe.height_or_diameter }}{{ pipe_size_units }}{% endif %} = {% if inspection.header.pipe.expected_length %}{{ inspection.header.pipe.expected_length }}{{ measurement_units }}{% endif %}</p>
    </div>
    <div class="row font-small box h-1 w-full mt-2 border-left-0 border-right-0" style="color: red; font-weight: bold;">
      <p class="text-center m-0 mx-auto">All Sections: {% if inspection.header.pipe.expected_length %}{{ inspection.header.pipe.expected_length }}{% endif %} {{ measurement_units }}</p>
    </div>
  </div>
</div>
{% endblock %}`
