<commit_before>- if @record.try(:name)
  #accordion.panel-group
    = miq_accordion_panel(truncate(@record.name, :length => truncate_length), true, "icon") do
      = render :partial => "layouts/quadicon", :locals => {:mode => :icon, :item => @record, :size => 72, :typ => :listnav}

    = miq_accordion_panel(_("Properties"), false, "ems_prop") do
      %ul.nav.nav-pills.nav-stacked
        %li
          = link_to_with_icon(_('Summary'), {:action => 'show', :id => @record, :display => 'main'}, :title => _("Show Summary"))

    = miq_accordion_panel(_("Relationships"), false, "ems_rel") do
      %ul.nav.nav-pills.nav-stacked
        - if role_allows(:feature => "ems_cloud_show") && @record.ext_management_system
          %li
            = link_to_with_icon("#{ui_lookup(:table => "ext_management_systems")}: #{@record.ext_management_system.name}",
              ems_cloud_path(@record.ext_management_system.id),
              :title => _("Show this Cloud Tenant's parent %s") % ui_lookup(:table => "ems_cloud"))
        - if role_allows(:feature => "security_group_show_list")
          - if @record.number_of(:security_groups) == 0
            %li.disabled
              = link_to(_("Security Groups (%s)") % @record.number_of(:security_groups), "#")
          - else
            %li
              = link_to(_("Security Groups (%s)") % @record.number_of(:security_groups),
                :action  => 'show',
                :id      => @record,
                :display => 'security_groups')

        - if role_allows(:feature => "vm_show_list")
          - if @record.number_of(:vms) == 0
            %li.disabled
              = link_to(_('Instances (%s)') % @record.number_of(:vms), "#")
          - else
            %li
              = link_to(_("Instances (%s)") % @record.number_of(:vms),
                {:action => 'show', :id => @record, :display => 'instances'},
                :title => _("Show all Instances"))
        - if role_allows(:feature => "miq_template_show_list")
          - if @record.number_of(:miq_templates) == 0
            %li.disabled
              = link_to(_('Images (%s)') % @record.number_of(:miq_templates), "#")
          - else
            %li
              = link_to_with_icon(_("Images (%s)") % @record.number_of(:miq_templates),
                {:action => 'show', :id => @record, :display => 'images'},
                :title => _("Show all Images"))<commit_msg>Refactor listnav of Cloud Tenants<commit_after>- if @record.try(:name)
  #accordion.panel-group
    = miq_accordion_panel(truncate(@record.name, :length => truncate_length), true, "icon") do
      = render :partial => "layouts/quadicon", :locals => {:mode => :icon, :item => @record, :size => 72, :typ => :listnav}

    = miq_accordion_panel(_("Properties"), false, "ems_prop") do
      %ul.nav.nav-pills.nav-stacked
        %li
          = link_to_with_icon(_('Summary'), {:action => 'show', :id => @record, :display => 'main'}, :title => _("Show Summary"))

    = miq_accordion_panel(_("Relationships"), false, "ems_rel") do
      %ul.nav.nav-pills.nav-stacked
        - if role_allows(:feature => "ems_cloud_show") && @record.ext_management_system
          %li
            = link_to_with_icon("#{ui_lookup(:table => "ext_management_systems")}: #{@record.ext_management_system.name}",
              ems_cloud_path(@record.ext_management_system.id),
              :title => _("Show this Cloud Tenant's parent %s") % ui_lookup(:table => "ems_cloud"))
        - if role_allows(:feature => "security_group_show_list")
          = li_link_if_nonzero(:count     => @record.number_of(:security_groups),
                               :text      => _("Security Groups"),
                               :record_id => @record.id,
                               :display   => 'security_groups',
                               :title     => _("Show all Security Groups"))
        - if role_allows(:feature => "vm_show_list")
          = li_link_if_nonzero(:count     => @record.number_of(:vms),
                               :text      => _("Instances"),
                               :record_id => @record.id,
                               :display   => 'instances',
                               :title     => _("Show all Instances"))
        - if role_allows(:feature => "miq_template_show_list")
          = li_link_if_nonzero(:count     => @record.number_of(:miq_templates),
                               :text      => _("Images"),
                               :record_id => @record.id,
                               :display   => 'images',
                               :title     => _("Show all Images"))
{'fraction_non_alphanumeric': 0.1625945945945946, 'fraction_numerical': 0.0015135135135135136, 'mean_word_length': 2.1214574898785425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7384729', 'n_tokens_mistral': 1422, 'n_tokens_neox': 1366, 'n_words': 245}