public function activityWidget(array $options = null) { return \nitm\widgets\activityIndicator\ActivityIndicator::widget($options); }
$uniqid = !isset($uniqid) ? uniqid() : $uniqid . $model->getId(); ?> <div id="message<?php echo $model->getId(); ?> " class="message <?php echo $model->hidden ? 'message-hidden' : ''; ?> <?php echo \nitm\helpers\Statuses::getIndicator($model->getStatus()); ?> "> <?php switch (isset($isNew) && $isNew === true || $model->isNew()) { case true: echo \nitm\widgets\activityIndicator\ActivityIndicator::widget(); break; } ?> <div id="message-avatar<?php echo $model->getId(); ?> " class="message-avatar"> <img id='messageAvatar<?php echo $model->getId(); ?> ' class="avatar-small" alt="<? $model->author()->username; ?>" src="<?php echo $model->author()->avatar(); ?> " /> </div>
<?php use yii\helpers\Html; use kartik\grid\GridView; use nitm\helpers\Icon; /** * @var yii\web\View $this * @var yii\data\ActiveDataProvider $dataProvider * @var frontend\models\search\Requests $searchModel */ $this->title = 'Requests'; $this->params['breadcrumbs'][] = $this->title; echo GridView::widget(['export' => false, 'pjax' => false, 'striped' => false, 'responsive' => true, 'floatHeader' => false, 'options' => ['id' => $isWhat], 'dataProvider' => $dataProvider, 'columns' => [['sortLinkOptions' => ['data-pjax' => 1], 'attribute' => 'id', 'format' => 'html', 'value' => function ($model) { $ret_val = ""; if ($model->hasNewActivity) { $ret_val .= \nitm\widgets\activityIndicator\ActivityIndicator::widget(); } $ret_val .= Html::tag('h1', $model->getId()); return $ret_val; }, 'contentOptions' => function ($model) { return ['rowspan' => 2, 'role' => 'voteIndicator' . $model->getId(), 'style' => "vertical-align: middle; background-color:rgba(255,51,0," . $model->voteModel()->rating()['ratio'] . ")"]; }], ['sortLinkOptions' => ['data-pjax' => 1], 'attribute' => 'rating', 'label' => '%', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return $this->context->voteWidget(['size' => 'large', 'model' => $model->voteModel(), 'parentType' => $model->isWhat(), 'parentId' => $model->getId()]); }, 'options' => ['rowspan' => 3]], ['sortLinkOptions' => ['data-pjax' => 1], 'format' => 'raw', 'attribute' => 'type_id', 'label' => 'Type', 'value' => function ($model) { return $model->url('type_id', [$model->typeOf(), 'name']); }], ['sortLinkOptions' => ['data-pjax' => 1], 'format' => 'raw', 'attribute' => 'request_for_id', 'label' => 'Request For', 'value' => function ($model) { return $model->url('request_for_id', [$model->requestFor(), 'name']); }], ['sortLinkOptions' => ['data-pjax' => 1], 'format' => 'raw', 'attribute' => 'status', 'label' => 'Urgency', 'value' => function ($model, $index, $widget) { return $model->url('status', $model->getUrgency()); }, 'contentOptions' => ['class' => 'visible-lg visible-md'], 'headerOptions' => ['class' => 'visible-lg visible-md']], ['sortLinkOptions' => ['data-pjax' => 1], 'attribute' => 'author_id', 'label' => 'Author', 'format' => 'raw', 'value' => function ($model, $index, $widget) { return $model->author()->url(\Yii::$app->getModule('nitm')->useFullnames, \Yii::$app->request->url, [$model->formname() . '[author]' => $model->author_id]);
<?php use yii\helpers\Html; use yii\widgets\ListView; use nitm\models\Notification; /* @var $this yii\web\View */ /* @var $searchModel nitm\models\search\Notification */ /* @var $dataProvider yii\data\ActiveDataProvider */ $itemOptions = ['id' => 'notification' . $model->getId(), 'class' => \nitm\helpers\Statuses::getListIndicator($model->getPriority())]; $activityIndicator = isset($isNew) && $isNew === true || $model->isNew() ? \nitm\widgets\activityIndicator\ActivityIndicator::widget() : ''; $closeButton = Html::button(Html::tag('span', '×', ['aria-hidden' => true]), ['class' => 'close', 'onclick' => '$.post("/alerts/mark-notification-read/' . $model->getId() . '", function () {$("#' . $itemOptions['id'] . '").remove()});', 'data-parent' => '#notification' . $model->getId()]); echo Html::tag('div', $activityIndicator . Html::tag('p', $model->message . $closeButton, ['class' => 'list-group-item-text', 'style' => 'white-space: normal']), $itemOptions);
protected function getNewIndicator() { $new = $this->model->hasNew(); switch ($new >= 1) { case true: $new = \nitm\widgets\activityIndicator\ActivityIndicator::widget(['type' => 'new', 'position' => 'top right', 'text' => Html::tag('span', $new . " new")]); break; default: $new = ''; break; } return $new; }
echo $model->closed_at; ?> </i> <?php } ?> </div> </div> <div class="col-md-4 col-lg-4 text-right"> <?php echo Html::a(Icon::forAction('close', 'closed', $model), \Yii::$app->urlManager->createUrl(['/issue/close/' . $model->id]), ['title' => Yii::t('yii', ($model->closed ? 'Open' : 'Close') . ' '), 'class' => 'fa-2x', 'role' => 'metaAction closeAction', 'data-parent' => 'tr', 'data-pjax' => '0']); echo Html::a(Icon::forAction('update', null, $model), \Yii::$app->urlManager->createUrl(['/issue/form/update/' . $model->id, Issues::COMMENT_PARAM => $enableComments, '__format' => 'html']), ['title' => Yii::t('yii', 'Edit '), 'class' => 'fa-2x' . ($model->closed ? ' hidden' : ''), 'role' => 'updateIssueTrigger disabledOnClose']); echo Html::a(Icon::forAction('resolve', 'resolved', $model), \Yii::$app->urlManager->createUrl(['/issue/resolve/' . $model->id]), ['title' => Yii::t('yii', ($model->resolved ? 'Unresolve' : 'Resolve') . ' '), 'class' => 'fa-2x' . ($model->closed ? ' hidden' : ''), 'role' => 'metaAction resolveAction disabledOnClose', 'data-parent' => 'tr', 'data-pjax' => '0']); echo Html::a(Icon::forAction('duplicate', 'duplicate', $model), \Yii::$app->urlManager->createUrl(['/issue/duplicate/' . $model->id]), ['title' => Yii::t('yii', ($model->duplicate ? 'Flag as not duplicate' : 'flag as duplicate') . ' '), 'class' => 'fa-2x', 'role' => 'metaAction duplicateAction']); if ($enableComments == true) { echo Html::a(Icon::forAction('comment', null, null, ['size' => '2x']) . ActivityIndicator::widget(['position' => 'top right', 'size' => 'small', 'text' => $repliesModel->count(), 'type' => 'info']), \Yii::$app->urlManager->createUrl(['/reply/index/' . $model->isWhat() . '/' . $model->getId(), '__format' => 'html']), ['id' => 'issue-comment-link' . $uniqid, 'title' => 'See comments for this issue', 'data-id' => '#issue-comments' . $uniqid, 'onclick' => '(function (event) {event.preventDefault(); $nitm.module("tools").visibility("#issue-comment-link' . $uniqid . '", true);})(event)']); } ?> </div> <?php if ($enableComments == true) { ?> <div class="col-lg-12 col-md-12"> <div class="clear" style="display:none;" id="issue-comments<?php echo $uniqid; ?> "> </div> </div> <?php }