<commit_before>	<div class="col s9">
		<h3>Gestion des news</h3>
		<div class="row">
			<div class="col s12">
				<div class="row">
					<?php foreach($data['univers'] as $u)
					{
						?>
						<div class="col s6">
							<div class="card-panel">
								<span class="card-title black-text text-darken-4"><a href="#"><i class="material-icons right">add</i></a></span>
			      				<h5><?= $u['univers']->nom; ?></h5>
			      				<?php if(count($u['news']) == 0)
			      				{
			      					echo '<i>Aucune news pour cet univers</i>';
			      				}
			      				?>
			      				<ul>
			      				<?php foreach($u['news'] as $news_univers)
			      				{
			      					?>
			      						<li><a href="<?= URL . 'news/detail/' . $news_univers->id . '-' . $news_univers->slug; ?>"><?= $news_univers->nom; ?></li>
			      					<?php
			      				}
			      				?>
			      				</ul>
			   				</div>
			   			</div>
		   			<?php
					}
					?>
				</div>
			</div>
		</div>
	</div>
</div><commit_msg>Ajout du formulaire d'ajout d'une news avec le wysiwyg Juste coté front, pas le back + gestion suivant l'univers<commit_after><script src="//cdn.ckeditor.com/4.5.8/standard/ckeditor.js"></script>

<div class="col s9">
    <h3>Gestion des news</h3>
    <div class="row">
        <div class="col s12">
            <div class="row">
                <?php
                foreach ($data['univers'] as $key => $u) {
                    ?>
                    <div class="col s6">
                        <div class="card-panel">
                            <span class="card-title black-text text-darken-4"><a class="modal-trigger" href="#modal1"><i class="material-icons right">add</i></a></span>
                            <h5><?= $u['univers']->nom; ?></h5>
                            <?php
                            if (count($u['news']) == 0) {
                                echo '<i>Aucune news pour cet univers</i>';
                            }
                            ?>
                            <ul>
                                <?php
                                foreach ($u['news'] as $news_univers) {
                                    ?>
                                    <li><a href="<?= URL . 'news/detail/' . $news_univers->id . '-' . $news_univers->slug; ?>"><?= $news_univers->nom; ?></li>
                                    <?php
                                }
                                ?>
                            </ul>
                        </div>
                    </div>
                    <?php
                }
                ?>

                <!-- Modal Structure -->
                <div id="modal1" class="modal">
                    <div class="modal-content">
                        <h4>Ajouter une news</h4>
                        <form method="POST" action="#">
                            <label for="nom">Nom</label>
                            <input type="text" name="nom" id="nom" >

                            <input type="hidden" name="auteur" value="<?= $_SESSION['smvc_id'] ?>" >

                            <label for="univers">Univers</label>
                            <br /><br /> 

                            <label for="contenu">Contenu</label>
                            <textarea id="contenu" name="contenu" class="materialize-textarea"></textarea>


                            <div class="modal-footer">
                                <button type="submit" class="waves-effect waves-light btn modal-trigger">Ajouter</button> 
                            </div>
                        </form>
                    </div>
                </div>



            </div>
        </div>
    </div>
</div>
</div>
<script>
    $(document).ready(function () {
        $('.modal-trigger').leanModal();
    });

    CKEDITOR.replace('contenu');
</script>
{'fraction_non_alphanumeric': 0.16623309053069718, 'fraction_numerical': 0.007023933402705515, 'mean_word_length': 1.064983888292159, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 118, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5498697', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1091, 'n_words': 203}