<tbody ng-repeat="(ind, sensor) in temperatureSensors()"
       ng-show="sensor.type == temperatureSensorsTypes.TEMP_1WIRE"
       style="border-top: none">
  <tr>
    <td style="text-align: center;">{[ temperatureZoneIndex(ind) + 1 ]}</td>
    <td style="width:104px">
      <button type="button" class="btn btn-sm btn-block"
              ng-class="zones.isEnabled(temperatureZoneIndex(ind))? 'btn-success':'btn-danger'"
              ng-click="switchOnOffTemperatureZone(ind, lowThresholdForm.lowThreshold, highThresholdForm.highThreshold)">
        <span ng-show="zones.isEnabled(temperatureZoneIndex(ind))" translate>Выключить</span>
        <span ng-show="!zones.isEnabled(temperatureZoneIndex(ind))" translate translate-context="(антоним к 'Выключить')">Включить</span>
      </button>
    </td>
    <td>
      <select
          class="form-control"
          style="width: 224px";
          ng-disabled="1"
          ng-model="zones.get(temperatureZoneIndex(ind)).common.type"
          ng-options="zt['value'] as zt['text'] for zt in zoneTypes">
      </select>
    </td>
    <td></td>
    <td ng-if="showResistors()"></td>
    <td></td>
    <!-- Связанные с датчиком иконки -->
    <td>
      <span class="pull-right">
        <a href="" ng-click="showTemperatureSensorHelp(sensor)">
          <img ng-src="{[ '/images/glyph-info.svg' | augeasStatic ]}"/>
        </a>
        <a href="" ng-show="canShowTemperatureSensorDeleteButton(sensor)"
                   ng-click="purgeWiredTemperatureSensor(ind)"
                   style="margin-left: 20px;">
          <img ng-src="{[ '/images/glyph-delete.svg' | augeasStatic ]}"/>
        </a>
      </span>
    </td>
  </tr>
  <tr ng-show="zones.isEnabled(temperatureZoneIndex(ind))">
    <td colspan="2" style="border-top: none"></td>
    <td style="border-top: none; vertical-align: middle; white-space: nowrap;" translate>
      Порог низкой температуры, ℃
    </td>
    <td style="border-top: none;">
      <div ng-class="lowThresholdForm.$invalid ? 'has-error':''">
        <form role="form" name="lowThresholdForm" guarded>
          <input style="width:67px;" type="text" class="form-control" name="lowThreshold"
                 ng-model="sensor.low_threshold" required ng-pattern="/^-?\d+$/"
                 ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }"
                 ng-trim="false"
                 validate-using-function="{ func: partialValidateLowThreshold(sensor), key: 'valid-low-threshold'}"
                 ng-change="revalidateDependent(highThresholdForm.highThreshold)">
        </form>
      </div>
    </td>
    <td colspan="3" style="border-top: none"></td>
  </tr>
  <tr ng-show="zones.isEnabled(temperatureZoneIndex(ind))">
    <td colspan="2" style="border-top: none"></td>
    <td style="border-top: none; vertical-align: middle; white-space: nowrap;" translate>
      Порог высокой температуры, ℃
    </td>
    <td style="border-top: none;">
      <div ng-class="highThresholdForm.$invalid ? 'has-error':''">
        <form role="form" name="highThresholdForm" guarded>
          <input style="width:67px;" type="text" class="form-control" name="highThreshold"
                 ng-model="sensor.high_threshold" required ng-pattern="/^-?\d+$/"
                 ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }"
                 ng-trim="false"
                 validate-using-function="{ func: partialValidateHighThreshold(sensor), key: 'valid-high-threshold'}"
                 ng-change="revalidateDependent(lowThresholdForm.lowThreshold)">
        </form>
      </div>
    </td>
    <td colspan="3" style="border-top: none"></td>
  </tr>
</tbody>
