<commit_before><% content_for :sidebar do %>
  <%= build_sidebar %>
<% end %>

<h2>
  <%= _("Show {{resource}}", :resource => @resource.model_name.human) %>
  <small><%= link_to_edit %></small>
</h2>

<%= typus_block %>

<dl>
<%- @fields.each do |field| -%>
  <dt><%=h @resource.human_attribute_name(field.first) %></dt>
  <%-
    data_type = field.last
    raw_data = @item.send(field.first)
    data = case data_type
           when :boolean
             boolean_hash = @resource.typus_boolean(field.first)
             !raw_data.nil? ? boolean_hash["#{raw_data}".to_sym] : @resource.typus_options_for(:nil)
           when :belongs_to
             if !raw_data.nil?
               controller = raw_data.class.to_resource
               action = raw_data.class.typus_options_for(:default_action_on_item)
               options = { :controller => controller, :action => action, :id => raw_data }
               link_to raw_data.to_label, options
             else
               nil
             end
           when :file
             typus_preview(@item, field.first)
           when :selector
             @item.mapping(field.first)
           else
             h(raw_data)
           end
  -%>
  <dd><%= raw data.blank? ? ("&#151;") : data %></dd>
<%- end -%>
</dl>

<%= raw typus_relationships %><commit_msg>Removed unecessary h()<commit_after><% content_for :sidebar do %>
  <%= build_sidebar %>
<% end %>

<h2>
  <%= _("Show {{resource}}", :resource => @resource.model_name.human) %>
  <small><%= link_to_edit %></small>
</h2>

<%= typus_block %>

<dl>
<%- @fields.each do |field| -%>
  <dt><%=h @resource.human_attribute_name(field.first) %></dt>
  <%-
    data_type = field.last
    raw_data = @item.send(field.first)
    data = case data_type
           when :boolean
             boolean_hash = @resource.typus_boolean(field.first)
             !raw_data.nil? ? boolean_hash["#{raw_data}".to_sym] : @resource.typus_options_for(:nil)
           when :belongs_to
             if !raw_data.nil?
               controller = raw_data.class.to_resource
               action = raw_data.class.typus_options_for(:default_action_on_item)
               options = { :controller => controller, :action => action, :id => raw_data }
               link_to raw_data.to_label, options
             else
               nil
             end
           when :file
             typus_preview(@item, field.first)
           when :selector
             @item.mapping(field.first)
           else
             raw_data
           end
  -%>
  <dd><%= raw data.blank? ? ("&#151;") : data %></dd>
<%- end -%>
</dl>

<%= raw typus_relationships %>
{'fraction_non_alphanumeric': 0.1534954407294833, 'fraction_numerical': 0.003799392097264438, 'mean_word_length': 2.1233689205219455, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 55, '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': '1545303', 'n_tokens_mistral': 893, 'n_tokens_neox': 853, 'n_words': 158}