1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- /**
- * @var $model \app\models\base\Comments
- */
- /*
- * <div class="comment-item" data-author="<?=$model->author?>" id="comment-<?=$model->id?>">
- <div class="message"><?=$model->message?></div>
- <div class="meta"><?=$model->getPublishedAt()?>, <?=$model->author?> <a class="answer" href="javascript:void(0)" onclick="answer(this)">Ответить</a></div>
- </div>
- */
- $md = $model->getHash();
- $GLOBALS['umd_'.$md] = isset( $GLOBALS['umd_'.$md] )?$GLOBALS['umd_'.$md]:0;
- $GLOBALS['umd_'.$md]++;
- $message = $model->message;
- $message = str_replace(['[[',']]',"\n","\r"],['<span>','</span>','<br>',''],$message);
- $message = str_replace("</span><br>",'</span>',$message);
- //var_dump($model->islike);
- ?>
- <a href="javascript:void(0)" class="link-B disabled" name="<?=$md?>_<?=$GLOBALS['umd_'.$md]?>" aria-disabled="true" disabled></a>
- <?
- $lavel = ($lavel > 4)?4:$lavel;
- for( $i = 0; $i < $lavel; $i++){
- ?>
- <div class="ml-4">
- <?}?>
- <div class="media-block user-block" id="comment-<?=$model->id?>" data-author="<?=$model->author?>" data-id="<?=$model->id?>" data-time="<?=$model->getPublishedAt(true)?>">
- <a class="media-left" href="#<?=$md?>_<?=$GLOBALS['umd_'.$md]+1?>"><img class="rounded-circle mr-3" alt="Avatar Picture" loading="lazy" src="<?=$model->getAvatar()?>"></a>
- <div class="media-body">
- <div class="mar-btm">
- <a href="#<?=$md?>_<?=$GLOBALS['umd_'.$md]+1?>" class="btn-link text-semibold media-heading box-inline"><?=$model->author?></a>
- <p class="text-muted text-sm"><svg class="icon icon-comments" width="12px" height="12px"><use xlink:href="/svg/symbol/sprite-clear.svg#clock"></use></svg> <?=$model->getPublishedAt(true)?></p>
- </div>
- <p><?=$message?></p>
- <div class="pad-ver">
- <span class="tag tag-sm"><svg class="icon icon-comments" width="14px" height="14px"><use xlink:href="/svg/symbol/sprite-clear.svg#yy"></use></svg> <span id="cnt_<?=$model->id?>"><?=$model->likeed?></span> Нравится</span>
- <div class="btn-group">
- <a class="btn btn-sm btn-outline-secondary btn-hover-secondary btnlike<?=$model->islike?' disabled':''?>" href="javascript:void(0)" onclick="clike(1,<?=$model->id?>,this)"<?=$model->islike?' disabled':''?>>
- <svg class="icon icon-comments" width="15px" height="15px"><use xlink:href="/svg/symbol/sprite-clear.svg#up"></use></svg>
- </a>
- <a class="btn btn-sm btn-outline-secondary btn-hover-secondary btnlike<?=$model->islike?' disabled':''?>" href="javascript:void(0)" onclick="clike(-1,<?=$model->id?>,this)"<?=$model->islike?' disabled':''?>>
- <svg class="icon icon-comments" width="15px" height="15px"><use xlink:href="/svg/symbol/sprite-clear.svg#down"></use></svg></a>
- </div>
- <a class="btn btn-sm btn-outline-secondary" href="javascript:void(0)" onclick="answer(this)">Ответить</a>
- </div>
- <hr>
- </div>
- </div>
- <?
- for( $i = 0; $i < $lavel; $i++){
- ?>
- </div>
- <?}?>
|