{# Shared column macros for the deployment report's instrument tables: every table identifies an instrument by nominal depth and height above bottom (HAB, defined in each table's caption), with units on a second header line so the columns stay narrow. Import with: {% import "_mooring_cols.html" as cols %} #} {% macro th(label, unit="", num=false) -%} {{ label }}{% if unit %}{{ unit }}{% endif %} {%- endmacro %} {% macro depth_heads() -%} {{ th("Nominal depth", "m", true) }}{{ th("HAB", "m", true) }} {%- endmacro %} {% macro depth_cells(instr) -%} {{ "%.0f"|format(instr.depth) if instr.depth is not none else "—" }} {% if instr.hab is not none %}{{ "%.0f"|format(instr.hab) }}{% else %}—{% endif %} {%- endmacro %} {% macro serial_cell(instr, mooring_name) -%} {% if instr.report_exists %}{{ instr.serial }}{% else %}{{ instr.serial }}{% endif %} {%- endmacro %}