<commit_before>{% extends "forums/base.html" %}
{% load utils %}
{% load forums %}
{% load math %}
{% load smileys %}
{% load breadcrumbs %}
{% load pagination_tags %}
{% load dajaxice_templatetags %}
{% block title %}{{ topic.title }} (Page {{ request.page }}) - {{ block.super }}{% endblock %}
{% block header %}
	<link rel="alternate" type="application/atom+xml" href="{% url feed_forums_index %}" title="{{ settings.SITE_NAME }} Forum" />
	<link rel="alternate" type="application/atom+xml" href="{% url feed_forums_topic topic.id %}" title="Topic &quot;{{ topic.title }}&quot; - {{ settings.SITE_NAME }} Forum" />
	<script src="{{ MEDIA_URL }}js/prototype.min.js" type="text/javascript"></script>
	<script src="{{ MEDIA_URL }}js/prototype.dajax.core.js" type="text/javascript"></script>
	{% dajaxice_js_import %}
	<script src="{{ MEDIA_URL }}js/forums.karma.js" type="text/javascript"></script>
	<script src="{{ MEDIA_URL }}js/forums.action.js" type="text/javascript"></script>
{% endblock header %}
{% block breadcrumbs %}{{ block.super }} {% breadcrumb_url topic.forum.name forums.views.forum_view topic.forum.id %} {% breadcrumb_url topic.title forums.views.topic_view topic.id %}{% endblock %}
{% block content %}
	<h2>{{ topic.title }}</h2>
	{% if user.is_superuser or user.is_staff or not topic.is_closed and user|can_post_reply:topic.forum %}
	<a class="button reply" href="{% url forums.views.post_new topic.id %}">Reply</a>
	{% else %}
	<a class="button reply disabled"{% if not user.is_authenticated %} href="{% url forums.views.post_new topic.id %}"{% endif %}>Reply</a>
	{% endif %}
	
	{% if user.is_superuser or user.is_staff %}
	<div class="right">
		{% if topic.is_sticky %}
		<a class="button unstick" href="{% url forums.views.topic_unstick topic.id %}">Unstick topic</a>
		{% else %}
		<a class="button stick" href="{% url forums.views.topic_stick topic.id %}">Stick topic</a>
		{% endif %}
		{% if topic.is_closed %}
		<a class="button open" href="{% url forums.views.topic_open topic.id %}">Open topic</a>
		{% else %}
		<a class="button close" href="{% url forums.views.topic_close topic.id %}">Close topic</a>
		{% endif %}
		<a class="button move" href="{% url forums.views.topic_move topic.id %}">Move topic</a>
		<a class="button delete" href="{% url forums.views.topic_delete topic.id %}">Remove topic</a>
	</div>

	<form action="{% url forums.views.topic_action topic.id %}" method="get">
	{% endif %}
	{% autopaginate posts settings.POSTS_PER_PAGE %}
	{% paginate %}
	
	<table id="topic_view">
		<tbody>
		{% for p in posts %}
			<tr id="post-{{ p.id }}" class="post">
				<td class="user_info">
					<span class="username"><a href="{% url accounts.views.profile_details p.author.id %}">{{ p.author }}</a></span>
					<div class="rank">{{ p.author.profile.title|default:p.author.profile.group.user_title }}</div>
					<div class="user_image_p">
						<div class="user_image">
						{% if p.author.profile.avatar %}
							<img class="avatar" src="{{ p.author.profile.avatar.url }}" />
						{% endif %}
						{% if p.author.profile.group.group_badge %}
							<img class="badge" src="{{ p.author.profile.group.group_badge.url }}" />
						{% endif %}
						</div>
					</div>
				</td>
				<td>
					<table class="content">
						<tr class="post_data">
							<td>#{{ request.page|sub:1|mult:settings.POSTS_PER_PAGE|add:forloop.counter }}{# best... line... EVER! #} <a href="{{ p.get_absolute_url }}">{{ p.created_at|user_date:user }}</a>{% if p.modified_by %} (modified: {{ p.modified_at|user_date:user }}{% if p.modified_by != p.author %} by {{ p.modified_by }}{% endif %}){% endif %} {% if p.is_unread %}[unread]{% endif %}</td>
							<td class="buttons">
								<a class="post_button quote" title="Quote" href="{% url forums.views.post_new topic.id p.id %}"></a>
								<a class="post_button report" title="Report" href="{% url forums.views.post_report p.id %}"></a>
								{% if user.is_staff or p == topic.last_post and p.author == user %}
								<a class="post_button edit" title="Edit" href="{% url forums.views.post_edit p.id %}"></a>
								{% endif %}
								{% if user.is_staff %}
								<a class="post_button delete" title="Delete" href="{% url forums.views.post_delete p.id %}"></a>
								{% endif %}
								<span class="karma-box">
									{% with p|current_karma:user as post_current_karma %}
									<div class="karma-count">{{ p.get_karma }}</div>
									{% if user.is_authenticated and p.author == user %}
									<a class="post_button karma karma_positive{% if post_current_karma == 1 %} current{% endif %}" title="Vote up this post" href="{% url forums.views.post_voteup p.id %}" onclick="return voteup({{ p.id }});"></a>
									<a class="post_button karma karma_neutral{% if post_current_karma == 0 %} current{% endif %}" title="Cancel your vote for this post" href="{% url forums.views.post_votecancel p.id %}" onclick="return votecancel({{ p.id }});"></a>
									<a class="post_button karma karma_negative{% if post_current_karma == -1 %} current{% endif %}" title="Vote down this post" href="{% url forums.views.post_votedown p.id %}" onclick="return votedown({{ p.id }});"></a>
									<span class="karma-voted"></span>
									{% endif %}
									{% endwith %}
								</span>
							
								{% if not p == topic.first_post %}
								{% if user.is_superuser or user.is_staff %}
								<input type="checkbox" class="posts_selected" name="posts_selected[]" value="{{ p.id }}" />
								{% endif %}
								{% endif %}
							</td>
						</tr>
						<tr>
							<td colspan="2">
								{% if settings.ENABLE_SMILEYS and user.profile.show_smileys|default_if_none:"1" %}
								{{ p.content_html|safe|smileys }}<commit_msg>i'll never patch too quickly. i'll never patch too quickly. i'll never patch too quickly... again!<commit_after>{% extends "forums/base.html" %}
{% load utils %}
{% load forums %}
{% load math %}
{% load smileys %}
{% load breadcrumbs %}
{% load pagination_tags %}
{% load dajaxice_templatetags %}
{% block title %}{{ topic.title }} (Page {{ request.page }}) - {{ block.super }}{% endblock %}
{% block header %}
	<link rel="alternate" type="application/atom+xml" href="{% url feed_forums_index %}" title="{{ settings.SITE_NAME }} Forum" />
	<link rel="alternate" type="application/atom+xml" href="{% url feed_forums_topic topic.id %}" title="Topic &quot;{{ topic.title }}&quot; - {{ settings.SITE_NAME }} Forum" />
	<script src="{{ MEDIA_URL }}js/prototype.min.js" type="text/javascript"></script>
	<script src="{{ MEDIA_URL }}js/prototype.dajax.core.js" type="text/javascript"></script>
	{% dajaxice_js_import %}
	<script src="{{ MEDIA_URL }}js/forums.karma.js" type="text/javascript"></script>
	<script src="{{ MEDIA_URL }}js/forums.action.js" type="text/javascript"></script>
{% endblock header %}
{% block breadcrumbs %}{{ block.super }} {% breadcrumb_url topic.forum.name forums.views.forum_view topic.forum.id %} {% breadcrumb_url topic.title forums.views.topic_view topic.id %}{% endblock %}
{% block content %}
	<h2>{{ topic.title }}</h2>
	{% if user.is_superuser or user.is_staff or not topic.is_closed and user|can_post_reply:topic.forum %}
	<a class="button reply" href="{% url forums.views.post_new topic.id %}">Reply</a>
	{% else %}
	<a class="button reply disabled"{% if not user.is_authenticated %} href="{% url forums.views.post_new topic.id %}"{% endif %}>Reply</a>
	{% endif %}
	
	{% if user.is_superuser or user.is_staff %}
	<div class="right">
		{% if topic.is_sticky %}
		<a class="button unstick" href="{% url forums.views.topic_unstick topic.id %}">Unstick topic</a>
		{% else %}
		<a class="button stick" href="{% url forums.views.topic_stick topic.id %}">Stick topic</a>
		{% endif %}
		{% if topic.is_closed %}
		<a class="button open" href="{% url forums.views.topic_open topic.id %}">Open topic</a>
		{% else %}
		<a class="button close" href="{% url forums.views.topic_close topic.id %}">Close topic</a>
		{% endif %}
		<a class="button move" href="{% url forums.views.topic_move topic.id %}">Move topic</a>
		<a class="button delete" href="{% url forums.views.topic_delete topic.id %}">Remove topic</a>
	</div>

	<form action="{% url forums.views.topic_action topic.id %}" method="get">
	{% endif %}
	{% autopaginate posts settings.POSTS_PER_PAGE %}
	{% paginate %}
	
	<table id="topic_view">
		<tbody>
		{% for p in posts %}
			<tr id="post-{{ p.id }}" class="post">
				<td class="user_info">
					<span class="username"><a href="{% url accounts.views.profile_details p.author.id %}">{{ p.author }}</a></span>
					<div class="rank">{{ p.author.profile.title|default:p.author.profile.group.user_title }}</div>
					<div class="user_image_p">
						<div class="user_image">
						{% if p.author.profile.avatar %}
							<img class="avatar" src="{{ p.author.profile.avatar.url }}" />
						{% endif %}
						{% if p.author.profile.group.group_badge %}
							<img class="badge" src="{{ p.author.profile.group.group_badge.url }}" />
						{% endif %}
						</div>
					</div>
				</td>
				<td>
					<table class="content">
						<tr class="post_data">
							<td>#{{ request.page|sub:1|mult:settings.POSTS_PER_PAGE|add:forloop.counter }}{# best... line... EVER! #} <a href="{{ p.get_absolute_url }}">{{ p.created_at|user_date:user }}</a>{% if p.modified_by %} (modified: {{ p.modified_at|user_date:user }}{% if p.modified_by != p.author %} by {{ p.modified_by }}{% endif %}){% endif %} {% if p.is_unread %}[unread]{% endif %}</td>
							<td class="buttons">
								<a class="post_button quote" title="Quote" href="{% url forums.views.post_new topic.id p.id %}"></a>
								<a class="post_button report" title="Report" href="{% url forums.views.post_report p.id %}"></a>
								{% if user.is_staff or p == topic.last_post and p.author == user %}
								<a class="post_button edit" title="Edit" href="{% url forums.views.post_edit p.id %}"></a>
								{% endif %}
								{% if user.is_staff %}
								<a class="post_button delete" title="Delete" href="{% url forums.views.post_delete p.id %}"></a>
								{% endif %}
								<span class="karma-box">
									{% with p|current_karma:user as post_current_karma %}
									<div class="karma-count">{{ p.get_karma }}</div>
									{% if user.is_authenticated and p.author != user %}
									<a class="post_button karma karma_positive{% if post_current_karma == 1 %} current{% endif %}" title="Vote up this post" href="{% url forums.views.post_voteup p.id %}" onclick="return voteup({{ p.id }});"></a>
									<a class="post_button karma karma_neutral{% if post_current_karma == 0 %} current{% endif %}" title="Cancel your vote for this post" href="{% url forums.views.post_votecancel p.id %}" onclick="return votecancel({{ p.id }});"></a>
									<a class="post_button karma karma_negative{% if post_current_karma == -1 %} current{% endif %}" title="Vote down this post" href="{% url forums.views.post_votedown p.id %}" onclick="return votedown({{ p.id }});"></a>
									<span class="karma-voted"></span>
									{% endif %}
									{% endwith %}
								</span>
							
								{% if not p == topic.first_post %}
								{% if user.is_superuser or user.is_staff %}
								<input type="checkbox" class="posts_selected" name="posts_selected[]" value="{{ p.id }}" />
								{% endif %}
								{% endif %}
							</td>
						</tr>
						<tr>
							<td colspan="2">
								{% if settings.ENABLE_SMILEYS and user.profile.show_smileys|default_if_none:"1" %}
								{{ p.content_html|safe|smileys }}
{'fraction_non_alphanumeric': 0.19839958249978254, 'fraction_numerical': 0.001391667391493433, 'mean_word_length': 3.694977541853818, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1977130', 'n_tokens_mistral': 4884, 'n_tokens_neox': 3836, 'n_words': 893}