%fieldset.omega.six.columns
  %legend= t('spree.api.access')
  - if @user.spree_api_key.present?
    .field
      = label_tag t('spree.api.key')
      = ":"
      = @user.spree_api_key
    .filter-actions.actions
      = form_tag spree.clear_api_key_admin_user_path(@user), method: :put do
        = button t('spree.api.clear_key'), 'icon-trash'
      %span.or= t(:or)
      = form_tag spree.generate_api_key_admin_user_path(@user), method: :put do
        = button t('spree.api.regenerate_key'), 'icon-refresh'
  - else
    .no-objects-found= t('spree.api.no_key')
    .filter-actions.actions
      = form_tag spree.generate_api_key_admin_user_path(@user), method: :put do
        = button t('spree.api.generate_key'), 'icon-key'
