Example #1
0
 /**
  * Default component view
  *
  * @return     void
  */
 public function displayTask()
 {
     // Set the page title
     $this->_buildTitle();
     // Set the pathway
     $this->_buildPathway();
     // Instantiate a new view
     $this->view->title = Lang::txt(strtoupper($this->_option));
     $this->view->database = $this->database;
     // Load the object
     $row = new Citation($this->database);
     $this->view->yearlystats = $row->getStats();
     // Get some stats
     $this->view->typestats = array();
     $ct = new Type($this->database);
     $types = $ct->getType();
     foreach ($types as $t) {
         $this->view->typestats[$t['type_title']] = $row->getCount(array('type' => $t['id'], 'scope' => 'hub'), false);
     }
     //are we allowing importing
     $this->view->allow_import = $this->config->get('citation_import', 1);
     $this->view->allow_bulk_import = $this->config->get('citation_bulk_import', 1);
     $this->view->isAdmin = false;
     if (User::authorise('core.manage', $this->_option)) {
         $this->view->isAdmin = true;
     }
     // Output HTML
     $this->view->messages = \Notify::messages('citations');
     $this->view->setLayout('display')->display();
 }
Example #2
0
 /**
  * Display stats for citations
  *
  * @return	void
  */
 public function statsTask()
 {
     // Load the object
     $row = new Citation($this->database);
     $this->view->stats = $row->getStats();
     // Output the HTML
     $this->view->display();
 }