<div bst-alert="info">
  <span translate>Below are the Repository Sets currently available for this activation key through its subscriptions. For Red Hat subscriptions, additional content can be made available through the</span>
  <a ng-href="/katello/providers/redhat_provider" translate>Red Hat Repositories page.</a>
  <span translate>Changing default settings for content hosts that register with this activation key requires subscription-manager version 1.10 or newer to be installed on that host.</span>
</div>

<div class="loading-mask loading-mask-panel" ng-show="displayArea.working">
  <i class="fa fa-spinner fa-spin"></i>
  <span translate>Loading...</span>
</div>

<div data-extend-template="layouts/partials/table.html">
  <div data-block="filters">
    <label class="checkbox-inline" title="{{ 'Show all Repository Sets in Organization' | translate }}" ng-if="!simpleContentAccessEnabled">
      <input type="checkbox" ng-model="contentAccessModes.contentAccessModeAll" ng-change="toggleFilters()"/>
      <span translate>Show All</span>
    </label>
    <label class="checkbox-inline" title="{{ 'Limit Repository Sets to only those available in this Activation Key\'s Lifecycle Environment' | translate }}">
      <input type="checkbox" ng-model="contentAccessModes.contentAccessModeEnv" ng-change="toggleFilters()"/>
      <span translate>Limit to Environment</span>
    </label>
  </div>

  <div data-block="list-actions">
    <div class="btn-group" select-action-dropdown>
      <ul class="dropdown-menu-right" uib-dropdown-menu role="menu" aria-labelledby="split-button">
        <li role="menuitem" ng-show="permitted('edit_activation_keys', activationKey)" ng-class="{disabled: table.numSelected === 0}">
          <a ng-click="overrideToEnabled()" disable-link="table.numSelected === 0" translate>
            Override to Enabled
          </a>
        </li>

        <li role="menuitem" ng-show="permitted('edit_activation_keys', activationKey)" ng-class="{disabled: table.numSelected === 0}">
          <a ng-click="overrideToDisabled()" disable-link="table.numSelected === 0" translate>
            Override to Disabled
          </a>
        </li>

        <li role="menuitem" ng-show="permitted('edit_activation_keys', activationKey)" ng-class="{disabled: table.numSelected === 0}">
          <a ng-click="resetToDefault()" disable-link="table.numSelected === 0" translate>
            Reset to Default
          </a>
        </li>
      </ul>
    </div>
  </div>

  <span data-block="no-rows-message" translate>
    No repository sets provided through subscriptions.
  </span>

  <span data-block="no-search-results-message" translate>
    Your search returned zero repository sets.
  </span>

  <div data-block="table">
    <table class="table table-bordered table-striped" ng-class="{'table-mask': table.working}">
      <thead>
        <tr bst-table-head row-select>
          <th bst-table-column="repository_name" translate>Repository Name</th>
          <th bst-table-column="product_name" translate>Product Name</th>
          <th bst-table-column="repository_path" translate>Repository Path</th>
          <th bst-table-column="enabled" translate>Status</th>
        </tr>
      </thead>

      <tbody>
        <tr class="grey-table-row" bst-table-row ng-repeat-end ng-repeat="productRepoSet in table.rows | filter:repositorySetFilter" row-select="productRepoSet">
          <td bst-table-cell>{{ productRepoSet.name }}</td>
          <td bst-table-cell>
            <a ui-sref="product.info({productId: productRepoSet.product.id})">
              {{ productRepoSet.product.name }}
            </a>
          </td>
          <td bst-table-cell>{{ productRepoSet.contentUrl }}</td>
          <td bst-table-cell>{{ productRepoSet | repositorySetsEnabled }}</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>