<commit_before>%li{:class => get_nav_link_class(['accounting'])}
  = link_to "#", :class => "dropdown-toggle", :data => {"toggle" => "dropdown"}, :title => 'Accounting' do
    %i.fa.fa-usd.fa-2x
    %b.caret
  %ul.dropdown-menu.multi-level{:role => 'menu'}

    - count = 0
    - if ChartOfAccount.where(organization_id: @organization_list).count > 0
      - count += 1
      - if @organization_list.count == 1
        %li.text-left
          = link_to general_ledger_accounts_path do
            %i.fa.fa-book.fa-fw
            Chart of Accounts
      - else
        %li.text-left.dropdown-submenu
          = link_to '#' do
            %i.fa.fa-book.fa-fw
            Chart of Accounts

          %ul.dropdown-menu
            - Organization.where(id: @organization_list).each do |org|
              %li.text-left
                = link_to general_ledger_accounts_path(:organization_id => org.id) do
                  %i.fa.fa-fw.fa-book
                  = org.short_name

      - if SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher')
        - if count > 0
          %li.divider
        - count += 1
        %li.text-left
          = link_to reset_searches_path(:search_type => SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher').id) do
            %i.fa.fa-search.fa-fw
            GL Query

    -#%li.divider
    -#%li.text-left
    -#  = link_to grants_path do
    -#    %i.fa.fa-fw.fa-legal
    -#    = ' Grants'
    -#
    -#%li.divider
    -#%li.text-left
    -#  = link_to vendors_path do
    -#    %i.fa.fa-fw.fa-tag
    -#    = ' Vendors'

    - if count > 0
      %li.divider
    %li.text-left.dropdown-submenu
      = link_to funding_sources_path do
        %i.fa.fa-book.fa-fw
        Programs

      %ul.dropdown-menu
        - FundingSourceType.all.each do |type|
          - if FundingSource.where(funding_source_type_id: type.id).count > 0
            %li.text-left.dropdown-submenu
              = link_to '#' do
                %i.fa.fa-fw.fa-book
                = type
              %ul.dropdown-menu
                - FundingSource.where(funding_source_type_id: type.id).each do | program |
                  %li.text-left
                    = link_to funding_source_path(program) do
                      %i.fa.fa-fw.fa-book
                      = program
        - if can? :create, FundingSource
          %li.divider
          %li
            = link_to new_funding_source_path do
              %i.fa.fa-plus.fa-fw
              = "Add Funding Program";

    - SystemConfig.transam_module_names.each do |mod|
      - view_component = "#{mod}_financial_nav"<commit_msg>[TTPLAT-990] Re-enable funding loader for SCAG and only show dividers in asset groups and funding programs navigation menus if the lists are populated.<commit_after>%li{:class => get_nav_link_class(['accounting'])}
  = link_to "#", :class => "dropdown-toggle", :data => {"toggle" => "dropdown"}, :title => 'Accounting' do
    %i.fa.fa-usd.fa-2x
    %b.caret
  %ul.dropdown-menu.multi-level{:role => 'menu'}

    - count = 0
    - if ChartOfAccount.where(organization_id: @organization_list).count > 0
      - count += 1
      - if @organization_list.count == 1
        %li.text-left
          = link_to general_ledger_accounts_path do
            %i.fa.fa-book.fa-fw
            Chart of Accounts
      - else
        %li.text-left.dropdown-submenu
          = link_to '#' do
            %i.fa.fa-book.fa-fw
            Chart of Accounts

          %ul.dropdown-menu
            - Organization.where(id: @organization_list).each do |org|
              %li.text-left
                = link_to general_ledger_accounts_path(:organization_id => org.id) do
                  %i.fa.fa-fw.fa-book
                  = org.short_name

      - if SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher')
        - if count > 0
          %li.divider
        - count += 1
        %li.text-left
          = link_to reset_searches_path(:search_type => SearchType.find_by(class_name: 'GeneralLedgerAccountSearcher').id) do
            %i.fa.fa-search.fa-fw
            GL Query

    -#%li.divider
    -#%li.text-left
    -#  = link_to grants_path do
    -#    %i.fa.fa-fw.fa-legal
    -#    = ' Grants'
    -#
    -#%li.divider
    -#%li.text-left
    -#  = link_to vendors_path do
    -#    %i.fa.fa-fw.fa-tag
    -#    = ' Vendors'

    - if count > 0
      %li.divider
    %li.text-left.dropdown-submenu
      = link_to funding_sources_path do
        %i.fa.fa-book.fa-fw
        Programs

      %ul.dropdown-menu
        - FundingSourceType.all.each do |type|
          - if FundingSource.where(funding_source_type_id: type.id).count > 0
            %li.text-left.dropdown-submenu
              = link_to '#' do
                %i.fa.fa-fw.fa-book
                = type
              %ul.dropdown-menu
                - FundingSource.where(funding_source_type_id: type.id).each do | program |
                  %li.text-left
                    = link_to funding_source_path(program) do
                      %i.fa.fa-fw.fa-book
                      = program
        - if can? :create, FundingSource
          - if FundingSource.all.count > 0
            %li.divider
          %li
            = link_to new_funding_source_path do
              %i.fa.fa-plus.fa-fw
              = "Add Funding Program";

    - SystemConfig.transam_module_names.each do |mod|
      - view_component = "#{mod}_financial_nav"
{'fraction_non_alphanumeric': 0.12299465240641712, 'fraction_numerical': 0.004056795131845842, 'mean_word_length': 1.6484375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, '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': '4542263', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1779, 'n_words': 300}