];
     $icon = '<span class="fa fa-plus fa-lg"> Reply Discusion</span>';
     $label = $icon . ' ' . $title;
     $url = Url::toRoute(['/widget/berita/join-comment','KD_BERITA'=>$model->KD_BERITA]);
     $content = Html::a($label,$url, $options);
     return $content;
 }

 if($model->STATUS == 0)
 {
   $btnreply = "";
 }else{
   $btnreply = berita_reply($model);
 } */
/* array commentar */
$query = Commentberita::find()->where(['KD_BERITA' => $model->KD_BERITA])->asArray()->all();
$body = [];
foreach ($query as $key => $value) {
    # code...
    $foto = $value['EMP_IMG'];
    if ($foto == '') {
        $profile = '/upload/hrd/Employee/default.jpg';
    } else {
        $profile = '/upload/hrd/Employee/' . $foto . '';
    }
    $body[] = ['body' => "<class='box-body'><class='direct-chat-info clearfix'><div class='direct-chat-text'>" . $value['CHAT'] . "</div></div></div>", 'img' => $profile, 'imgOptions' => ['width' => "64px", 'height' => "64px", 'class' => 'img-circle'], 'srcOptions' => ['style' => ['class' => 'direct-chat-img', 'background-color' => 'rgba(0, 95, 218, 0.3)', 'width' => "70px", 'height' => "70px", 'padding-top' => '3px', 'padding-left' => '3px']]];
}
$bodyHead = $this->render('_view_detailberita_headline', ['model' => $model]);
$viewBt = Html::mediaList([['heading' => "<div ><div class='direct-chat-text'>" . $model->JUDUL . "</div></div", 'body' => $bodyHead, 'imgOptions' => ['width' => "84px", 'height' => "84px", 'class' => 'img-circle'], 'srcOptions' => ['style' => ['background-color' => 'rgba(0, 95, 218, 0.3)', 'width' => "90px", 'height' => "90px", 'padding-top' => '3px', 'padding-left' => '3px']], 'img' => $foto_profile, 'items' => $body]]);
/* $viewBt1=Html::panel([
        'heading' => '<div></div>',
Esempio n. 2
0
    for ($a = 0; $a < 2; $a++) {
        $items1[] = ['src' => '/upload/barang/df.jpg', 'imageOptions' => ['width' => "150px"]];
    }
} else {
    foreach ($attach_file as $key => $value) {
        # code...
        $items1[] = ['src' => 'data:image/pdf;base64,' . $value['ATTACH64'], 'imageOptions' => ['width' => "120px", 'height' => "120px", 'class' => 'img-rounded']];
    }
}
# code...
$itemHeaderAttach = Gallery::widget(['id' => 'headergalery', 'items' => $items1, 'showControls' => true]);
?>

 <?php 
/* array commentar */
$query = Commentberita::find()->with('profile')->where(['KD_BERITA' => $model->KD_BERITA])->orderBy(['CREATED_AT' => SORT_DESC])->all();
//$body = [];
$body1 = [];
$x = 0;
foreach ($query as $key => $value) {
    $emp_ID = $value->profile->EMP_ID;
    //   $condition = ['and',
    //   // ['ID_USER'=>$emp_ID],
    //   ['KD_BERITA'=> $model->KD_BERITA],
    //   // ['TYPE'=> 0],
    //   // ['CREATED_AT'=> $value->CREATED_AT],
    // ];
    // $attach_image = BeritaImage::find()->where($condition)->All();
    $attach_image = BeritaImage::find()->where(['KD_BERITA' => $model->KD_BERITA, 'ID_USER' => $emp_ID])->All();
    if ($value->EMP_IMG == "default.jpg") {
        $profile = '/upload/hrd/Employee/default.jpg';