<div class="row" ng-if="!state.isInit()">
  <div class="col-md-6">
    <span ng-if="state.haveSettings() && softwareVersion()">
      <strong>
        {[ deviceName() ]},
        <translate>версия</translate> {[ softwareVersion() ]}
        <span ng-show="haveRieltaVersion()">/ {[ rieltaName() ]} {[ rieltaVersion() ]}</span>
      </strong><br>
    </span>
    <span ng-show="!state.haveSettings()">
      <strong translate>
        Устройство не подключено.
      </strong><br>
    </span>
    <span ng-if="state.haveSettings()">
      <span ng-show="objectNumber().account && !sambo.isActive()">
        <em><translate>Номер объекта</translate>:</em> {[ objectNumber().account ]},
      </span>
      <span ng-show="!sambo.isActive()">
        <em><translate>Центр охраны</translate></em><br>
      </span>
      <span ng-show="sambo.isActive()">
        <em><translate>Автономная охрана</translate></em><br>
      </span>
    </span>
    <span ng-show="getCsn()">
      <em><translate>Серийный номер</translate>:</em> {[ getCsn() ]}
    </span>
  </div>
  <div class="col-md-6">
    <br/>
    <span class="pull-right" ng-hide="onEventsPage()">
      <button type="button" class="btn btn-primary" ng-click="download()"
              ng-disabled="!state.deviceConnected()"
              ng-hide="state.canCreateSettings()"
              translate translate-context="(подразумевается 'прочитать настройки с устройства')">
        Считать
      </button>
      <button type="button" class="btn btn-success" ng-click="upload()"
              ng-disabled="!sentry.allow() || settingsReadOnly() || !state.deviceConnected()"
              ng-hide="state.canCreateSettings()"
              translate>
        Записать
      </button>

      <button type="button" class="btn btn-success" ng-click="newSettings()"
              ng-show="state.canCreateSettings()">
        <translate>Создать</translate>
      </button>

      <span ng-show="desktopMode">
        <button type="button" class="btn btn-default" ng-controller="ImportSettingsController"
                import-settings file-selected="fileSelected(file)">
          <translate>Открыть</translate>
        </button>
        <button type="button" class="btn btn-default"
                download-file get-request-data="exportSettings()" request-url="/settings/export"
                ng-disabled="!sentry.allow() || !state.haveSettings()">
          <translate>Сохранить</translate>
        </button>
        <button type="button" class="btn btn-default" title="Select language"
                ng-click="changeLocale()">
          <span class="glyphicon glyphicon-globe"></span>
        </button>
      </span>

    </span>
  </div>
</div>
