ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/button/miq_ae_namespace_edit.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::MiqAeNamespaceEdit < ApplicationHelper::Button::MiqAeDomain
  needs :@record

  def disabled?
    @error_message = _('Domain is Locked.') unless editable?
    @error_message.present?
  end

  def visible?
    super || editable_domain?(@record)
  end

  private

  def editable?
    return @record.editable? if @record.instance_of?(MiqAeNamespace)
    super
  end
end