Beispiel #1
0
 public function display()
 {
     $model = $this->getModel();
     $date = $model->getState()->date;
     switch ($this->getLayout()) {
         case 'month':
             $navigation = 'month';
             $days = $this->getService('com://admin/calendar.model.days')->year(date('Y', strtotime($date)))->month(date('m', strtotime($date)))->getList();
             break;
         default:
             $navigation = 'day';
             $days = $this->getService('com://admin/calendar.model.days')->year(date('Y', strtotime($date)))->getList();
     }
     $this->assign('days', $days);
     $this->assign('navigation', $navigation);
     $this->assign('today', date("Ymd"));
     return parent::display();
 }
Beispiel #2
0
 public function display()
 {
     $model = $this->getModel();
     $event = $model->getItem();
     $pathway = JFactory::getApplication()->getPathway();
     $pathway->addItem($this->escape($event->title), $this->createRoute('view=event&id=' . $event->id . '&slug=' . $event->slug));
     if ($event->id && $event->isAttachable()) {
         $this->assign('attachments', $event->getAttachments());
     }
     switch ($this->getLayout()) {
         case 'form':
             if (JFactory::getUser()->gid == 18) {
                 $editor_settings = array('theme_advanced_statusbar_location' => 'none', 'theme_advanced_buttons1' => 'bold,italic,strikethrough,underline,|,bullist,numlist,blockquote,|,link,unlink', 'theme_advanced_buttons2' => '', 'valid_elements' => 'a[href],b,blockquote,em,i,li,ol,p,span,strong,u,ul');
             } else {
                 $editor_settings = array();
             }
             $this->assign('editor_settings', $editor_settings);
             break;
     }
     return parent::display();
 }