<commit_before><div class="main-box">
  <table class="index">
    <thead>
      <tr>
        <% @model.fields.select {|k, v| k =~ /^(name|filename)/ }.keys.each do |key| %>
        <th><%= @model.t key %></th>
        <% end %>
        <th class="datetime"><%= @model.t :updated %></th>
        <th class="preview"><%= t 'cms.preview_page' %></th>
      </tr>
    </thead>
    <tbody>
      <% @items.each do |item| %>
      <% layout_path = "#{@cur_node.filename}/layout-#{item.id}.html" %>
      <tr class="list-item <%= default_layout?(item) ? 'default-layout' : '' %>">
        <td>
          <nav class="tap-menu">
            <%= link_to t('ss.links.show'), action: :show, id: item %>
            <% unless selected_layout?(item) %>
              <% if @cur_site.mobile_enabled? %>
                <%= link_to t('ss.links.pc_preview'), cms_preview_path(path: layout_path), target: "_blank" %>
                <%= link_to(t('ss.links.mobile_preview'), cms_mobile_preview_path(path: layout_path), target: :_blank) %>
              <% else %>
                <%= link_to t('ss.links.preview'), cms_preview_path(path: layout_path), target: "_blank" %>
              <% end %>
            <% end %>
          </nav>
          <%= link_to item.name, { action: :show, id: item }, class: "icon-layout" %>
        </td>
        <td class="filename"><%= File.basename item.filename %></td>
        <td class="datetime"><%= item.updated.strftime("%Y/%m/%d %H:%M") %></td>
        <% if selected_layout?(item) %>
        <td><%= t 'urgency.selected_layout' %></td>
        <% else %>
        <td>
          <%= link_to t('ss.links.pc'), cms_preview_path(path: layout_path), target: "_blank" %>
          |
          <%= link_to t('ss.links.mobile'), cms_preview_path(path: layout_path), target: "_blank" %>
        </td>
        <% end %>
      </tr>
      <% end %>
    </tbody>
  </table>
</div>

<%= paginate @items if @items.try(:current_page) %><commit_msg>[fix][#2966] fixed urgency layout preview link display when mobile disabled (#3396)<commit_after><div class="main-box">
  <table class="index">
    <thead>
      <tr>
        <% @model.fields.select {|k, v| k =~ /^(name|filename)/ }.keys.each do |key| %>
        <th><%= @model.t key %></th>
        <% end %>
        <th class="datetime"><%= @model.t :updated %></th>
        <th class="preview"><%= t 'cms.preview_page' %></th>
      </tr>
    </thead>
    <tbody>
      <% @items.each do |item| %>
      <% layout_path = "#{@cur_node.filename}/layout-#{item.id}.html" %>
      <tr class="list-item <%= default_layout?(item) ? 'default-layout' : '' %>">
        <td>
          <nav class="tap-menu">
            <%= link_to t('ss.links.show'), action: :show, id: item %>
            <% unless selected_layout?(item) %>
              <% if @cur_site.mobile_enabled? %>
                <%= link_to t('ss.links.pc_preview'), cms_preview_path(path: layout_path), target: "_blank" %>
                <%= link_to t('ss.links.mobile_preview'), cms_mobile_preview_path(path: layout_path), target: "_blank" %>
              <% else %>
                <%= link_to t('ss.links.preview'), cms_preview_path(path: layout_path), target: "_blank" %>
              <% end %>
            <% end %>
          </nav>
          <%= link_to item.name, { action: :show, id: item }, class: "icon-layout" %>
        </td>
        <td class="filename"><%= File.basename item.filename %></td>
        <td class="datetime"><%= item.updated.strftime("%Y/%m/%d %H:%M") %></td>
        <% if selected_layout?(item) %>
          <td><%= t 'urgency.selected_layout' %></td>
        <% elsif @cur_site.mobile_enabled? %>
          <td>
            <%= link_to t('ss.links.pc'), cms_preview_path(path: layout_path), target: "_blank" %>
            |
            <%= link_to t('ss.links.mobile'), cms_mobile_preview_path(path: layout_path), target: "_blank"  %>
          </td>
        <% else %>
          <td><%= link_to t('ss.links.pc'), cms_preview_path(path: layout_path), target: "_blank" %></td>
        <% end %>
      </tr>
      <% end %>
    </tbody>
  </table>
</div>

<%= paginate @items if @items.try(:current_page) %>
{'fraction_non_alphanumeric': 0.21088107847857487, 'fraction_numerical': 0.0019258545979778526, 'mean_word_length': 2.28978622327791, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 123, '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': '398609', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1378, 'n_words': 271}