示例#1
0
 /**
  * factory to detail grid control
  * @param string $name
  * @return \Ublaboo\DataGrid\DataGrid
  */
 public function createComponentDetailGrid($name)
 {
     $datasource = $this->model->getQuery()->setDestination($this->remoteAet)->series($this->studyInstanceUid)->setRequestedFields($this->seriesTableRows);
     $grid = new \Ublaboo\DataGrid\DataGrid($this, $name);
     try {
         $datasource->checkDestination();
     } catch (DicomNetworkException $exc) {
         $this->flashMessage($exc->getMessage(), "danger");
         $this->redirect("default");
     }
     // setting datasource
     $grid->setPrimaryKey('SeriesInstanceUID');
     $grid->setDataSource($datasource);
     $grid->addColumnText("SeriesNumber", _("Series number"));
     $grid->addColumnText("SeriesDescription", _("Series description"));
     $grid->addAction('retrieveSeries!', _('Retrieve'))->setDataAttribute("toggle", "modal")->setDataAttribute("target", "#retrieveModal")->setIcon('download');
     return $grid;
 }