Esempio n. 1
0
 /**
  * (non-PHPdoc)
  * @see \Bootstrap\HtmlElement::getHtml()
  */
 public function getHtml()
 {
     if ($this->searchEnabled) {
         $search = '<form class="form-inline x-remote-search-form" role="form">' . '<div class="form-group">' . '<label class="sr-only" for="search">Search</label>' . '<input type="search" class="form-control input-sm animate-width" id="search" placeholder="Search" style="width:80px;">' . '<button type="reset" class="btn btn-xs btn-link">' . \Bootstrap::icon('remove-circle') . '</button>' . '</div>' . '</form>';
         $this->panel->addHeaderElement($search);
     }
     if ($this->collapsible !== null) {
         $this->panel->collapsible($this->collapsible);
     }
     $footer = '<div class="row">' . '<div class="col-md-6 x-remote-table-info"></div>' . '<div class="col-md-6 x-remote-table-pagination text-right"></div>' . '</div>';
     $this->panel->footer($footer);
     $this->table->data('url', $this->url === null ? $_SERVER['REQUEST_URI'] : $this->url);
     $this->table->data('page', $this->startPage);
     $this->table->data('limit', 10);
     $this->table->data('field', $this->sortField === null ? $this->table->getPrimaryKey() : $this->sortField);
     $this->table->data('dir', $this->sortDirection);
     $this->table->data('extra-params', base64_encode(Json::encode($this->extraParams)));
     $this->panel->content($this->table);
     return $this->panel->getHtml();
 }