Пример #1
0
 public $formProdukt;
 /** @var \Nette\Database\Table\ActiveRow|FALSE Prednastavene hodnoty pre formular */
 public $zobraz_produkt;
 /** @var \Nette\Database\Table\Selection|FALSE Produkty k danej polozke hlavneho menu */
 public $produkt_images_view;
 /** @var \Nette\Database\Table\Selection|FALSE Kategórie v ktorých je produkt */
 public $kategorie_produktu;
 /** @var \Nette\Database\Table\Selection|FALSE Kategórie produktov */
 public $kategorie;
 /** @var int  */
 public $id_hlavne_menu;
Пример #2
0
 /** Render pre zobrazenie clanku */
 public function renderDefault()
 {
     $this->template->komentare_povolene = $this->udaje_webu["komentare"] && ($this->user->isAllowed('Front:Clanky', 'komentar') && $this->zobraz_clanok->hlavne_menu->komentar) ? $this->zobraz_clanok->id_hlavne_menu : 0;
     $this->template->h2 = $this->trLang('h2') . $this->zobraz_clanok->nazov;
     $this->template->uroven = $this->zobraz_clanok->hlavne_menu->uroven + 2;
     $this->template->avatar = $this->zobraz_clanok->hlavne_menu->avatar;
     $this->template->clanok_view = $this->zobraz_clanok->id_clanok_lang == NULL ? FALSE : TRUE;
     $this->template->viac_info = "";
     //$this->trLang('viac_info');
     //Zisti, ci su k clanku priradene komponenty
     $this->template->komponenty = $this->clanok_komponenty->getKomponenty($this->zobraz_clanok->id_hlavne_menu, $this->nastavenie["komponenty"]);
 }
Пример #3
0
 public function komponentaUloz(Form $form)
 {
     $komponenta_spec_nazov = $form->getHttpData($form::DATA_TEXT, 'spec_nazov');
     $komponenta = $this->nastavenie["komponenty"][$komponenta_spec_nazov];
     $out = ['id_hlavne_menu' => $form->getHttpData($form::DATA_TEXT, 'id_hlavne_menu_clanku'), 'id_komponenty' => $komponenta['id'], 'spec_nazov' => $komponenta_spec_nazov, 'parametre' => ""];
     foreach ($komponenta['parametre'] as $k => $v) {
         $out["parametre"] .= $form->getHttpData($form::DATA_TEXT, $k) . ",";
     }
     $out["parametre"] = substr($out["parametre"], 0, strlen($out["parametre"]) - 1);
     $this->clanok_komponenty->pridaj($out);
     $this->flashRedirect("this", "Komponenta bola pridaná", "success");
 }