Example #1
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data
     $this->months = $this->get('Months');
     $this->month_days = $this->get('MonthDays');
     $this->month_start = $this->get('MonthStart');
     $this->month_16 = $this->get('Month16');
     $this->hotels = $this->get('Hotels');
     $this->hotel = $this->get('Hotel');
     $this->inventory = $this->get('Inventory');
     $this->bookings_in_progress = $this->get('BookingsInProgress');
     // filters
     $this->state = $this->get('State');
     // default dates
     $app = JFactory::getApplication();
     $date_format = CHPanelHelper::getDateFormat(JText::_('COM_CHPANEL_LOCALE'));
     // start & end
     $this->start = $app->getUserStateFromRequest('com_chpanel.manage.start', 'start', JFactory::getDate()->format($date_format), 'string');
     $this->end = $app->getUserStateFromRequest('com_chpanel.manage.end', 'end', JFactory::getDate('+ 1 day')->format($date_format), 'string');
     // title
     $date = new JDate('01-' . $this->state->get('filter.month'));
     $this->title = $this->hotel ? $this->hotel->title . ' - ' . $date->format('F Y') : $date->format('F Y');
     // toolbar
     CHPanelHelper::getToolbar('manage');
     // sidebar
     $this->sidebar = JHtmlSidebar::render();
     // display the view layout
     parent::display($tpl);
 }
Example #2
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->item = $this->get('Item');
     $this->translation = $this->get('Translation');
     $this->language = CHPanelHelperLangs::getLangTitle(JRequest::getCmd('lang'));
     $this->params = JComponentHelper::getParams('com_chpanel');
     // create the toolbar
     CHPanelHelper::getToolbar(false, true, $this->item->title . ' (' . JText::sprintf('COM_CHPANEL_TRANSLATION_TITLE', $this->language) . ')');
     // display the view template
     parent::display($tpl);
 }
Example #3
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get model data
     $this->info = $this->get('Info');
     $this->banner = $this->get('Banner');
     $this->bookings = $this->get('Bookings');
     $this->checkins = $this->get('Checkins');
     // create the toolbar
     CHPanelHelper::getToolbar('panel');
     // sidebar
     $this->sidebar = JHtmlSidebar::render();
     // display the view layout
     parent::display($tpl);
 }
Example #4
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     // filters
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // toolbar and sidbar
     CHPanelHelper::getToolbar('images', $this->state->get('filter.state') == -2);
     $this->sidebar = JHtmlSidebar::render();
     // display the view template
     parent::display($tpl);
 }
Example #5
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // get the image
     $imageHelper = new CHPanelHelperImage(JComponentHelper::getParams('com_chpanel'));
     $this->image = $imageHelper->getImage($this->item->id, 'rooms');
     // get params
     $this->params = JComponentHelper::getParams('com_chpanel');
     // create the toolbar
     CHPanelHelper::getToolbar(false, $this->item->id, $this->item->title);
     // display the view template
     parent::display($tpl);
 }
Example #6
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // get params
     $this->params = JComponentHelper::getParams('com_chpanel');
     // get the image
     $imageHelper = new CHPanelHelperImage(JComponentHelper::getParams('com_chpanel'));
     $this->image = $imageHelper->getImage($this->item->id, 'hotels');
     // create the toolbar
     CHPanelHelper::getToolbar(false, $this->item->id, $this->item->title);
     // load com_hotel language (for categories titles)
     $lpath = JPATH_ROOT . '/components/com_hotel';
     JFactory::getLanguage()->load('com_hotel', $lpath, 'en-GB', true);
     JFactory::getLanguage()->load('com_hotel', $lpath, null, true);
     // display the view template
     parent::display($tpl);
 }
Example #7
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     // filters
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // start & end
     $app = JFactory::getApplication();
     $this->date = $app->getUserStateFromRequest('com_chpanel.bookings.date', 'date', '', 'string');
     $this->start = $app->getUserStateFromRequest('com_chpanel.bookings.start', 'start', '', 'string');
     $this->end = $app->getUserStateFromRequest('com_chpanel.bookings.end', 'end', '', 'string');
     // toolbar and sidbar
     CHPanelHelper::getToolbar('bookings', $this->state->get('filter.state') == -2);
     $this->sidebar = JHtmlSidebar::render();
     // display the view template
     parent::display($tpl);
 }
Example #8
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // get the data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     // filters
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // lists
     $this->lists = new stdClass();
     $this->lists->langs = CHPanelHelperLangs::getLangs();
     $this->lists->translations = CHPanelHelperLangs::getTranslations($this->items);
     // toolbar and sidbar
     if ($this->getLayout() !== 'modal') {
         CHPanelHelper::getToolbar('hotels', $this->state->get('filter.state') == -2);
         $this->sidebar = JHtmlSidebar::render();
     }
     // display the view layout
     parent::display($tpl);
 }