Example #1
0
 public function __construct($selectedType = null, $url = 'controlpanel.source.add')
 {
     parent::__construct();
     $this->selectedType = $selectedType;
     $this->url = $url;
     $this->setTemplate(null);
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     // Extending this class requires the user to be authenticated
     if (!ModelUser::isLoggedIn()) {
         $this->setMessage('This page can only be viewed when logged in', 'warning', 'main');
         redirect(url('user.login'), 301);
     }
     $this->currentUser = ModelUser::current(true);
     $this->getSite()->addWrappedCss('bootstrap.css');
     $this->getSite()->addWrappedCss('bootstrap-theme.css');
     $this->getSite()->addWrappedCss('starter-template.css');
     $this->getSite()->addWrappedJs('jquery.min.js');
     $this->getSite()->addWrappedJs('global.js');
     $this->sidemenu = new Menu();
     $this->sidemenu->addItem(lang('Sources'), url('controlpanel.source'));
     $this->sidemenu->addItem(lang('Invoices'), url('controlpanel.invoices'));
     $this->sidemenu->addItem(lang('Payment'), url('controlpanel.payment'));
     $this->sidemenu->addItem(lang('Account'), url('controlpanel.account'));
     //$this->sidemenu->addItem(lang('Statistics'), url('controlpanel.statistic'));
     $this->mainMenu->addItem(lang('Organisations'), url('controlpanel.organisations'));
     if ($this->currentUser->admin_level > 0) {
         $this->mainMenu->addItem(lang('Admin'), url('admin.home'));
     }
     $this->mainMenu->addItem(lang('Sign out'), url('user.signout'));
     $this->setTemplate('Controlpanel.php');
     $this->activeOrganisation = request()->organisation;
 }
Example #3
0
 public function __construct()
 {
     $this->enableDialogClose = true;
     parent::__construct();
     if ($this->isAjaxRequest || $this->isAjaxRequest()) {
         $this->setTemplate('Modal.php');
     }
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     // Extending this class requires the user to be authenticated
     if (!ModelUser::isLoggedIn()) {
         $this->setMessage('This page can only be viewed when logged in', 'warning', 'main');
         redirect(url('home'), 301);
     }
     $this->currentUser = ModelUser::current();
 }