Example #1
0
 public function render($tpl = null)
 {
     $app = JFactory::getApplication();
     $this->type = $app->input->getCmd('type');
     $this->id = $app->input->getInt('id');
     $layout = $this->getLayout();
     $this->format = $app->input->get('format');
     $this->view = $app->input->get('view', 'default');
     switch ($this->type) {
         case 'event':
             $this->var = 'event_id';
             break;
     }
     //retrieve task list from model
     $model = new NoteModel();
     if ($layout == "edit") {
         $notes = $model->getNote($this->id);
     } else {
         $notes = $model->getNotes($this->id, $this->type, false);
     }
     $this->notes = $notes;
     $this->categories = NoteHelper::getCategories();
     //display
     echo parent::render();
 }
Example #2
0
 public function render()
 {
     $app = JFactory::getApplication();
     $type = $app->input->get('type');
     $id = $app->input->get('id');
     $view = $app->input->get('view');
     $document = JFactory::getDocument();
     $document->addScript(JURI::base() . 'src/Cobalt/media/js/cobalt-admin.js');
     //retrieve task list from model
     $model = new NoteModel();
     switch ($view) {
         case "companies":
             $view = "company";
             break;
         case "deals":
             $view = "deal";
             break;
         case "events":
             $view = "event";
             break;
     }
     $notes = $model->getNotes($id, $view, FALSE);
     $this->notes = $notes;
     $this->categories = NoteHelper::getCategories();
     //display
     return parent::render();
 }
Example #3
0
 public function render()
 {
     //app
     $this->app = JFactory::getApplication();
     //load reports menu bar
     $this->menu = TemplateHelper::loadReportMenu();
     //get document
     $this->document = JFactory::getDocument();
     //determine view layout
     $this->layout = $this->getLayout();
     $func = "_display_" . $this->layout;
     if (method_exists($this, $func)) {
         $this->{$func}();
     }
     //assign user filter priviliges
     $this->member_role = UsersHelper::getRole();
     $this->user_id = UsersHelper::getUserId();
     $this->team_id = UsersHelper::getTeamId();
     //if the user is not basic then they are able to filter through company/team/user data
     if ($this->member_role != 'basic') {
         //exec can see teams
         if ($this->member_role == 'exec') {
             $this->teams = UsersHelper::getTeams();
         }
         //manager and exec users
         $this->users = UsersHelper::getUsers();
     }
     //assign team names for drop downs
     $this->team_names = DropdownHelper::getTeamNames();
     //assign user names for drop downs
     $this->user_names = DropdownHelper::getUserNames();
     //assign categories for drop downs
     $this->categories = NoteHelper::getCategories();
     //display
     return parent::render();
 }
Example #4
0
 public function render()
 {
     $app = JFactory::getApplication();
     $this->categories = NoteHelper::getCategories();
     return parent::render();
 }