Beispiel #1
0
 function render()
 {
     $app = JFactory::getApplication();
     $layout = $app->input->get('layout');
     //retrieve task list from model
     $profileModel = new LendrModelsProfile();
     $this->_modalMessage = LendrHelpersView::load('Profile', '_message', 'phtml');
     switch ($layout) {
         case "profile":
             $this->profile = $profileModel->getItem();
             $this->_addBookView = LendrHelpersView::load('Book', '_add', 'phtml');
             $this->_libraryView = LendrHelpersView::load('Library', '_library', 'phtml');
             $this->_libraryView->library = $this->profile->library;
             $this->_waitlistView = LendrHelpersView::load('Waitlist', '_waitlist', 'phtml');
             $this->_waitlistView->waitlist = $this->profile->waitlist;
             $this->_wishlistView = LendrHelpersView::load('Wishlist', '_wishlist', 'phtml');
             $this->_wishlistView->wishlist = $this->profile->wishlist;
             break;
         case "list":
         default:
             $this->profiles = $profileModel->listItems();
             $this->_profileListView = LendrHelpersView::load('Profile', '_entry', 'phtml');
             break;
     }
     //display
     return parent::render();
 }
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.1
  */
 public function render()
 {
     $this->options = $this->model->getOptions();
     // Get the config string from the session.
     $this->config = JFactory::getSession()->get('setup.config', null);
     return parent::render();
 }
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $accountForm = new DdcbalanceitModelsDdcaccount();
     $accountModel = new DdcbalanceitModelsDdcaccounts();
     $balanceModel = new DdcbalanceitModelsDdcbalances();
     $balanceForm = new DdcbalanceitModelsDdcbalance();
     $targbalForm = new DdcbalanceitModelsDdctarget();
     switch ($layout) {
         case "default":
         default:
             $this->item = $accountModel->getItem();
             $this->balances = $balanceModel->listItems();
             $this->form = $balanceForm->getForm();
             $this->formtb = $targbalForm->getForm();
             $this->balance = $balanceModel->getItem();
             break;
         case "add":
             $this->form = $accountForm->getForm();
             break;
         case "addbalance":
             $this->item = $accountModel->getItem();
             $this->form = $balanceForm->getForm();
             $this->balance = $balanceModel->getItem();
             break;
     }
     //display
     return parent::render();
 }
Beispiel #4
0
 function render()
 {
     $app = JFactory::getApplication();
     $layout = $this->getLayout();
     $this->params = JComponentHelper::getParams('com_lendr');
     //retrieve task list from model
     $model = new LendrModelsBook();
     if ($layout == 'list') {
         $this->books = $model->listItems();
         $this->_bookListView = LendrHelpersView::load('Book', '_entry', 'phtml');
     } else {
         $this->book = $model->getItem();
         $this->_addReviewView = LendrHelpersView::load('Review', '_add', 'phtml');
         $this->_addReviewView->book = $this->book;
         $this->_addReviewView->user = JFactory::getUser();
         $this->_lendBookView = LendrHelpersView::load('Book', '_lend', 'phtml');
         $this->_lendBookView->borrower = $this->book->waitlist_user;
         $this->_lendBookView->book = $this->book;
         $this->_returnBookView = LendrHelpersView::load('Book', '_return', 'phtml');
         $this->_returnBookView->borrower = $this->book->waitlist_user;
         $this->_returnBookView->book = $this->book;
         $this->_reviewsView = LendrHelpersView::load('Review', 'list', 'phtml');
         $this->_reviewsView->reviews = $this->book->reviews;
         $this->_modalMessage = LendrHelpersView::load('Profile', '_message', 'phtml');
     }
     //display
     return parent::render();
 }
Beispiel #5
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.1
  */
 public function render()
 {
     $this->items = new stdClass();
     $this->items->administrator = $this->model->getInstalledlangsAdministrator();
     $this->items->frontend = $this->model->getInstalledlangsFrontend();
     return parent::render();
 }
 /**
  * Tests the setPaths method.
  *
  * @return  void
  *
  * @covers  JViewHtml::setPaths
  * @since   12.1
  */
 public function testSetPaths()
 {
     $paths = new SplPriorityQueue();
     $paths->insert('bar', 99);
     $this->_instance->setPaths($paths);
     $this->assertAttributeSame($paths, 'paths', $this->_instance);
 }
Beispiel #7
0
 function render()
 {
     //retrieve list of libraries	 from model
     $libraryModel = new LendrModelsLibrary();
     $this->libraries = $libraryModel->listItems();
     //display
     return parent::render();
 }
