public function renderDetailNemovitosti($id = null)
 {
     $this->template->nemovitost = $this->database->findById('nemovitost', $id);
     if (!$this->template->nemovitost) {
         $this->flashMessage('Tato nemovitost neexistuje. Je možné, že ji někdo smazal.');
         $this->redirect('Homepage:default');
     }
     // vyberu fotky k dane nemovitosti
     $this->template->fotky = $this->database->findall('photo')->where('id_property', $id)->order("order DESC");
     // jako hlavni fotku vemu prvni z vyberu
     $this->template->hlavni_fotka = $this->template->fotky->fetch();
     // vyberu soubory k dane nemovitosti
     $this->template->files = $this->database->findall('file')->where('id_property', $id);
     // resim aukci
     $prihozy = $this->database->findAll('drazba')->where('id_nemovitost', $id);
     $this->template->drazba = $this->drazba->vyhodnotDrazbu($id, $prihozy);
     $this->template->status = $this->drazba->vratStatus();
 }