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

<% content_for :right do -%>

<h5><%= I18n.t 'txt.voices', :default => 'Voices' %></h5>
<ul class="flat talking">
<% @topic.voices.each do | user | %>
  <li><%= link_to h(user.display_name), user_path(user) %></li>
<% end %>
</ul>


<% end # right content -%>

<% if false#logged_in? %>

<% form_tag 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 => monitorship_path(@forum, @topic) %>} else {<%= remote_function :url => monitorship_path(@forum, @topic), :method => :delete %>}" />
  <label id="monitor_label" for="monitor_checkbox"><%= @monitoring ? I18n.t('txt.monitoring_topic', :default => 'Monitoring topic') : I18n.t('txt.monitor_topic', :default => 'Monitor topic') %></label>
  <%= hidden_field_tag '_method', 'delete' if @monitoring %>
  <%= submit_tag :Set, :id => 'monitor_submit' %>
</div>
<% end -%>

<% end -%>


<div class="crumbs">
  <%= link_to I18n.t('txt.forums', :default => 'Forums'), root_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 I18n.t('txt.page_nr', :default => 'page {{nr}}'), 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();") if logged_in? %>>

  <%= h @topic.title %>
  <% if @topic.locked? %>
  <span>(<%= I18n.t 'txt.topic', :default => 'Topic' %> <%= I18n.t 'txt.locked', :default => 'locked' %>)</span>
  <% end %>
  <% if logged_in? %>
    <span style="display:none;" id="topic_mod">
      <% if @topic.editable_by?(current_user) -%>
        <%= link_to(I18n.t('txt.edit', :default => 'edit'), edit_forum_topic_path(@forum, @topic), :class => "utility") %> |
        <%= link_to(I18n.t('txt.delete', :default => 'delete'), forum_topic_path(@forum, @topic), :class => "utility", :method => :delete, :confirm => I18n.t('txt.views_topics.delete_sure', :default => 'Delete this topic forever?')) %>
      <% end -%>
    </span>
  <% end %>
</h1>

<p class="subtitle">
  <%= feed_icon_tag @topic.title, formatted_forum_topic_posts_path(@forum, @topic, 'atom') %>
  <%= I18n.t 'txt.count_posts', :count => @topic.posts.size, :num => number_with_delimiter(@topic.posts.size) %>,
  <%= I18n.t 'txt.count_voices', :count => @topic.voices.size, :num => number_with_delimiter(@topic.voices.size) %>
</p>

<% unless @posts.empty? -%>
<%= will_paginate @posts %>

<a name="<%= dom_id @posts.first %>" id="<%= dom_id @posts.first %>">&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="<%= dom_id post %>" id="<%= dom_id post %>">&nbsp;</a>
  </td>
</tr>
<% end %>
<tr class="post hentry" id="<%= dom_id post %>-row">
  <td class="author vcard">
    <div class="date">
      <a href="#<%= dom_id post %>" rel="bookmark">
      <abbr class="updated" title="<%= post.created_at.xmlschema %>">
      <%= I18n.t 'txt.post_age', :when => time_ago_in_words(post.created_at), :default => "posted {{when}} ago" %>
      </abbr>
      </a>
    </div>

    <%= avatar_for post.user %>
    <span class="fn"><%= link_to truncate(h(post.user.display_name), :length => 15), user_path(post.user), :class => (post.user == @posts.first.user ? "threadauthor" : nil) %></span>
    <% if post.user.admin? || post.forum.moderators.include?(post.user) || !post.user.active? %>
    <span class="admin">
      <% if post.user.admin? %>
      <%= I18n.t 'txt.user_is_administrator', :default => 'Administator' %>
      <% elsif post.forum.moderators.include?(post.user) %>
      <%= I18n.t 'txt.user_is_moderator', :default => 'Moderator' %>
      <% elsif post.user.suspended? %>
      <%=h post.user.state  %>
      <% end %>
    </span>
    <% end %>
    <span class="posts"><%= I18n.t 'txt.count_posts', :count => post.user.posts.size, :num => number_with_delimiter(post.user.posts.size) %></span>


    <% if logged_in? && post.editable_by?(current_user) -%>
    <p>
      <span class="edit">
        <%= ajax_spinner_for "edit-post-#{post.id}", "spinner_bounce.gif" %>
				<%= link_to I18n.t('txt.admin.edit_post', :default => 'Edit post'), edit_forum_topic_post_path(@forum, @topic, post, :page => current_page), :class => 'utility' %>
      </span>
    </p>
    <% end -%>


  </td>
  <td class="body entry-content" id="post-body-<%= post.id %>">
<!--
    <%= link_to_function image_tag('clearbits/comment.gif', :class => 'icon reply'), "$('reply').toggle()" if logged_in? %>
-->
      <% if post.user.active? %>
        <%= post.body_html %>
      <% else %>
        <p>(<% I18n.t 'txt.suspended_user_post', :default => 'This post has been removed' %>)</p>
      <% end %>
  </td>
</tr>

<% end %><commit_msg>show reply button on thread starting post<commit_after><% @page_title = @topic.title %>
<% @monitoring = logged_in? && !Monitorship.count(:id, :conditions => ['user_id = ? and topic_id = ? and active = ?', current_user.id, @topic.id, true]).zero? %>

<% content_for :right do -%>

