<commit_before><?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/9
 * Time: 15:25
 */
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use app\controllers\course\DiscussionController;
use app\models\account\User;
?>


<ul>
<?php foreach ($simplePosts as $simplePost):?>
    <?php $postId = ArrayHelper::getValue($simplePost,'postId');?>
    <!--li class="hasread/unread postManName_$postManName anoymous/canview simplePost" id="li_postId_$postId" onclick="showWholePost($postId)"-->
    <li class="<?=(ArrayHelper::getValue($simplePost,'isRead')?hasread:unread)?> postManName_<?=ArrayHelper::getValue($simplePost,'postManName')?> <?=((ArrayHelper::getValue($simplePost,'anoymous')==1)?anoymous:canview)?> simplePost hvr-wobble-vertical" id="li_postId_<?=ArrayHelper::getValue($simplePost,'postId')?>" style="min-height: 100px; max-height: 100px; overflow: hidden;" onclick="showWholePost(<?=$postId?>)">
        <div style="position: relative; cursor:pointer;">
            <hr size="5" color="#202020"/>

            <div class="metadata" style="position:absolute;right:10px;top:6px;">
                <div class="timestamp"><?=ArrayHelper::getValue($simplePost,'time')?></div>
            </div>

            <?php
            if(!ArrayHelper::getValue($simplePost,'isRead'))
                echo('<img id="unreadDot_'.$postId.'" src="/img/discussion/icon-unread-dot.png"  width="10" height="10" style="position:absolute;left:8px;top:40px;"></img>');
            ?>

            <?php if (ArrayHelper::getValue($simplePost, 'anoymous') == 1):?>
                <div class="content" style= "position:absolute;left:32px;top:5px;right:7px">
                        <div class="title ellipses">
                            <div class="title_text" style="max-width: 235px;"><b>[Anoymous]:<?= ArrayHelper::getValue($simplePost, 'title')?></b></div>
                        </div>
                        <div class="snippet"><?=ArrayHelper::getValue($simplePost, 'content')?></div>
                 </div>
            <?php else:?>
                 <div class="content" style= "position:absolute;left:32px;top:5px;right:7px">
                        <div class="title ellipses">
                            <div class="title_text" style="max-width: 235px;"><b>[<?=ArrayHelper::getValue($simplePost, 'postManName')?>]:<? ArrayHelper::getValue($simplePost, 'title')?></b></div>
                        </div>
                        <div class="snippet"><?=ArrayHelper::getValue($simplePost, 'content')?></div>
                 </div>
            <?php endif?>

         </div>
    </li>
<?php endforeach;?>
</ul><commit_msg>这次真的不改了<commit_after><?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/9
 * Time: 15:25
 */
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use app\controllers\course\DiscussionController;
use app\models\account\User;
?>


<ul>
<?php foreach ($simplePosts as $simplePost):?>
    <?php $postId = ArrayHelper::getValue($simplePost,'postId');?>
    <!--li class="hasread/unread postManName_$postManName anoymous/canview simplePost" id="li_postId_$postId" onclick="showWholePost($postId)"-->
    <li class="<?=(ArrayHelper::getValue($simplePost,'isRead')?hasread:unread)?> postManName_<?=ArrayHelper::getValue($simplePost,'postManName')?> <?=((ArrayHelper::getValue($simplePost,'anoymous')==1)?anoymous:canview)?> simplePost hvr-wobble-vertical" id="li_postId_<?=ArrayHelper::getValue($simplePost,'postId')?>" style="min-height: 100px; max-height: 100px; overflow: hidden;" onclick="showWholePost(<?=$postId?>)">
        <div style="position: relative; cursor:pointer;">
            <hr size="5" color="#202020"/>

            <div class="metadata" style="position:absolute;right:10px;top:6px;">
                <div class="timestamp"><?=ArrayHelper::getValue($simplePost,'time')?></div>
            </div>

            <?php
            if(!ArrayHelper::getValue($simplePost,'isRead'))
                echo('<img id="unreadDot_'.$postId.'" src="/img/discussion/icon-unread-dot.png"  width="10" height="10" style="position:absolute;left:8px;top:40px;"></img>');
            ?>

            <?php if (ArrayHelper::getValue($simplePost, 'anoymous') == 1):?>
                <div class="content" style= "position:absolute;left:32px;top:5px;right:7px">
                        <div class="title ellipses">
                            <div class="title_text" style="max-width: 235px;"><b>[Anoymous]:<?= ArrayHelper::getValue($simplePost, 'title')?></b></div>
                        </div>
                        <div class="snippet"><?=ArrayHelper::getValue($simplePost, 'content')?></div>
                 </div>
            <?php else:?>
                 <div class="content" style= "position:absolute;left:32px;top:5px;right:7px">
                        <div class="title ellipses">
                            <div class="title_text" style="max-width: 235px;"><b>[<?=ArrayHelper::getValue($simplePost, 'postManName')?>]:<?=ArrayHelper::getValue($simplePost, 'title')?></b></div>
                        </div>
                        <div class="snippet"><?=ArrayHelper::getValue($simplePost, 'content')?></div>
                 </div>
            <?php endif?>

         </div>
    </li>
<?php endforeach;?>
</ul>
{'fraction_non_alphanumeric': 0.19405528209011738, 'fraction_numerical': 0.018553578190079516, 'mean_word_length': 3.1729857819905214, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, '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': '2000644', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1594, 'n_words': 238}