<h4 class="bg-primary position-relative">Select a button or device to edit its automated activity
  <span ng-if="optHelpShow" class="programming-help-btn heading"><i class="fa fa-lg fa-question-circle" ng-click="$event.preventDefault(); $event.stopPropagation(); showHelpModal('edit-automated-activities-select-button')"></i></span></h4>

<!-- <div ng-repeat="page in client.pages"> -->
<div class="center-block">
  <a class="link-unstyled text-center sim-link position-relative" ng-click="editPowerMacro()"><i class="fa fa-power-off"></i> Edit this room's power automated activity <span class="btn-lg macro-delete-btn" ng-if="powerMacro" ng-click="$event.stopPropagation()"><i class="fa fa-lg fa-trash-o" ng-click="$event.stopPropagation(); deleteMacroModal('power')"></i></span></a>

  <div class="sim-screen">
    <a class="btn btn-lg btn-block text-left position-relative" ng-class="{ 'btn-menu': btn.link_id < 0 || (isJsonString(btn.macro) && btn.macro !== '[]') , 'btn-default': btn.link_id >= 0 && (!isJsonString(btn.macro) || btn.macro === '[]')}" ng-disabled="btn.link_id >= 0 && (!isJsonString(btn.macro) || btn.macro === '[]')" ng-repeat="btn in client.page.btns" ng-click="editBtnMacro(btn)" >
      {{btn.display_text}}
      <span class="macro-delete-btn2" ng-if="btn.link_id < 0 || (isJsonString(btn.macro) && btn.macro !== '[]')" ng-click="$event.stopPropagation()"><i class="fa fa-lg fa-trash-o" ng-click="$event.stopPropagation(); deleteMacroModal('device-btn', btn.link_id, btn.room_id, btn.device_id, btn.id)"></i></span>
    </a>
  </div>

  <div class="text-center">
    <pagination class="pagination" boundary-links="true" items-per-page="6" total-items="editMacro.totalItems" page="editMacro.currentPage"  previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;" on-select-page="pageChanged(page)"></pagination>
  </div>
</div>

<go-back></go-back>
