コード例 #1
0
ファイル: Draw.php プロジェクト: rvadym/gmap
 function formatRow()
 {
     parent::formatRow();
     $v = $this->add('View', 'v' . $this->current_row['id'], 'content')->set($this->current_row['name']);
     $v->js('click', array($this->map->js()->rvadym_gmap()->polygonsArray(null), $this->map->js()->rvadym_gmap()->polygonsCoords(null), $this->map->js()->rvadym_gmap()->drawPolygons($this->current_row['draw'])));
     $this->current_row_html['name'] = $v->getHTML();
 }
コード例 #2
0
ファイル: Messages.php プロジェクト: atk4/messages
 function formatRow()
 {
     /* -------------------------------------
        |
        |   get additional data from DB
        |
        */
     // Get data about sender
     if ($from_model = $this->config->getTypeModelClassName($this->current_row['from_type'])) {
         $from = $this->add($from_model)->tryLoad($this->current_row['from_id']);
     } else {
         $from['name'] = Model_Message::getFromTypes($this->current_row['from_type']);
     }
     // get data about receiver
     if ($to_model = $this->config->getTypeModelClassName($this->current_row['to_type'])) {
         $to = $this->add($to_model)->tryLoad($this->current_row['to_id']);
     } else {
         $to['name'] = Model_Message::getToTypes($this->current_row['to_type']);
     }
     /* -------------------------------------
        |
        |           compile HTML
        |
        */
     $mixed_html = '';
     $message_model = $this->config->getMessageModelClassName();
     $mixed_html = $mixed_html . '<div class="' . $this->config->get('message-from-class') . '"><strong>From:</strong> ' . $from['name'] . ' (' . $message_model::getFromTypes($this->current_row['from_type']) . ') ' . ($this->current_row['from_is_deleted'] ? '*deleted*' : '') . '</div>';
     $mixed_html = $mixed_html . '<div class="' . $this->config->get('message-to-class') . '"><strong>To:</strong> ' . $to['name'] . ' (' . $message_model::getToTypes($this->current_row['to_type']) . ') ' . ($this->current_row['to_is_deleted'] ? '*deleted*' : '') . '</div>';
     $mixed_html = $mixed_html . '<div class="' . $this->config->get('message-text-class') . '">' . $this->current_row['text'] . '</div>';
     $this->current_row_html['message'] = $mixed_html;
     parent::formatRow();
 }
コード例 #3
0
ファイル: Grid.php プロジェクト: xepan/base
 function formatRow()
 {
     parent::formatRow();
     if ($this->owner instanceof \CRUD) {
         if (!$this->current_row_html['edit']) {
             if ($this->row_edit) {
                 $this->current_row_html['edit'] = '<a class="table-link pb_edit" href="#" data-id="' . $this->model->id . '"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-pencil fa-stack-1x fa-inverse"></i></span></a>';
             } else {
                 $this->current_row_html['edit'] = '<span class="fa-stack table-link"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-pencil fa-stack-1x fa-inverse"></i></span>';
             }
         }
         if (!$this->current_row_html['delete']) {
             if ($this->row_delete) {
                 $this->current_row_html['delete'] = '<a class="table-link danger do-delete" href="#" data-id="' . $this->model->id . '"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-trash-o fa-stack-1x fa-inverse"></i></span></a>';
             } else {
                 $this->current_row_html['delete'] = '<span class="table-link fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-trash-o fa-stack-1x fa-inverse"></i></span>';
             }
         }
     }
 }