<commit_before>{% extends "squelette_campagne.html.twig" %}

{% block content %}

	<table class="table table-striped table-hover" width="100%">
		<thead>
			<tr>
				<th colspan="2" class="categorie"><h5><a href="{{ path('forum_campagne', {campagne_id: campagne_id}) }}">Forum</a> >
					{{ topic.section_title }} > {{ topic.title }}</h5></th>
				<th class="categorie" style="text-align: right">
				{% for i in range(1, last_page) %}
					{% if i != actual_page %}
						<a href="{{ path('topic_page', {'campagne_id' : campagne_id, 'topic_id' : topic.id, 'no_page' : i}) }}">{{ i }}</a>
					{% else %}
						<u>{{ i }}</u>
					{% endif %}


				{% endfor %}
                                {% if actual_page == 0%}
                                    <u>Toutes</u>
                                {% else %}
                                    <a href="{{ path('topic_all', {'campagne_id' : campagne_id, 'topic_id' : topic.id}) }}">Toutes</a>
                                {% endif %}
				</th>
			</tr>
			<tr>
				<th width="15%"><i>Auteur</i></th>
				<th width="65%"><i>Message</i></th>
				<th width="20%"></th>
			</tr>
		</thead>
		<tbody>
			{% for post in posts %}


                    <tr>
                        <!-- Post standard -->
                        {% if post.perso_name != null or  post.user_username != null %}
                        <td>
                            {% if post.perso_name != null %}
                                <p class="post_name"><a onClick="persoModalService.openPerso({{campagne_id}}, {{post.perso_id}})"><b>{{ post.perso_name }}</b></a></p>
                  <p class="post_user_title">{{post.perso_concept}}</p>
                                <p class="post_info"><i>Le {{ post.post_date|date("d/m/y H:i") }}</i></p>
                  <p class="post_info">Par <a href="{{ path('profile', {username: post.user_username}) }}" class="profil{{ post.user_profil }}"><i>{{ post.user_username }}</i></a></p>
                                <img src="{{ post.perso_avatar }}" width="80%" class="img-rounded"/>

                                <p>&nbsp;</p>
                                {% if is_mj or post.user_id == app.session.get('user')['id'] %}
                                {% for widget in post.perso_widgets %}
                                    {% include('composant/perso_widget.html.twig') %}
                                {% endfor %}
                                {% endif %}


                            {% elseif  post.user_username != null %}
                  <p class="post_name"><a href="{{ path('profile', {username: post.user_username}) }}" class="profil{{ post.user_profil }}"><b>{{ post.user_username }}</b></a></p>
                  <p class="post_user_title"><i>{{post.user_titre}}</i></p>
                                <p class="post_info"><i>Le {{ post.post_date|date("d/m/y H:i") }}</i></p>
                                <img src="{{ post.user_avatar }}" width="80%" class="img-rounded"/>
                            {% endif %}
                        </td>
                        <td>
                            <div class="postContent">
                            {% autoescape false %}
                                {{ post.post_content }}
                            {% endautoescape %}
                            </div>
                            <div style="display: none;" id="contentDiv{{ post.post_id }}">
                                {% autoescape false %}
                                    <b>Posté par {% if post.perso_name != null %} {{ post.perso_name }} {% elseif  post.user_username != null %} {{ post.user_username }} {% endif %}</b>
                                    <br>
                                    {{ post.post_content }}
                                {% endautoescape %}
                            </div>
                            <a name="post{{ post.post_id }}"></a>
                        </td>
                        {% else %}
                        <td colspan="2">
                            <div class="postDice">
                                {% autoescape false %}
                                {{ post.post_content }}
                                {% endautoescape %}
                            </div>
                        </td>
                        {% endif %}
                        <td style="text-align: right">
                            <div class="btn-group btn-group-xs">
                                <a title="Quote" class="btn btn-xs btn-default iconeBtn" onClick="quote('{{ post.post_id}}')"><i class="icon-quote-left"></i></a>
                                {% if is_mj or (post.user_id == app.session.get('user')['id']) %}
                                    {% if post.user_id != null %}
                                        <a href="{{ path('post_edit', {campagne_id : campagne_id, post_id : post.post_id}) }}"
                                        title="Editer" class="btn btn-xs btn-primary iconeBtn"><i class="icon-edit"></i></a>
                                    {% endif %}

                                {% endif %}
                                {% if is_mj or ( (post.user_id == app.session.get('user')['id']) and (topic.last_post_id == post.post_id) )  %}
                                    <a href="{{ path('post_delete', {campagne_id : campagne_id, post_id : post.post_id, topic_id : post.topic_id}) }}"
                                        title="Supprimer" class="btn btn-xs btn-danger iconeBtn"><i class="icon-remove-sign"></i></a>
                                {% endif %}
                            </div>
                            <a title="Aller au bas de la page" href="#bottom" style="margin-left: 2em"><i class="icon-double-angle-down"></i></a>
                            <a title="Aller au début de la page" href="#top"><i class="icon-double-angle-up"></i></a>
                <a title="Lien permanent" href="#post{{ post.post_id }}"><i class="icon-link"></i></a>

                        </td>
                    </tr>

			{% endfor %}
      <tr id="previewRow" class="hide">
        <td>
        </td>
        <td>
          <span id="previewCell"></span>
        </td>
      </tr>
			{% if topic.is_closed == 0 or is_mj %}
				{% if campagne_id == 0 or perso|length > 0 or is_mj or topic.is_private == 2 %}
					{% if campagne_id != 0 %}
					<tr id="quickDicerRow">
						<td>
						</td>
						<td>
							<b>Lancer les dés</b><a href="#dicerHelp" role="button" data-toggle="modal" class="btn btn-link"><i class="icon-question"></i></a>
							<form role="form" class="form-inline"><commit_msg>Fix(Forum) - Static link<commit_after>{% extends "squelette_campagne.html.twig" %}

