<commit_before>- channels.each_slice(slice).each do |channels|
  .row.mb-3
    - channels.each do |channel|
      - pds = defined?(program_details) ? program_details.select { |pd| pd.channel_id == channel.id } : channel.program_details.includes(:channel).published.where(work: work)
      div class="col-#{12 / slice}"
        - if pds.present? && pds.length > 1
          .btn-group.w-100
            button.btn.u-btn-link.w-100.dropdown-toggle type="button" data-toggle="dropdown"
              = channel.name
            .dropdown-menu.w-100
              - pds.each do |pd|
                = link_to pd.vod_title_name, vod_title_url(channel.id, pd.vod_title_code), class: "dropdown-item", target: "_blank"
        - elsif pds.present? && pds.length == 1
          = link_to channel.name, vod_title_url(channel.id, pds[0].vod_title_code), class: "btn u-btn-link w-100", target: "_blank"
        - else
          button.btn.u-btn-link.w-100 type="button" disabled=""
            = channel.name<commit_msg>Disable button if vod_title_code is blank<commit_after>- channels.each_slice(slice).each do |channels|
  .row.mb-3
    - channels.each do |channel|
      - pds = defined?(program_details) ? program_details.select { |pd| pd.channel_id == channel.id } : channel.program_details.includes(:channel).published.where(work: work)
      div class="col-#{12 / slice}"
        - if pds.present? && pds.length > 1
          .btn-group.w-100
            button.btn.u-btn-link.w-100.dropdown-toggle type="button" data-toggle="dropdown"
              = channel.name
            .dropdown-menu.w-100
              - pds.each do |pd|
                = link_to pd.vod_title_name, vod_title_url(channel.id, pd.vod_title_code), class: "dropdown-item", target: "_blank"
        - elsif pds.present? && pds.length == 1 && pds[0].vod_title_code.present?
          = link_to channel.name, vod_title_url(channel.id, pds[0].vod_title_code), class: "btn u-btn-link w-100", target: "_blank"
        - else
          button.btn.u-btn-link.w-100 type="button" disabled=""
            = channel.name
{'fraction_non_alphanumeric': 0.14595375722543352, 'fraction_numerical': 0.020712909441233142, 'mean_word_length': 2.4848993288590604, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6420048', 'n_tokens_mistral': 704, 'n_tokens_neox': 691, 'n_words': 123}