<commit_before><h1>
    <i class="forum"></i><a ng-click="openMainPage()"><i18n>forum.title</i18n></a>
    <side-panel class="cell">
    	<nav class="vertical">
            <ul>
                <li ng-repeat="cat in categories.all">
                    <h2><a ng-click="openCategory(cat)">[[cat.name]]</a></h2>
                    <ul class="sublist">
                        <li ng-repeat="subject in cat.subjects.all">
                            <a ng-click="openSubject(subject)">[[subject.title]]</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </nav>
    </side-panel>
</h1>
<h2><a ng-click="openCategory(subject.category)">[[subject.category.name]]</a> / [[subject.title]]</h2>
<a id="top" ng-click="scrollTo('bottom')" class="right-magnet">↓ <i18n><span class="no-style ng-scope">Voir le dernier message</span></i18n></a>

<div ng-repeat="message in messages.all | orderBy: 'created.$date'" class="bubble-container alternate-container">
	<div class="row vertical-spacing"></div>
	<div class="row rigid-grid">
		<div class="two cell" ng-click="viewAuthor(message)">
            <div>
                <strong>[[message.owner.displayName]]</strong>
            </div>
            <div>
                <em class="small-text">[[formatDateFromNow(message.created.$date)]]</em>
            </div>
			<div class="image">
				<img ng-src="/userbook/avatar/[[message.owner.userId]]" />
			</div>
		</div>
		<article class="margin-two bubble" ng-if="message !== editedMessage">
            <plus class="contextual-buttons right-magnet">
                <div class="row">
                    <resource-right name="publish" resource="subject">
    					<button class="cell" ng-click="confirmRemoveMessage(message)"><i18n>forum.remove</i18n></button>
    				</resource-right>
					<!-- Moderators can edit all messages. Owner can edit his message only if the subject is not locked -->
					<resource-right class="cell" name="publish" resource="subject" >
						<button ng-click="editMessage(message)"><i18n>forum.edit</i18n></button>
					</resource-right>
					<button class="cell" ng-if="ownerCanEditMessage(subject, message) === true" ng-click="editMessage(message)">
					    <i18n>forum.edit</i18n>
					</button>
                </div>
            </plus>
			<p bind-html="message.content"></p>
		</article>
		<article class="margin-two bubble" ng-if="message === editedMessage">
			<html-editor ng-model="editedMessage.content" required></html-editor>
			<div class="ten cell warning" ng-if="editedMessage.error !== undefined" translate content="[[editedMessage.error]]">
			</div>
			<button class="right-magnet" ng-click="saveEditMessage()"><i18n>edit</i18n></button>
			<input type="button" class="cancel right-magnet" i18n-value="cancel" ng-click="cancelEditMessage()" />
		</article>
	</div>
</div>

<resource-right name="contrib" resource="subject" ng-if="!editedMessage._id">
    <div class="row rigid-grid bubble-container">
        <div class="two cell" ng-click="viewAuthor(message)">
			<div class="image">
				<img ng-src="/userbook/avatar/[[me.userId]]" />
			</div>
		</div>
        <article class="margin-two bubble">
    		<html-inline-editor ng-model="editedMessage.content" watch-collections="['messages.all']" required></html-inline-editor>
    		<div class="ten cell warning" ng-if="editedMessage.error !== undefined" translate content="[[editedMessage.error]]">
    		</div>
            <div class="row"><commit_msg>[Ano] #4370 : Inline editor update & div overflow prevention.<commit_after><h1>
    <i class="forum"></i><a ng-click="openMainPage()"><i18n>forum.title</i18n></a>
    <side-panel class="cell">
    	<nav class="vertical">
            <ul>
                <li ng-repeat="cat in categories.all">
                    <h2><a ng-click="openCategory(cat)">[[cat.name]]</a></h2>
                    <ul class="sublist">
                        <li ng-repeat="subject in cat.subjects.all">
                            <a ng-click="openSubject(subject)">[[subject.title]]</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </nav>
    </side-panel>
</h1>
<h2><a ng-click="openCategory(subject.category)">[[subject.category.name]]</a> / [[subject.title]]</h2>
<a id="top" ng-click="scrollTo('bottom')" class="right-magnet">↓ <i18n><span class="no-style ng-scope">Voir le dernier message</span></i18n></a>

<div ng-repeat="message in messages.all | orderBy: 'created.$date'" class="bubble-container alternate-container">
	<div class="row vertical-spacing"></div>
	<div class="row rigid-grid">
		<div class="two cell centered-text" ng-click="viewAuthor(message)">
            <div>
                <strong>[[message.owner.displayName]]</strong>
            </div>
            <div>
                <em class="small-text">[[formatDateFromNow(message.created.$date)]]</em>
            </div>
			<div class="image">
				<img ng-src="/userbook/avatar/[[message.owner.userId]]" />
			</div>
		</div>
		<article class="margin-two bubble" ng-if="message !== editedMessage" ng-init="disableResizableElement = true">
            <plus class="contextual-buttons right-magnet" ng-if="subject.myRights.publish || ownerCanEditMessage(subject, message)">
                <div class="row">
                    <resource-right name="publish" resource="subject">
    					<button class="cell" ng-click="confirmRemoveMessage(message)"><i18n>forum.remove</i18n></button>
    				</resource-right>
					<!-- Moderators can edit all messages. Owner can edit his message only if the subject is not locked -->
					<resource-right class="cell" name="publish" resource="subject" >
						<button ng-click="editMessage(message)"><i18n>forum.edit</i18n></button>
					</resource-right>
					<button class="cell" ng-if="ownerCanEditMessage(subject, message)" ng-click="editMessage(message)">
					    <i18n>forum.edit</i18n>
					</button>
                </div>
            </plus>
			<p bind-html="message.content"></p>
		</article>
		<article class="margin-two bubble" ng-if="message === editedMessage" ng-init="disableResizableElement = false">
            <html-editor ng-model="editedMessage.content" resize-images="true" required></html-editor>
			<div class="ten cell warning" ng-if="editedMessage.error !== undefined" translate content="[[editedMessage.error]]">
			</div>
            <div class="row">
    			<button class="right-magnet" ng-click="saveEditMessage()"><i18n>edit</i18n></button>
    			<input type="button" class="cancel right-magnet" i18n-value="cancel" ng-click="cancelEditMessage()" />
            </div>
		</article>
	</div>
</div>

<resource-right name="contrib" resource="subject" ng-if="!editedMessage._id">
    <div class="row rigid-grid bubble-container">
        <div class="two cell centered-text" ng-click="viewAuthor(message)">
            <div>
                <strong>[[message.owner.displayName]]</strong>
            </div>
			<div class="image">
				<img ng-src="/userbook/avatar/[[me.userId]]" />
			</div>
		</div>
        <article class="margin-two bubble">
    		<html-editor ng-model="editedMessage.content" watch-collections="['messages.all']" inline-editor="true" resize-images="true" required></html-editor>
    		<div class="ten cell warning" ng-if="editedMessage.error !== undefined" translate content="[[editedMessage.error]]">
    		</div>
            <div class="row">
{'fraction_non_alphanumeric': 0.18550880494690147, 'fraction_numerical': 0.009141013577093696, 'mean_word_length': 2.8912133891213387, 'pattern_counts': {'":': 0, '<': 217, '<?xml version=': 0, '>': 217, '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': '3393380', 'n_tokens_mistral': 2492, 'n_tokens_neox': 2270, 'n_words': 409}