ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::MiqReportEdit < ApplicationHelper::Button::Basic
  include ApplicationHelper::Button::Mixins::XActiveTreeMixin
  needs :@record

  def visible?
    reports_tree? ? custom_report_info? : true
  end

  private

  def custom_report_info?
    @view_context.active_tab == 'report_info' && @record.rpt_type == 'Custom'
  end
end