index.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $searchModel app\models\EventlogSearch */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = Yii::t('app','EventLog ID');
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="eventlog-index">
  11. <!-- <h1><?= Html::encode($this->title) ?></h1> -->
  12. <?php //echo $this->render('_search', ['model' => $searchModel]); ?>
  13. <?= GridView::widget([
  14. 'dataProvider' => $dataProvider,
  15. 'filterModel' => $searchModel,
  16. 'columns' => [
  17. ['class' => 'yii\grid\SerialColumn'],
  18. //'id',
  19. 'ip',
  20. [
  21. 'attribute' => 'at_org',
  22. 'value' => 'user.at_org',
  23. ],
  24. [
  25. 'attribute' => 'name',
  26. 'value' => function($model)
  27. {
  28. return isset($model->lots->name) ? Html::a($model->lots->name, ['/auctions/view', 'id' => $model->auk_id]): '';
  29. },
  30. 'format' => 'raw',
  31. ],
  32. [
  33. 'attribute' => 'auk_id',
  34. 'value' => function($model)
  35. {
  36. if(empty($model->auk_id))
  37. {
  38. return false;
  39. }
  40. else
  41. {
  42. return Html::a(Yii::t('app','Download ID'),
  43. ['/eventlog/tradelog', 'id' => $model->auk_id, 'user_id' => $model->user_id],
  44. ['class' => 'glyphicon glyphicon-circle-arrow-down row1']);
  45. }
  46. },
  47. 'format' => 'raw',
  48. ],
  49. 'action',
  50. 'date',
  51. ['class' => 'yii\grid\ActionColumn'],
  52. ],
  53. ]); ?>
  54. </div>