Exemplo n.º 1
0
         <?php 
 echo $record->familyMember->name;
 ?>
     </td> 
     <?php 
 if ($response_required) {
     ?>
         <?php 
     if ($record->response == app\enum\TaskResponse::Sem_resposta && $record->familyMember->id == \Yii::$app->user->identity->family_member_id) {
         echo '<td colspan=2>';
         echo Html::a('Aceitar', null, ['href' => 'javascript:void(0);', 'id' => 'set-response-ok', 'class' => 'btn btn-success btn-sm btn-response', 'value' => $record->id]);
         echo Html::a('Recusar', null, ['href' => 'javascript:void(0);', 'id' => 'set-response-ko', 'class' => 'btn btn-danger btn-sm btn-response', 'value' => $record->id]);
         echo '</td>';
     } else {
         echo '<td>';
         echo app\enum\TaskResponse::toName($record->response);
         echo '</td>';
         echo '<td>';
         if ($record->response_date) {
             echo date('Y-m-d H:i', $record->response_date);
         }
         echo '</td>';
     }
     ?>
       
   
     <?php 
 }
 ?>
 </tr>            
 <?php 
Exemplo n.º 2
0
            <th>Data resposta</th>
        <?php 
}
?>
    </tr>
    <?php 
foreach ($modelMembers as $member) {
    ?>
        <?php 
    $response = "";
    $date = "";
    $checked = false;
    foreach ($modelAssigned as $assigned) {
        if ($assigned->member_id == $member->id) {
            $checked = true;
            $response = app\enum\TaskResponse::toName($assigned->response);
            if ($assigned->response_date) {
                $date = date('Y-m-d H:i', $assigned->response_date);
            }
        }
    }
    ?>
    
    
        <tr>
            <td>
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="Task[assigned_to][]" value="<?php 
    echo $member->id;
    ?>