Ejemplo n.º 1
0
?>

<h1><?php 
echo __('Delete comments and answers');
?>
</h1>
<hr />
<?php 
echo __('Are you sure to delete this comments or answers?');
?>

<?php 
$items = [];
foreach ($records as $item) {
    $message = Str::sub(\App::$Security->strip_tags($item->message), 0, 50);
    $author = Simplify::parseUserNick($item->user_id, $item->guest_name);
    if ((int) $item->user_id > 0) {
        $author = Url::link(['user/update', (int) $item->user_id], $author);
    }
    $items[] = [['text' => $item->id], ['text' => $message], ['text' => $author, 'html' => true], ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)]];
}
?>
<div class="table-responsive">
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Message')], ['text' => __('Author')], ['text' => __('Date')]]], 'tbody' => ['items' => $items]]);
?>
</div>


<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']);
Ejemplo n.º 2
0
echo $form->finish();
?>

<h2><?php 
echo __('List of blocked users');
?>
</h2>
<hr />
<?php 
if ($records !== null && $records->count() > 0) {
    ?>
    <?php 
    $items = [];
    foreach ($records as $row) {
        $userProfile = $row->getUser()->getProfile();
        $userNick = \Ffcms\Core\Helper\Simplify::parseUserNick($userProfile->user_id, __('No name'));
        $items[] = [['text' => Url::link(['profile/show', $row->target_id], $userNick, ['target' => '_blank']), 'html' => true], ['text' => $row->comment], ['text' => Date::convertToDatetime($row->created_at, Date::FORMAT_TO_DAY)], ['text' => Url::link(['profile/unblock', $row->target_id], '<i class="fa fa-times"></i>'), 'html' => true, 'property' => ['class' => 'text-center']]];
    }
    ?>


    <?php 
    echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => __('User')], ['text' => __('Comment')], ['text' => __('Add date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items]]);
    ?>
    <div class="text-center">
        <?php 
    echo $pagination->display(['class' => 'pagination pagination-centered']);
    ?>
    </div>
<?php 
} else {
Ejemplo n.º 3
0
$this->breadcrumbs = [Url::to('main/index') => __('Main'), Url::to('widget/index') => __('Widgets'), Url::to('comments/index') => __('Comments'), __('View comment')];
?>

<?php 
echo $this->render('comments/_tabs');
?>

<h1><?php 
echo __('Read comment #%id%', ['id' => $record->id]);
?>
</h1>
<hr />
<div class="panel panel-info">
    <div class="panel-heading">
        <?php 
$author = Simplify::parseUserNick($record->user_id, $record->guest_name);
if ($record->user_id > 0) {
    $author = Url::link(['user/update', $record->user_id], $author);
}
?>
        <?php 
echo $author . ', ' . Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR);
?>
        <div class="pull-right">
        	<?php 
if ((bool) $record->moderate) {
    ?>
        		<?php 
    echo Url::link(['comments/publish', 'comment', $record->id], __('Publish'), ['class' => 'label label-warning']);
    ?>
        	<?php 
Ejemplo n.º 4
0
            <?php 
    \App::$Alias->addPlainCode('js', "\$('#" . $wall->getFormName() . "').on('change keyup keydown paste cut', 'textarea', function () { \$(this).height(0).height(this.scrollHeight);}).find('textarea').change();");
    ?>
        <?php 
}
?>
        <?php 
if ($wallRecords !== null) {
    foreach ($wallRecords as $post) {
        /** @var $referObject object */
        $referObject = \App::$User->identity($post->sender_id);
        if ($referObject === null) {
            // caster not founded? skip ...
            continue;
        }
        $referNickname = Simplify::parseUserNick($post->sender_id);
        ?>
                <div class="row object-lightborder" id="wall-post-<?php 
        echo $post->id;
        ?>
">
                    <div class="col-xs-4 col-md-2">
                        <div class="text-center"><img class="img-responsive img-rounded" alt="Avatar of <?php 
        echo $referNickname;
        ?>
"
                             src="<?php 
        echo $referObject->getProfile()->getAvatarUrl('small');
        ?>
" />
                        </div>
Ejemplo n.º 5
0
$this->title = __('Delete post');
$this->breadcrumbs = [Url::to('main/index') => __('Home'), Url::to('profile/index') => __('Users'), __('Delete post')];
?>
<h1><?php 
echo __('Delete wall post');
?>
</h1>
<hr />
<p><?php 
echo __('Are you sure to delete this post? No more attention will be displayed!');
?>
</p>
<?php 
/** @var $referObject object */
$referObject = \App::$User->identity($post->sender_id);
$referNickname = \Ffcms\Core\Helper\Simplify::parseUserNick($post->sender_id);
?>
<div class="row wall-post" id="wall-post-<?php 
echo $post->id;
?>
">
    <div class="col-md-2">
        <div class="text-center">
            <img class="img-responsive img-rounded" alt="Avatar of <?php 
echo $referNickname;
?>
" src="<?php 
echo $referObject->getProfile()->getAvatarUrl('small');
?>
" />
        </div>