<commit_before>= render 'component/organizations/detail/header'

%section#detail-info{:itemscope=>"", :itemtype=>"http://schema.org/Organization"}

  %header
    - if @org.key?(:kind)
      - class_name = css_class_format(@org.kind.sub("'",""))
      %section
        %p.kind
          %a{:href=>"/organizations?kind=#{CGI::escape(@org.kind)}", :title=>"All locations of type #{@org.kind}",:class=>"kind icon #{class_name}"}
            = @org.kind

    %hgroup
      %h1.name{:title=>@org.name, :itemprop=>"name"}
        = superscript_ordinals(@org.name)
      - if (@org.organization.name) && (@org.organization.name != @org.name)
        %h2.agency
          %a{:href=>"/organizations?org_name=#{CGI::escape(@org.organization.name)}", :title=>"#{@org.organization.name}"}
            %span
              = superscript_ordinals(@org.organization.name)

  / detail sidebar content
  %aside
    %section#contact-info
      - if (@org.fields & location_contact_fields).any?
        %section.contact-box
          %h1 General Contact Info
          %section
            - if @org.key?(:urls)
              %section.urls
                - @org['urls'].each do |url|
                  %div
                    %i{ class: 'fa fa-external-link-square' }
                    %a{ href: url, target: '_blank' }
                      %span{ itemprop: 'url' }
                        = format_url(url)

            - if @org.key?(:emails)
              %section.emails{:itemprop=>"email"}
                - @org['emails'].each do |email|
                  %div
                    %i{:class=>"fa fa-laptop"}
                    %a{:href=>("mailto:"+email)}
                      %span{:itemprop=>"email"}
                        = email


            - if @org.key?(:phones)
              %section.phones{ itemscope: '', itemtype: 'http://schema.org/ContactPoint' }
                - @org['phones'].each do |phone|
                  %div
                    %i{ class: 'fa fa-phone-square' }
                    %span
                      %span{ itemprop: 'telephone' }
                        = format_phone(phone['number'])
                      - if phone['extension'].present?
                        %sup.phone-extension
                          = phone['extension']
                      - if phone['number_type']
                        %sup.phone-type
                          = phone['number_type']
                      - if phone['department']
                        %p.phone-department{ itemprop: 'contactType' }
                          = phone['department']

            - if @org.key?(:faxes)
              %section.faxes
                - @org['faxes'].each do |fax|
                  %div
                    %i{ class: 'fa fa-print fax' }
                    %span
                      %span{ itemprop: 'faxNumber' }
                        = format_phone(fax['number'])
                      - if fax['department']
                        %p.fax-department{ itemprop: 'contactType' }<commit_msg>Add presence check for number.<commit_after>= render 'component/organizations/detail/header'

%section#detail-info{:itemscope=>"", :itemtype=>"http://schema.org/Organization"}

  %header
    - if @org.key?(:kind)
      - class_name = css_class_format(@org.kind.sub("'",""))
      %section
        %p.kind
          %a{:href=>"/organizations?kind=#{CGI::escape(@org.kind)}", :title=>"All locations of type #{@org.kind}",:class=>"kind icon #{class_name}"}
            = @org.kind

    %hgroup
      %h1.name{:title=>@org.name, :itemprop=>"name"}
        = superscript_ordinals(@org.name)
      - if (@org.organization.name) && (@org.organization.name != @org.name)
        %h2.agency
          %a{:href=>"/organizations?org_name=#{CGI::escape(@org.organization.name)}", :title=>"#{@org.organization.name}"}
            %span
              = superscript_ordinals(@org.organization.name)

  / detail sidebar content
  %aside
    %section#contact-info
      - if (@org.fields & location_contact_fields).any?
        %section.contact-box
          %h1 General Contact Info
          %section
            - if @org.key?(:urls)
              %section.urls
                - @org['urls'].each do |url|
                  %div
                    %i{ class: 'fa fa-external-link-square' }
                    %a{ href: url, target: '_blank' }
                      %span{ itemprop: 'url' }
                        = format_url(url)

            - if @org.key?(:emails)
              %section.emails{:itemprop=>"email"}
                - @org['emails'].each do |email|
                  %div
                    %i{:class=>"fa fa-laptop"}
                    %a{:href=>("mailto:"+email)}
                      %span{:itemprop=>"email"}
                        = email


            - if @org.key?(:phones)
              %section.phones{ itemscope: '', itemtype: 'http://schema.org/ContactPoint' }
                - @org['phones'].each do |phone|
                  %div
                    %i{ class: 'fa fa-phone-square' }
                    %span
                      %span{ itemprop: 'telephone' }
                      - if phone['number'].present?
                        = format_phone(phone['number'])
                      - if phone['extension'].present?
                        %sup.phone-extension
                          = phone['extension']
                      - if phone['number_type']
                        %sup.phone-type
                          = phone['number_type']
                      - if phone['department']
                        %p.phone-department{ itemprop: 'contactType' }
                          = phone['department']

            - if @org.key?(:faxes)
              %section.faxes
                - @org['faxes'].each do |fax|
                  %div
                    %i{ class: 'fa fa-print fax' }
                    %span
                      %span{ itemprop: 'faxNumber' }
                        = format_phone(fax['number'])
                      - if fax['department']
                        %p.fax-department{ itemprop: 'contactType' }
{'fraction_non_alphanumeric': 0.14977828871735918, 'fraction_numerical': 0.0009853834784036787, 'mean_word_length': 1.3595505617977528, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, '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': '5997143', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1660, 'n_words': 276}