<tbody>

    <tr>
        <td style="vertical-align: middle; text-align: center;">
          <img ng-if="zoneMuxStatus(ind) === 'ACTIVE-MASTER'"
               ng-src="{[ '/images/zone-mux-joining.svg' | augeasStatic ]}"
               style="position: absolute; margin-left: -20px; margin-top: -6px;"/>
          {[ ind + 1 ]}
        </td>
        <td style="width:104px">
          <enable-zone-button index="ind" disabled="zonesBusy[ind]">
            <on-button translate translate-context="(антоним к 'Выключить')">Включить</on-button>
            <off-button translate>Выключить</off-button>
          </enable-zone-button>
        </td>
        <td colspan="10" style="vertical-align: middle;" ng-show="zonesBusy[ind]" translate>
            Шлейф используется в автоматике в качестве выхода
        </td>
        <td ng-show="!zonesBusy[ind]">
          <select class="form-control"
              ng-model="zoneList[ind]"
              ng-options="zt['value'] as zt['text'] for zt in getAvailableZoneTypes(ind)"
              ng-change="zoneTypeChanged(ind)"
              ng-disabled="!zones.isEnabled(ind)"></select>
        </td>
        <td ng-show="!zonesBusy[ind]">
          <select class="form-control"
              ng-model="zones.get(ind).wired.normal_state"
              ng-options="id as name for (id, name) in normalStates"
              ng-disabled="!zones.isEnabled(ind)"
              ng-show="showResistanceRangeAndNormal(zones.get(ind).common.type)">
          </select>
        </td>
        <td ng-if="showResistors()" ng-show="!zonesBusy[ind]" ng-switch="zoneMuxStatus(ind)">
          <input type="text" class="form-control"
              ng-switch-when="ACTIVE-MASTER"
              ng-model="resistorForMuxMaster"
              size="5"
              disabled="disabled">
          </input>
          <input type="text" class="form-control"
              ng-switch-when="ACTIVE-SLAVE"
              ng-model="resistorForMuxSlave"
              size="5"
              disabled="disabled">
          </input>
          <select class="form-control"
              ng-switch-default
              ng-model="zones.get(ind).wired.resistors"
              ng-options="r.value as r.text for r in resistors"
              ng-disabled="!zones.isEnabled(ind)"
              ng-show="showResistanceRangeAndNormal(zones.get(ind).common.type)">
          </select>
        </td>
        <td ng-show="!zonesBusy[ind]">
          <select class="form-control"
            ng-model="zones.get(ind).common.entry_delay"
            ng-options="delay.value as delay.text for delay in delays"
            ng-disabled="!zones.isEnabled(ind)"
            ng-show="canHaveDelays(zones.get(ind).common)">
          </select>
        </td>
        <td ng-show="!zonesBusy[ind]">
          <select class="form-control"
            ng-model="zones.get(ind).common.exit_delay"
            ng-options="delay.value as delay.text for delay in delays"
            ng-disabled="!zones.isEnabled(ind)"
            ng-show="canHaveDelays(zones.get(ind).common)">
          </select>
        </td>
        <td ng-show="!zonesBusy[ind]" class="glyphs">
          <a ng-show="zoneMuxStatus(ind) === 'INACTIVE-MASTER' && !isFireZone(ind)"
            href=""
            ng-click="activateZoneMux(ind)">
            <img ng-src="{[ '/images/zone-mux-activate.svg' | augeasStatic ]}"/>
          </a>
          <a ng-show="zoneMuxStatus(ind) === 'ACTIVE-SLAVE'"
            href=""
            ng-click="deactivateZoneMux(ind)">
            <img ng-src="{[ '/images/glyph-delete.svg' | augeasStatic ]}"/>
          </a>
          <a ng-show="zoneMuxStatus(ind) === 'ACTIVE-MASTER'"
            href=""
            ng-click="showZonesMuxHelp()">
            <img ng-src="{[ '/images/glyph-info.svg' | augeasStatic ]}"/>
          </a>
        </td>
    </tr>

    <tr ng-show="chooseFireZone(ind) && !zonesBusy[ind]">
      <td colspan="2" style="border-top: none"></td>
      <td colspan="2" style="border-top: none">
        <select class="form-control"
          ng-model="zones.get(ind).common.type"
          ng-options="fz.value as fz.text for fz in fireZoneTypes()"
          ng-disabled="!zones.isEnabled(ind)"
          ng-change="fireZoneChanged(ind)">
        </select>
      </td>
      <td style="border-top: none; vertical-align: middle">
        <a href="" ng-click="showFireZoneHelp(zones.get(ind).common.type, zones.get(ind).wired.normal_state, zones.get(ind).wired.resistors)">
          <img ng-src="{[ '/images/glyph-info.svg' | augeasStatic ]}"/>
        </a>
      </td>
      <td colspan="3" style="border-top: none"></td>
    </tr>

    <tr ng-show="ex22Zone(ind) && !zonesBusy[ind] && !ex22Connected() && !OUT4Available()">
      <td colspan="2" style="border-top: none"></td>
      <td colspan="6" style="border-top: none">
        <p class='text-danger' ng-show="!OUT4Available() && anyOCAvailable()" translate>
          Выход OUT4 занят. Подключите преобразователь EX22 к другому выходу и укажите его на вкладке «Пожарная сигнализация».
        </p>
        <p class='text-danger' ng-show="!anyOCAvailable()" translate>
          Нет свободных выходов для подключения преобразователя EX22. Освободите выход, подключите к нему EX22 и укажите его на вкладке «Пожарная сигнализация».
        </p>
      </td>
    </tr>

</tbody>
