Exemplo n.º 1
0
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use nitm\helpers\Icon;
/* @var $this yii\web\View */
/* @var $model nitm\models\Alerts */
if (!isset($notAsListItem)) {
    ?>
<li id="alert<?php 
    echo $model->getId();
    ?>
" class="<?php 
    echo \nitm\helpers\Statuses::getListIndicator($model->getPriority());
    ?>
">
<?php 
}
?>
<div class="row">
	<div class="col-md-3 col-lg-3">
		<?php 
echo $model->setting('actions.' . $model->action);
?>
	</div>
	<div class="col-md-2 col-lg-2">
		<?php 
echo "<b>" . $model->setting('allowed.' . $model->remote_type) . "</b>";
if (!is_null($model->remote_for) && $model->remote_for != 'any') {
    echo " for <b>" . $model->setting('for.' . $model->remote_for) . "</b>";
}
Exemplo n.º 2
0
<?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', '&times;', ['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);