{% block content %}

	<table class="table table-striped table-hover" width="100%">
		<thead>
			<tr>
				<th colspan="2" class="categorie"><h5><a href="{{ path('forum_campagne', {campagne_id: campagne_id}) }}">Forum</a> >
					{{ topic.section_title }} > {{ topic.title }}</h5></th>
				<th class="categorie" style="text-align: right">
				{% for i in range(1, last_page) %}
					{% if i != actual_page %}
						<a href="{{ path('topic_page', {'campagne_id' : campagne_id, 'topic_id' : topic.id, 'no_page' : i}) }}">{{ i }}</a>
					{% else %}
						<u>{{ i }}</u>
					{% endif %}


				{% endfor %}
                                {% if actual_page == 0%}
                                    <u>Toutes</u>
                                {% else %}
                                    <a href="{{ path('topic_all', {'campagne_id' : campagne_id, 'topic_id' : topic.id}) }}">Toutes</a>
                                {% endif %}
				</th>
			</tr>
			<tr>
				<th width="15%"><i>Auteur</i></th>
				<th width="65%"><i>Message</i></th>
				<th width="20%"></th>
			</tr>
		</thead>
		<tbody>
			{% for post in posts %}


                    <tr>
                        <!-- Post standard -->
                        {% if post.perso_name != null or  post.user_username != null %}
                        <td>
                            {% if post.perso_name != null %}
                                <p class="post_name"><a onClick="persoModalService.openPerso({{campagne_id}}, {{post.perso_id}})"><b>{{ post.perso_name }}</b></a></p>
                  <p class="post_user_title">{{post.perso_concept}}</p>
                                <p class="post_info"><i>Le {{ post.post_date|date("d/m/y H:i") }}</i></p>
                  <p class="post_info">Par <a href="{{ path('profile', {username: post.user_username}) }}" class="profil{{ post.user_profil }}"><i>{{ post.user_username }}</i></a></p>
                                <img src="{{ post.perso_avatar }}" width="80%" class="img-rounded"/>

                                <p>&nbsp;</p>
                                {% if is_mj or post.user_id == app.session.get('user')['id'] %}
                                {% for widget in post.perso_widgets %}
                                    {% include('composant/perso_widget.html.twig') %}
                                {% endfor %}
                                {% endif %}


                            {% elseif  post.user_username != null %}
                  <p class="post_name"><a href="{{ path('profile', {username: post.user_username}) }}" class="profil{{ post.user_profil }}"><b>{{ post.user_username }}</b></a></p>
                  <p class="post_user_title"><i>{{post.user_titre}}</i></p>
                                <p class="post_info"><i>Le {{ post.post_date|date("d/m/y H:i") }}</i></p>
                                <img src="{{ post.user_avatar }}" width="80%" class="img-rounded"/>
                            {% endif %}
                        </td>
                        <td>
                            <div class="postContent">
                            {% autoescape false %}
                                {{ post.post_content }}
                            {% endautoescape %}
                            </div>
                            <div style="display: none;" id="contentDiv{{ post.post_id }}">
                                {% autoescape false %}
                                    <b>Posté par {% if post.perso_name != null %} {{ post.perso_name }} {% elseif  post.user_username != null %} {{ post.user_username }} {% endif %}</b>
                                    <br>
                                    {{ post.post_content }}
                                {% endautoescape %}
                            </div>
                            <a name="post{{ post.post_id }}"></a>
                        </td>
                        {% else %}
                        <td colspan="2">
                            <div class="postDice">
                                {% autoescape false %}
                                {{ post.post_content }}
                                {% endautoescape %}
                            </div>
                        </td>
                        {% endif %}
                        <td style="text-align: right">
                            <div class="btn-group btn-group-xs">
                                <a title="Quote" class="btn btn-xs btn-default iconeBtn" onClick="quote('{{ post.post_id}}')"><i class="icon-quote-left"></i></a>
                                {% if is_mj or (post.user_id == app.session.get('user')['id']) %}
                                    {% if post.user_id != null %}
                                        <a href="{{ path('post_edit', {campagne_id : campagne_id, post_id : post.post_id}) }}"
                                        title="Editer" class="btn btn-xs btn-primary iconeBtn"><i class="icon-edit"></i></a>
                                    {% endif %}

                                {% endif %}
                                {% if is_mj or ( (post.user_id == app.session.get('user')['id']) and (topic.last_post_id == post.post_id) )  %}
                                    <a href="{{ path('post_delete', {campagne_id : campagne_id, post_id : post.post_id, topic_id : post.topic_id}) }}"
                                        title="Supprimer" class="btn btn-xs btn-danger iconeBtn"><i class="icon-remove-sign"></i></a>
                                {% endif %}
                            </div>
                            <a title="Aller au bas de la page" href="#bottom" style="margin-left: 2em"><i class="icon-double-angle-down"></i></a>
                            <a title="Aller au début de la page" href="#top"><i class="icon-double-angle-up"></i></a>
                <a title="Lien permanent" href="{{ path('topic_all', {'campagne_id' : campagne_id, 'topic_id' : topic.id}) }}#post{{ post.post_id }}"><i class="icon-link"></i></a>

                        </td>
                    </tr>

			{% endfor %}
      <tr id="previewRow" class="hide">
        <td>
        </td>
        <td>
          <span id="previewCell"></span>
        </td>
      </tr>
			{% if topic.is_closed == 0 or is_mj %}
				{% if campagne_id == 0 or perso|length > 0 or is_mj or topic.is_private == 2 %}
					{% if campagne_id != 0 %}
					<tr id="quickDicerRow">
						<td>
						</td>
						<td>
							<b>Lancer les dés</b><a href="#dicerHelp" role="button" data-toggle="modal" class="btn btn-link"><i class="icon-question"></i></a>
							<form role="form" class="form-inline">
{'fraction_non_alphanumeric': 0.17275449101796408, 'fraction_numerical': 0.0037425149700598802, 'mean_word_length': 1.2707341944255608, 'pattern_counts': {'":': 0, '<': 277, '<?xml version=': 0, '>': 283, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 68, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2132470', 'n_tokens_mistral': 4248, 'n_tokens_neox': 3682, 'n_words': 713}