Exemplo n.º 1
0
 public function deleteAction()
 {
     $id = $this->_request->getParam('id');
     $mdlShow = new Slideshow_Show();
     $mdlShow->deleteShow($id);
     $this->_forward('index', 'index');
 }
Exemplo n.º 2
0
 public function indexAction()
 {
     $showForm = new Show_Form();
     $showForm->removeElement('description');
     $showForm->setAction($this->baseUrl . '/mod_slideshow/show/create');
     $submit = $showForm->getElement('submit');
     $submit->setLabel($this->view->getTranslation('Create Slideshow'));
     $this->view->form = $showForm;
     $mdlSlideshow = new Slideshow_Show();
     $this->view->slideshows = $mdlSlideshow->getShows();
 }
Exemplo n.º 3
0
 /**
  *
  */
 public function selectSlideshow($name, $value)
 {
     $mdlShow = new Slideshow_Show();
     $shows = $mdlShow->getShows();
     if ($shows == null) {
         return $this->view->getTranslation('There are no slideshows to view!');
     } else {
         $options[] = $this->view->getTranslation('Select One');
         foreach ($shows as $show) {
             $options[$show->id] = $show->name;
         }
         $form = new Digitalus_Form();
         $select = $form->createElement('select', $name, array('multiOptions' => $options, 'belongsTo' => 'module'));
         return $select;
     }
 }
Exemplo n.º 4
0
 public function reorderAction()
 {
     $mdlShow = new Slideshow_Show();
     $mdlSlide = new Slideshow_Slide();
     if ($this->_request->isPost()) {
         //sort the slides
         $ids = Digitalus_Filter_Post::raw('id');
         $mdlSlide->sortSlides($ids);
         $show = Digitalus_Filter_Post::get('show');
         $url = '/mod_slideshow/show/edit/id/' . $show;
         $this->_redirect($url);
     } else {
         $show = $this->_request->getParam('show');
     }
     $this->view->slides = $mdlSlide->getSlides($show);
     $this->view->show = $mdlShow->find($show)->current();
 }