public function view()
 {
     if ($this->Auth->user() && ($this->Auth->user('group_id') == '2' || $this->Auth->user('id') == '2578')) {
         $this->objectOptions['buttons'][] = 'careIt';
     }
     parent::view();
 }
 public function view()
 {
     parent::view();
     $this->redirect('/dane/gminy/' . $this->object->getData('gmina_id') . '/radni/' . $this->object->getId());
     $this->API->searchDataset('rady_gmin_wystapienia', array('limit' => 12, 'conditions' => array('radny_id' => $this->object->getId())));
     $this->set('wystapienia', $this->API->getObjects());
 }
 public function view()
 {
     parent::view();
     $id = Sanitize::paranoid($this->params->id);
     $id = (int) $id;
     $content = file_get_contents('http://resources.sejmometr.pl/sejm_komunikaty/content/' . $id . '.html');
     $this->set('content', $content);
 }
 public function view()
 {
     parent::view();
     $powiazania = $this->object->getLayer('powiazania');
     if (isset($powiazania['posel_id']) && $powiazania['posel_id']) {
         return $this->redirect('/dane/poslowie/' . $powiazania['posel_id'] . '/finanse');
     }
 }
 public function linie()
 {
     $this->addInitLayers(array('linie'));
     parent::view();
     $ids = array();
     foreach ($this->object->layers['linie'] as $linia) {
         array_push($ids, $linia['a']['id']);
     }
     $this->innerSearch('kolej_linie', array('object_id' => $ids));
 }
 public function view()
 {
     if (@$this->request->params['ext'] == 'json') {
         $this->addInitLayers('html');
         parent::view();
         $this->set('data', $this->object->getData());
         $this->set('layers', array('html' => $this->object->getLayer('html')));
         $this->set('_serialize', array('data', 'layers'));
     } else {
         $this->load();
         return $this->redirect($this->object->getUrl());
     }
 }
 public function view()
 {
     parent::view();
     $this->redirect($this->object->getUrl());
 }
 public function view()
 {
     parent::view();
     $this->redirect('/dane/gminy/903/jednostki/' . $this->object->getId());
 }
 public function view()
 {
     parent::view();
     $this->redirect('/dane/sejm_glosowania/' . $this->object->getData('sejm_glosowania.id'));
 }
 public function wyjazdy()
 {
     $this->addInitLayers(array('wyjazdy'));
     parent::view();
     $this->set('title_for_layout', "Wyjazdy zagraniczne " . $this->object->getData('dopelniacz'));
 }
 public function view()
 {
     parent::view();
     $this->redirect('/dane/gminy/' . $this->object->getData('gmina_id') . '/okregi_wyborcze/' . $this->object->getId());
 }
 public function view()
 {
     parent::view();
     return $this->redirect('/dane/gminy/' . $this->object->getData('gminy.id') . '/dzielnice/' . $this->object->getId());
 }
 public function view()
 {
     parent::view();
 }
 public function view()
 {
     parent::view();
     $this->redirect('/dane/gminy/903/oswiadczenia/' . $this->object->getId());
 }
 public function view()
 {
     parent::view();
     $this->redirect('/dane/gminy/' . $this->object->getData('gmina_id') . '/miejscowosci/' . $this->object->getId());
 }