Exemplo 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']);
Exemplo n.º 2
0
?>

<h1><?php 
echo __('Content publish');
?>
</h1>
<hr />
<p><?php 
echo __('Are you sure to make this item public?');
?>
</p>
<?php 
$items = [];
foreach ($records as $record) {
    /** @var $record \Apps\ActiveRecord\Content */
    $items[] = [['text' => $record->id], ['text' => $record->getLocaled('title')], ['text' => Simplify::parseUserLink($record->author_id), 'html' => true], ['text' => Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR)]];
}
?>

<div class="table-responsive">
    <?php 
echo Table::display(['table' => ['class' => 'table table-bordered'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Title')], ['text' => __('Author')], ['text' => __('Date')]]], 'tbody' => ['items' => $items]]);
?>
</div>

<?php 
$form = new Form($model, ['class' => 'form-horizontal']);
echo $form->start();
?>

<?php 
Exemplo n.º 3
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 {
Exemplo n.º 4
0
<hr />
<?php 
$form = new Form($model, ['class' => 'form-horizontal', 'action' => '', 'method' => 'post']);
echo $form->start();
?>

<div class="row">
    <div class="col-md-3">
        <label class="pull-right"><?php 
echo $model->getLabel('name');
?>
</label>
    </div>
    <div class="col-md-9">
        <?php 
echo Simplify::parseUserLink($model->id);
?>
    </div>
</div>

<p><?php 
echo __('Are you sure to remove this user from your blacklist?');
?>
 <?php 
echo __('No any attentions will be displayed!');
?>
</p>

<div class="col-md-9 col-md-offset-3"><?php 
echo $form->submitButton(__('Remove'), ['class' => 'btn btn-danger']);
?>
Exemplo n.º 5
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>
Exemplo n.º 6
0
<?php 
if ($records === null || $records->count() < 1) {
    echo '<p class="alert alert-warning">' . __('Answers is not founded') . '</p>';
    return;
}
$items = [];
$moderateIsFound = false;
foreach ($records as $item) {
    $commentObject = $item->getCommentPost();
    $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75);
    $moderate = (bool) $item->moderate;
    if ($moderate) {
        $moderateIsFound = true;
    }
    $items[] = [1 => ['text' => $item->id], 2 => ['text' => ($moderate ? '<i class="fa fa-exclamation text-warning"></i> ' : null) . Url::link(['comments/read', $commentObject->id, null, ['#' => '#answer-' . $item->id]], $message), 'html' => true], 3 => ['text' => Simplify::parseUserLink((int) $item->user_id, $item->guest_name, 'user/update'), 'html' => true], 4 => ['text' => '<a href="' . App::$Alias->scriptUrl . $commentObject->pathway . '" target="_blank">' . Str::sub($commentObject->pathway, 0, 20) . '...</a>', 'html' => true], 5 => ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)], 6 => ['text' => Url::link(['comments/read', $commentObject->id], '<i class="fa fa-list fa-lg"></i>') . ' ' . Url::link(['comments/delete', 'answer', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), 'html' => true, 'property' => ['class' => 'text-center']], 'property' => ['class' => 'checkbox-row' . ($moderate !== false ? ' alert-warning' : null)]];
}
$moderateAccept = false;
if ($moderateIsFound) {
    $moderateAccept = ['type' => 'submit', 'class' => 'btn btn-warning', 'value' => __('Publish'), 'formaction' => Url::to('comments/publish', 'answer')];
}
?>

<div class="table-responsive">
<?php 
echo Table::display(['table' => ['class' => 'table table-bordered table-hover'], 'thead' => ['titles' => [['text' => '#'], ['text' => __('Answer')], ['text' => __('Author')], ['text' => __('Page')], ['text' => __('Date')], ['text' => __('Actions')]]], 'tbody' => ['items' => $items], 'selectableBox' => ['attachOrder' => 1, 'form' => ['method' => 'GET', 'class' => 'form-horizontal', 'action' => Url::to('comments/delete', 'answer')], 'selector' => ['type' => 'checkbox', 'name' => 'selected[]', 'class' => 'massSelectId'], 'buttons' => [['type' => 'submit', 'class' => 'btn btn-danger', 'value' => __('Delete selected'), 'formaction' => Url::to('comment/delete', 'answer')], $moderateAccept]]]);
?>
</div>

<div class="text-center">
    <?php 
Exemplo n.º 7
0
<h2><?php 
echo __('Comment answers');
?>
</h2>
<?php 
foreach ($answers->get() as $answer) {
    /** @var \Apps\ActiveRecord\CommentAnswer $answer */
    ?>
<div class="panel panel-default" id="answer-<?php 
    echo $answer->id;
    ?>
">
    <div class="panel-heading">
        <?php 
    $answerAuthor = Simplify::parseUserLink($answer->user_id, $answer->guest_name, 'user/update');
    ?>
        <?php 
    echo $answerAuthor . ', ' . Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR);
    ?>
        <div class="pull-right">
            <?php 
    if ((bool) $answer->moderate) {
        ?>
        		<?php 
        echo Url::link(['comments/publish', 'answer', $answer->id], __('Publish'), ['class' => 'label label-warning']);
        ?>
        	<?php 
    }
    ?>
            <?php 
Exemplo n.º 8
0
?>

<h1><?php 
echo __('Publish comments and answers');
?>
</h1>
<hr />
<?php 
echo __('Are you sure to moderate and make public this comments and answers?');
?>

<?php 
$items = [];
foreach ($records as $item) {
    $message = Str::sub(\App::$Security->strip_tags($item->message), 0, 50);
    $author = Simplify::parseUserLink($item->user_id, $item->guest_name, 'user/update');
    $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']);
echo $form->start();
?>
Exemplo n.º 9
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>