<commit_before><% @page_title = @topic.title %>
<% @monitoring = !Monitorship.count(:all, :conditions => ['user_id = ? and monitorship_id = ? and active = ? and monitorship_type = ?', current_user.id, @topic.id, true, 'topic']).zero? %>

<% form_tag topic_monitorship_path(@forum, @topic), :style => 'margin-top:0em; float:right;' do -%>
<div>
  <input id="monitor_checkbox" type="checkbox" <%= "checked='checked'" if @monitoring %>
    onclick="if (this.checked) {<%= remote_function :url => topic_monitorship_path(@forum, @topic) %>} else {<%= remote_function :url => topic_monitorship_path(@forum, @topic), :method => :delete %>}" />
  <label id="monitor_label" for="monitor_checkbox"><%= @monitoring ? _('Monitoring topic') : _('Monitor topic') %></label>
  <%= hidden_field_tag '_method', 'delete' if @monitoring %>
  <%= submit_tag :Set, :id => 'monitor_submit' %>
</div>
<% end -%>


<div class="crumbs">
  <%= link_to _("Forums"), home_path %> <span class="arrow">&rarr;</span>
  <%= link_to h(@topic.forum.name), forum_path(@topic.forum) %>
  <%
  page=session[:forum_page] ? session[:forum_page][@topic.forum.id] : nil
  if page and page!=1 %>
  <small style="color:#ccc">
  (<%= link_to _("page %s", page), forum_path(:id => @topic.forum, :page => page) %>)
  </small>
  <% end %>
  <span class="arrow">&rarr;</span>
</div>

<h1 id="topic-title" style="margin-top:0.5em;"<%= %( onmouseover="$('topic_mod').show();" onmouseout="$('topic_mod').hide();") %>>


  <%= h @topic.title %>
  <% if @topic.locked? %>
  <span>(<%= _ 'locked' %>)</span>
  <% end %>
    <span style="display:none;" id="topic_mod">
      <% if @topic.editable_by?(current_user) -%>
        <%= link_to(_('Edit'), edit_topic_path(@forum, @topic), :class => "utility") %> |
        <%= link_to(_('Delete'), topic_path(@forum, @topic), :class => "utility", :method => :delete, :confirm => _('Delete this topic forever?')) %>
      <% end -%>
    </span>
</h1>

<p class="subtitle">
  <%= _ "%d posts", @topic.posts.count %>,
  <%= _ "%d voices", @topic.voice_count %>
</p>

<%= will_paginate(@posts, { :next_label => _('Next') + ' &raquo;', :prev_label => '&laquo; ' + _('Previous') }) %>

<a name="<%= @posts.first.dom_id %>" id="<%= @posts.first.dom_id %>">&nbsp;</a>

<table border="0" cellspacing="0" cellpadding="0" class="posts wide">
<% for post in @posts do %>
<% unless post == @posts.first %>
<tr class="spacer">
  <td colspan="2">
    <a name="<%= post.dom_id %>" id="<%= post.dom_id %>">&nbsp;</a>
  </td>
</tr>
<% end %>
<tr class="post hentry" id="<%= post.dom_id %>-row">
  <td class="author vcard">
    <div class="date">
      <a href="#<%= post.dom_id %>" rel="bookmark">
      <abbr class="updated" title="<%= post.created_at.xmlschema %>">
      <%= time_ago_in_words(post.created_at) %>
      </abbr>
      </a>
    </div>

    <%= avatar_for post.user %>
    <span class="fn"><span class="<%= (post.user == @posts.first.user ? "threadauthor" : "") %>"><%= truncate(h(post.user.display_name), 15)%></span>
    <% if post.user.admin? or post.forum.moderators.include?(post.user) %>
    <span class="admin">
      <% if((post.forum.company_id.nil? && post.user.admin > 1) || (!post.forum.company_id.nil? && post.user.admin?)) %>
      <%= _ 'Administator' %>
      <% elsif post.forum.moderators.include?(post.user) %>
      <%= _ 'Moderator' %>
      <% end %>
    </span>
    <% end %>
    <span class="posts"><%= _ "%d posts", post.user.posts_count %></span>


    <% if post.editable_by?(current_user) -%>
    <p>
      <span class="edit">
        <%= ajax_spinner_for "edit-post-#{post.id}", "spinner_bounce.gif" %>
        <%= link_to_remote(_('Edit post'),
              {:url => edit_post_path(:forum_id => @forum, :topic_id => @topic, :id => post), :method => :get,
               :before => "EditForm.init(#{post.id});", :condition => "!EditForm.isEditing(#{post.id})" },
              {:href => edit_post_path(:forum_id => @forum, :topic_id => @topic, :id => post, :page => params[:page]), :class => "utility"}) %>
      </span>
    </p>
    <% end -%><commit_msg>Fix Administator => Administrator<commit_after><% @page_title = @topic.title %>
<% @monitoring = !Monitorship.count(:all, :conditions => ['user_id = ? and monitorship_id = ? and active = ? and monitorship_type = ?', current_user.id, @topic.id, true, 'topic']).zero? %>

