<commit_before><tr>
  <td >
    <%= image_tag(layer.thumb) %>
  </td>
  <td >
    <span class="layer_title">
      <%= link_to h(layer.name),  layer_path(layer) -%>
    </span>
    <br />
    <span class="layer_description">
      <%= layer.description %>
      <%- if layer.user -%>Compiled by <%= link_to(layer.user.login, user_path(layer.user)) -%>.<%-end-%>
      Last modified <%=h time_ago_in_words(layer.updated_at) -%> ago.
    </span>
    <span class="layer_year">
      <%if layer.depicts_year%>Depicts : <%= layer.depicts_year %> <%end%>
    </span>
    <span class="map_links">
      <%- if layer.source_uri -%>
        Links: <%= link_to 'Source / Biblio Ref',layer.source_uri  %>
      <%- end -%>
    </span>
    <!--<br />-->
    <% if admin_authorized? -%>
      <span class="layer_visibility">
        <br />
        <span id="vis-text-<%=layer.id%>">
          <% if layer.is_visible -%>
            (Visible)
          <% else -%>
            (Not Visible)
          <%end-%>
        </span>

      <script type="text/javascript">
        jQuery(document).ready(function() {
          jQuery("a#toggle-visibility").bind("ajax:success", function(event, data, status, xhr) {
            jQuery('<%= "#vis-text-#{layer.id}" %>').html(data);
          });
        });
      </script>

        <%= link_to("Toggle Visibility", toggle_visibility_layer_path(layer), :id => "toggle-visibility", :remote => true)%>
        <%# link_to_remote("Toggle Visibility", :update => "vis-text-#{layer.id}", :url => { :action => "toggle_visibility", :id => layer})%> |
      <% end  %>
      <% if user_signed_in? && (admin_authorized? or current_user.own_this_layer?(layer.id)) -%>
        <%= link_to "Edit Map Layer", layer_path(:id=>layer, :anchor=>"Edit_tab") -%> |
      <% end -%>
      <% if admin_authorized? -%>
        <%= link_to("Merge", :controller => "layers", :action=> "merge", :id => layer) %> |
       <!-- <%= link_to("Publish", :controller => "layers", :action=> "publish", :id=>layer)%> | -->
      <%end -%>

      <% if layer.is_visible && layer.rectified_maps_count > 0 %>
        <%= link_to("Download KML", layer_url(:id => layer, :format=>:kml), :class => "fontSmall") %>
      <% end %>

    </span>

  </td>
  <td>
    <%if layer.depicts_year -%><%= layer.depicts_year -%> <%end-%>
  </td>
  <td>
    <span class="layer_mapcount">
      <%= pluralize layer.maps_count,'map' -%>
    </span>
  </td>
  <td>
    <%=number_to_percentage(layer.rectified_percent, :precision=>0) %><br />
    (<%= pluralize layer.rectified_maps_count, 'map'-%>)
  </td><commit_msg>fix layer visibility toggle<commit_after><tr>
  <td >
    <%= image_tag(layer.thumb) %>
  </td>
  <td >
    <span class="layer_title">
      <%= link_to h(layer.name),  layer_path(layer) -%>
    </span>
    <br />
    <span class="layer_description">
      <%= layer.description %>
      <%- if layer.user -%>Compiled by <%= link_to(layer.user.login, user_path(layer.user)) -%>.<%-end-%>
      Last modified <%=h time_ago_in_words(layer.updated_at) -%> ago.
    </span>
    <span class="layer_year">
      <%if layer.depicts_year%>Depicts : <%= layer.depicts_year %> <%end%>
    </span>
    <span class="map_links">
      <%- if layer.source_uri -%>
        Links: <%= link_to 'Source / Biblio Ref',layer.source_uri  %>
      <%- end -%>
    </span>
    <!--<br />-->
    <% if admin_authorized? -%>
      <span class="layer_visibility">
        <br />
        <span id="vis-text-<%=layer.id%>">
          <% if layer.is_visible -%>
            (Visible)
          <% else -%>
            (Not Visible)
          <%end-%>
        </span>

        <%= link_to("Toggle Visibility", toggle_visibility_layer_path(layer), :id => "toggle-visibility-#{layer.id}", :remote => true)%>
        <script type="text/javascript">
          jQuery(document).ready(function() {
            jQuery("a#toggle-visibility-<%=layer.id-%>").bind("ajax:success", function(event, data, status, xhr) {
              jQuery('<%= "#vis-text-#{layer.id}" %>').html(data);
            });
          });
        </script>

      <% end  %>
      <% if user_signed_in? && (admin_authorized? or current_user.own_this_layer?(layer.id)) -%>
        <%= link_to "Edit Map Layer", layer_path(:id=>layer, :anchor=>"Edit_tab") -%> |
      <% end -%>
      <% if admin_authorized? -%>
        <%= link_to("Merge", :controller => "layers", :action=> "merge", :id => layer) %> |
       <!-- <%= link_to("Publish", :controller => "layers", :action=> "publish", :id=>layer)%> | -->
      <%end -%>

      <% if layer.is_visible && layer.rectified_maps_count > 0 %>
        <%= link_to("Download KML", layer_url(:id => layer, :format=>:kml), :class => "fontSmall") %>
      <% end %>

    </span>

  </td>
  <td>
    <%if layer.depicts_year -%><%= layer.depicts_year -%> <%end-%>
  </td>
  <td>
    <span class="layer_mapcount">
      <%= pluralize layer.maps_count,'map' -%>
    </span>
  </td>
  <td>
    <%=number_to_percentage(layer.rectified_percent, :precision=>0) %><br />
    (<%= pluralize layer.rectified_maps_count, 'map'-%>)
  </td>
{'fraction_non_alphanumeric': 0.2200825309491059, 'fraction_numerical': 0.0007860090391039497, 'mean_word_length': 2.5694249649368865, 'pattern_counts': {'":': 0, '<': 145, '<?xml version=': 0, '>': 179, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4018017', 'n_tokens_mistral': 1894, 'n_tokens_neox': 1780, 'n_words': 301}