Beispiel #8
0
 /**
  * Method to instantiate the view.
  *
  * @param   JModel            $model  The model object.
  * @param   SplPriorityQueue  $paths  The paths queue.
  *
  * @since   3.2
  */
 public function __construct(JModel $model, SplPriorityQueue $paths = null)
 {
     $app = JFactory::getApplication();
     $component = JApplicationHelper::getComponentName();
     $component = preg_replace('/[^A-Z0-9_\\.-]/i', '', $component);
     if (isset($paths)) {
         $paths->insert(JPATH_THEMES . '/' . $app->getTemplate() . '/html/' . $component . '/' . $this->getName(), 2);
     }
     parent::__construct($model, $paths);
 }
Beispiel #9
0
 function render()
 {
     $app = JFactory::getApplication();
     //retrieve task list from model
     $model = new LendrModelsStatistics();
     $this->stats = $model->getStats();
     $this->addToolbar();
     //display
     return parent::render();
 }
Beispiel #10
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @throws  RuntimeException
  */
 public function render()
 {
     $comments = $this->model->getAll();
     foreach ($comments as $key => $comment) {
         $date = new JDate($comment['date']);
         $comments[$key]['date'] = $date->format('d.m.Y', true);
     }
     $this->comments = $comments;
     return parent::render();
 }
Beispiel #11
0
 function render()
 {
     $app = JFactory::getApplication();
     $type = $app->input->get('type');
     $id = $app->input->get('id');
     $view = $app->input->get('view');
     //retrieve task list from model
     $model = new LendrModelsBook();
     $this->book = $model->getBook($id, $view, FALSE);
     //display
     return parent::render();
 }
Beispiel #12
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $profileModel = new DdcbalanceitModelsDdcprofile();
     switch ($layout) {
         case "default":
         default:
             $this->item = $profileModel->getItem();
             break;
     }
     //display
     return parent::render();
 }
Beispiel #13
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     switch ($layout) {
         case "default":
         default:
             $this->addToolbar();
             DdcbalanceitHelpersDdcbalanceit::addSubmenu('dashboard');
             break;
     }
     //display
     return parent::render();
 }
Beispiel #14
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $ddcaccountsModel = new DdcbalanceitModelsDdcaccounts();
     $ddcgoalsModel = new DdcbalanceitModelsDdcgoals();
     switch ($layout) {
         case "default":
         default:
             $this->items = $ddcaccountsModel->listItems();
             $this->goals = $ddcgoalsModel->listItems();
             break;
     }
     //display
     return parent::render();
 }
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.1
  */
 public function render()
 {
     $this->options = $this->model->getOptions();
     /*
      * Prepare the tasks array
      * Note: The first character of the task *MUST* be capitalised or the application will not find the task
      */
     $this->tasks[] = $this->options['db_old'] == 'remove' ? 'Database_remove' : 'Database_backup';
     $this->tasks[] = 'Database';
     if ($this->options['sample_file']) {
         $this->tasks[] = 'Sample';
     }
     $this->tasks[] = 'Config';
     if ($this->options['summary_email']) {
         $this->tasks[] = 'Email';
     }
     return parent::render();
 }
Beispiel #16
0
 function render()
 {
     require_once JPATH_SITE . '/components/com_users/models/profile.php';
     $app = JFactory::getApplication();
     $layout = $this->getLayout();
     //retrieve task list from model
     $profileModel = new DdcpssModelsProfile();
     $userexpModel = new DdcpssModelsUserexperience();
     $usermemModel = new DdcpssModelsUsermembership();
     $usereduModel = new DdcpssModelsUsereducation();
     $usercraModel = new DdcpssModelsUsercra();
     $userimageModel = new DdcpssModelsUserimages();
     $referencesModel = new DdcpssModelsReferences();
     $modelReference = new DdcpssModelsReference();
     $profModel = new UsersModelProfile();
     $helper = new DdcpssHelpersView();
     switch ($layout) {
         case "profiles":
         default:
             $this->params = JComponentHelper::getParams('com_users');
             $this->profile = $profileModel->getItem();
             $this->usercra = $usercraModel->getItem();
             $this->references = $referencesModel->listItems();
             $this->userschools = $usereduModel->listItems();
             $this->userexperiences = $userexpModel->listItems();
             $this->usermemberships = $usermemModel->listItems();
             $this->_refListView = $helper->load('Profiles', '_reference', 'phtml');
             $this->_uexpListView = $helper->load('Profiles', '_uexp', 'phtml');
             $this->_umembershipListView = $helper->load('Profiles', '_usermembership', 'phtml');
             $this->_ueduListView = $helper->load('Profiles', '_uedu', 'phtml');
             $this->fm = $profModel->getForm();
             $this->form = $modelReference->getForm();
             break;
         case "documents":
             $this->profile = $profileModel->getItem();
             $this->images = $userimageModel->listItems();
             break;
     }
     //display
     return parent::render();
 }
