<commit_before><%# items: list %>

<% if items && items.length > 0 %>
  <%
  maxitems = 6

  # Keep it even so there aren't any blank blocks
  if items.length > maxitems && (maxitems % 2) == 0
    maxitems = maxitems - 1
  end
  %>

  <% if items.length > maxitems %>
    <div data-role="popup" data-history="false" id="popupMoreMenu_<%= request.uuid %>">
      <ul data-role="listview">
        <% items.drop(maxitems).each do |item| %>
          <li>
            <% if item[:content].nil? %>
              <%=
                link_to(
                  item[:title],
                  item[:link],
                  method: item[:method],
                  data: item[:data],
                  class: "ui-btn ui-btn-icon-left ui-icon-" + item[:icon],
                  onclick: item[:onclick],
                )
              %>
            <% else %>
              <%= item[:content] %>
            <% end %>
          </li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div data-role="footer" data-position="fixed" data-tap-toggle="<%= !current_user.nil? && current_user.toggle_hide_footer ? "true" : "false" %>">
    <div data-role="navbar">
      <ul>
        <% items.first(maxitems).each do |item| %>
          <li>
            <% if item[:content].nil? %>
              <%=
                link_to(
                  item[:title],
                  item[:link],
                  method: item[:method],
                  data: item[:data],
                  "data-icon" => item[:icon],
                  onclick: item[:onclick],
                )
              %>
            <% else %>
              <%= item[:content] %>
            <% end %>
          </li>
        <% end %><commit_msg>Support data-ajax on bottom buttons<commit_after><%# items: list %>

<% if items && items.length > 0 %>
  <%
  maxitems = 6

  # Keep it even so there aren't any blank blocks
  if items.length > maxitems && (maxitems % 2) == 0
    maxitems = maxitems - 1
  end
  %>

  <% if items.length > maxitems %>
    <div data-role="popup" data-history="false" id="popupMoreMenu_<%= request.uuid %>">
      <ul data-role="listview">
        <% items.drop(maxitems).each do |item| %>
          <li>
            <% if item[:content].nil? %>
              <%=
                link_to(
                  item[:title],
                  item[:link],
                  method: item[:method],
                  data: item[:data],
                  class: "ui-btn ui-btn-icon-left ui-icon-" + item[:icon],
                  onclick: item[:onclick],
                  "data-ajax" => item[:ajax] == "no" ? false : true,
                )
              %>
            <% else %>
              <%= item[:content] %>
            <% end %>
          </li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div data-role="footer" data-position="fixed" data-tap-toggle="<%= !current_user.nil? && current_user.toggle_hide_footer ? "true" : "false" %>">
    <div data-role="navbar">
      <ul>
        <% items.first(maxitems).each do |item| %>
          <li>
            <% if item[:content].nil? %>
              <%=
                link_to(
                  item[:title],
                  item[:link],
                  method: item[:method],
                  data: item[:data],
                  "data-icon" => item[:icon],
                  onclick: item[:onclick],
                  "data-ajax" => item[:ajax] == "no" ? false : true,
                )
              %>
            <% else %>
              <%= item[:content] %>
            <% end %>
          </li>
        <% end %>
{'fraction_non_alphanumeric': 0.16899441340782123, 'fraction_numerical': 0.002793296089385475, 'mean_word_length': 1.2896419437340154, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 77, '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': '951448', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1012, 'n_words': 212}