Esempio n. 1
0
<?php

use yii\helpers\Html;
use frontend\models\Meeting;
use kartik\switchinput\SwitchInput;
?>

<tr > 
  <td style >
        <?php 
echo Meeting::friendlyDateFromTimestamp($model->start);
?>
  </td>
  <td style>
      <?php 
foreach ($model->meetingTimeChoices as $mtc) {
    if ($mtc->user_id == $model->meeting->owner_id) {
        if ($mtc->status == $mtc::STATUS_YES) {
            $value = 1;
        } else {
            $value = 0;
        }
        echo SwitchInput::widget(['type' => SwitchInput::CHECKBOX, 'name' => 'meeting-time-choice', 'id' => 'mtc-' . $mtc->id, 'value' => $value, 'pluginOptions' => ['size' => 'mini', 'onText' => '<i class="glyphicon glyphicon-ok"></i>', 'offText' => '<i class="glyphicon glyphicon-remove"></i>', 'onColor' => 'success', 'offColor' => 'danger']]);
    }
}
?>
  </td>
  <td style>
    <?php 
foreach ($model->meetingTimeChoices as $mtc) {
    if (count($model->meeting->participants) == 0) {