<h5><%= I18n.t 'txt.voices', :default => 'Voices' %></h5>
<ul class="flat talking">
<% @topic.voices.each do | user | %>
  <li><%= link_to h(user.display_name), user_path(user) %></li>
<% end %>
</ul>


<% end # right content -%>

<% if false#logged_in? %>

<% form_tag 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 => monitorship_path(@forum, @topic) %>} else {<%= remote_function :url => monitorship_path(@forum, @topic), :method => :delete %>}" />
  <label id="monitor_label" for="monitor_checkbox"><%= @monitoring ? I18n.t('txt.monitoring_topic', :default => 'Monitoring topic') : I18n.t('txt.monitor_topic', :default => 'Monitor topic') %></label>
  <%= hidden_field_tag '_method', 'delete' if @monitoring %>
  <%= submit_tag :Set, :id => 'monitor_submit' %>
</div>
<% end -%>

<% end -%>


<div class="crumbs">
  <%= link_to I18n.t('txt.forums', :default => 'Forums'), root_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 I18n.t('txt.page_nr', :default => 'page {{nr}}'), 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();") if logged_in? %>>

  <%= h @topic.title %>
  <% if @topic.locked? %>
  <span>(<%= I18n.t 'txt.topic', :default => 'Topic' %> <%= I18n.t 'txt.locked', :default => 'locked' %>)</span>
  <% end %>
  <% if logged_in? %>
    <span style="display:none;" id="topic_mod">
      <% if @topic.editable_by?(current_user) -%>
        <%= link_to(I18n.t('txt.edit', :default => 'edit'), edit_forum_topic_path(@forum, @topic), :class => "utility") %> |
        <%= link_to(I18n.t('txt.delete', :default => 'delete'), forum_topic_path(@forum, @topic), :class => "utility", :method => :delete, :confirm => I18n.t('txt.views_topics.delete_sure', :default => 'Delete this topic forever?')) %>
      <% end -%>
    </span>
  <% end %>
</h1>

<p class="subtitle">
  <%= feed_icon_tag @topic.title, formatted_forum_topic_posts_path(@forum, @topic, 'atom') %>
  <%= I18n.t 'txt.count_posts', :count => @topic.posts.size, :num => number_with_delimiter(@topic.posts.size) %>,
  <%= I18n.t 'txt.count_voices', :count => @topic.voices.size, :num => number_with_delimiter(@topic.voices.size) %>
</p>

<% unless @posts.empty? -%>
<%= will_paginate @posts %>

<a name="<%= dom_id @posts.first %>" id="<%= dom_id @posts.first %>">&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="<%= dom_id post %>" id="<%= dom_id post %>">&nbsp;</a>
  </td>
</tr>
<% end %>
<tr class="post hentry" id="<%= dom_id post %>-row">
  <td class="author vcard">
    <div class="date">
      <a href="#<%= dom_id post %>" rel="bookmark">
      <abbr class="updated" title="<%= post.created_at.xmlschema %>">
      <%= I18n.t 'txt.post_age', :when => time_ago_in_words(post.created_at), :default => "posted {{when}} ago" %>
      </abbr>
      </a>
    </div>

    <%= avatar_for post.user %>
    <span class="fn"><%= link_to truncate(h(post.user.display_name), :length => 15), user_path(post.user), :class => (post.user == @posts.first.user ? "threadauthor" : nil) %></span>
    <% if post.user.admin? || post.forum.moderators.include?(post.user) || !post.user.active? %>
    <span class="admin">
      <% if post.user.admin? %>
      <%= I18n.t 'txt.user_is_administrator', :default => 'Administator' %>
      <% elsif post.forum.moderators.include?(post.user) %>
      <%= I18n.t 'txt.user_is_moderator', :default => 'Moderator' %>
      <% elsif post.user.suspended? %>
      <%=h post.user.state  %>
      <% end %>
    </span>
    <% end %>
    <span class="posts"><%= I18n.t 'txt.count_posts', :count => post.user.posts.size, :num => number_with_delimiter(post.user.posts.size) %></span>


    <% if logged_in? && post.editable_by?(current_user) -%>
    <p>
      <span class="edit">
        <%= ajax_spinner_for "edit-post-#{post.id}", "spinner_bounce.gif" %>
				<%= link_to I18n.t('txt.admin.edit_post', :default => 'Edit post'), edit_forum_topic_post_path(@forum, @topic, post, :page => current_page), :class => 'utility' %>
      </span>
    </p>
    <% end -%>


  </td>
  <td class="body entry-content" id="post-body-<%= post.id %>">

    <%= link_to_function image_tag('clearbits/comment.gif', :class => 'icon reply'), "$('reply').toggle()" if logged_in? && @posts.first == post %>

      <% if post.user.active? %>
        <%= post.body_html %>
      <% else %>
        <p>(<% I18n.t 'txt.suspended_user_post', :default => 'This post has been removed' %>)</p>
      <% end %>
  </td>
</tr>

<% end %>
{'fraction_non_alphanumeric': 0.23930592929386657, 'fraction_numerical': 0.009279020135473694, 'mean_word_length': 4.079170593779454, 'pattern_counts': {'":': 0, '<': 274, '<?xml version=': 0, '>': 352, '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': '2950208', 'n_tokens_mistral': 4365, 'n_tokens_neox': 3995, 'n_words': 774}