<% form_tag topic_monitorship_path(@forum, @topic), :style => 'margin-top:0em; float:right;' do -%>
<div>
  <input id="monitor_checkbox" type="checkbox" <%= "checked='checked'" if @monitoring %>
    onclick="if (this.checked) {<%= remote_function :url => topic_monitorship_path(@forum, @topic) %>} else {<%= remote_function :url => topic_monitorship_path(@forum, @topic), :method => :delete %>}" />
  <label id="monitor_label" for="monitor_checkbox"><%= @monitoring ? _('Monitoring topic') : _('Monitor topic') %></label>
  <%= hidden_field_tag '_method', 'delete' if @monitoring %>
  <%= submit_tag :Set, :id => 'monitor_submit' %>
</div>
<% end -%>


<div class="crumbs">
  <%= link_to _("Forums"), home_path %> <span class="arrow">&rarr;</span>
  <%= link_to h(@topic.forum.name), forum_path(@topic.forum) %>
  <%
  page=session[:forum_page] ? session[:forum_page][@topic.forum.id] : nil
  if page and page!=1 %>
  <small style="color:#ccc">
  (<%= link_to _("page %s", page), forum_path(:id => @topic.forum, :page => page) %>)
  </small>
  <% end %>
  <span class="arrow">&rarr;</span>
</div>

<h1 id="topic-title" style="margin-top:0.5em;"<%= %( onmouseover="$('topic_mod').show();" onmouseout="$('topic_mod').hide();") %>>


  <%= h @topic.title %>
  <% if @topic.locked? %>
  <span>(<%= _ 'locked' %>)</span>
  <% end %>
    <span style="display:none;" id="topic_mod">
      <% if @topic.editable_by?(current_user) -%>
        <%= link_to(_('Edit'), edit_topic_path(@forum, @topic), :class => "utility") %> |
        <%= link_to(_('Delete'), topic_path(@forum, @topic), :class => "utility", :method => :delete, :confirm => _('Delete this topic forever?')) %>
      <% end -%>
    </span>
</h1>

<p class="subtitle">
  <%= _ "%d posts", @topic.posts.count %>,
  <%= _ "%d voices", @topic.voice_count %>
</p>

<%= will_paginate(@posts, { :next_label => _('Next') + ' &raquo;', :prev_label => '&laquo; ' + _('Previous') }) %>

<a name="<%= @posts.first.dom_id %>" id="<%= @posts.first.dom_id %>">&nbsp;</a>

<table border="0" cellspacing="0" cellpadding="0" class="posts wide">
<% for post in @posts do %>
<% unless post == @posts.first %>
<tr class="spacer">
  <td colspan="2">
    <a name="<%= post.dom_id %>" id="<%= post.dom_id %>">&nbsp;</a>
  </td>
</tr>
<% end %>
<tr class="post hentry" id="<%= post.dom_id %>-row">
  <td class="author vcard">
    <div class="date">
      <a href="#<%= post.dom_id %>" rel="bookmark">
      <abbr class="updated" title="<%= post.created_at.xmlschema %>">
      <%= time_ago_in_words(post.created_at) %>
      </abbr>
      </a>
    </div>

    <%= avatar_for post.user %>
    <span class="fn"><span class="<%= (post.user == @posts.first.user ? "threadauthor" : "") %>"><%= truncate(h(post.user.display_name), 15)%></span>
    <% if post.user.admin? or post.forum.moderators.include?(post.user) %>
    <span class="admin">
      <% if((post.forum.company_id.nil? && post.user.admin > 1) || (!post.forum.company_id.nil? && post.user.admin?)) %>
      <%= _ 'Administrator' %>
      <% elsif post.forum.moderators.include?(post.user) %>
      <%= _ 'Moderator' %>
      <% end %>
    </span>
    <% end %>
    <span class="posts"><%= _ "%d posts", post.user.posts_count %></span>


    <% if post.editable_by?(current_user) -%>
    <p>
      <span class="edit">
        <%= ajax_spinner_for "edit-post-#{post.id}", "spinner_bounce.gif" %>
        <%= link_to_remote(_('Edit post'),
              {:url => edit_post_path(:forum_id => @forum, :topic_id => @topic, :id => post), :method => :get,
               :before => "EditForm.init(#{post.id});", :condition => "!EditForm.isEditing(#{post.id})" },
              {:href => edit_post_path(:forum_id => @forum, :topic_id => @topic, :id => post, :page => params[:page]), :class => "utility"}) %>
      </span>
    </p>
    <% end -%>
{'fraction_non_alphanumeric': 0.24782661932166034, 'fraction_numerical': 0.003183543528835558, 'mean_word_length': 3.9926650366748166, 'pattern_counts': {'":': 0, '<': 207, '<?xml version=': 0, '>': 264, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2198946', 'n_tokens_mistral': 3216, 'n_tokens_neox': 2965, 'n_words': 556}