Beispiel #17
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $accounttypesModel = new DdcbalanceitModelsDDcaccounttypes();
     $atFormModel = new DdcbalanceitModelsDdcaccounttype();
     switch ($layout) {
         case "default":
         default:
             $this->items = $accounttypesModel->listItems();
             $this->addToolbar();
             DdcbalanceitHelpersDdcbalanceit::addSubmenu('ddcaccounttypes');
             break;
         case "edit":
             $this->form = $atFormModel->getForm();
             $this->item = $accounttypesModel->getItem();
             $this->addUpdToolBar();
             break;
     }
     //display
     return parent::render();
 }
Beispiel #18
0
 function render()
 {
     $app = JFactory::getApplication();
     $layout = $this->getLayout();
     //retrieve task list from model
     $profileModel = new DdcpssModelsProfile();
     $userexpModel = new DdcpssModelsUserexperience();
     $usereduModel = new DdcpssModelsUsereducation();
     $usercraModel = new DdcpssModelsUsercra();
     switch ($layout) {
         case "default":
         default:
             $this->profile = $profileModel->getItem();
             $this->items = $usercraModel->listItems();
             $this->addToolbar();
             // Set the submenu
             DdcpssHelpersDdcpss::addSubmenu('usercra');
             break;
     }
     //display
     return parent::render();
 }
Beispiel #19
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   12.1
  * @throws  RuntimeException
  */
 public function render()
 {
     $path = APP_PATH_DATA . '/log.php';
     $this->log = file_exists($path) ? file_get_contents($path) : 'No log file found.';
     return parent::render();
 }
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.1
  */
 public function render()
 {
     $this->form = $this->model->getForm();
     return parent::render();
 }
Beispiel #21
0
 public function render()
 {
     return parent::render();
 }
Beispiel #22
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   3.1
  */
 public function render()
 {
     $this->items = $this->model->getItems();
     return parent::render();
 }
Beispiel #23
0
 public function __construct(JModel $model, SplPriorityQueue $paths = NULL)
 {
     parent::__construct($model, $paths);
     $this->paths->insert(__DIR__ . '/tmpl', 'normal');
 }
Beispiel #24
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   12.1
  * @throws  RuntimeException
  */
 public function render()
 {
     $this->data = $this->model->getData();
     return parent::render();
 }
Beispiel #25
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @throws  RuntimeException
  */
 public function render()
 {
     if ($this->model && !$this->pagination) {
         // Pagination
         $this->pagination = $this->model->getPagination();
         // Ordering
         $this->listOrder = $this->escape($this->model->getState()->get('list.' . $this->prefix . '.ordering'));
         $this->listDir = $this->escape($this->model->getState()->get('list.' . $this->prefix . '.direction'));
     }
     // Page title
     $app = JFactory::getApplication();
     if ($app instanceof JApplicationSite) {
         $active = $app->getMenu()->getActive();
         $title = '';
         if ($active) {
             $title = $this->params->get('page_title', '');
             $uri = JUri::getInstance();
             // Check if the menu determines this view.
             foreach ($active->query as $key => $value) {
                 if (substr($uri->getVar($key), 0, 7) != 'filter_' && $uri->getVar($key) !== $value) {
                     $title = $this->defaultTitle;
                 }
             }
         }
         if (!$title) {
             $title = $this->defaultTitle;
         }
         if ($title) {
             if ($app->get('sitename_pagetitles', 0) == 1) {
                 $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
             } elseif ($app->get('sitename_pagetitles', 0) == 2) {
                 $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
             }
             $app->getDocument()->setTitle($title);
         }
     }
     return parent::render();
 }
Beispiel #26
0
 /**
  * Method to render the view
  *
  * @return  string  The rendered view.
  *
  * @since   1.0.0
  */
 public function render()
 {
     $this->setLayout($this->name);
     return parent::render();
 }
Beispiel #27
0
 public function __construct(JModel $model, SplPriorityQueue $paths = NULL)
 {
     parent::__construct($model, $paths);
 }