Example #1
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     include JPATH_COMPONENT . '/helpers/toolbar.php';
     $isNew = $this->item->id == 0;
     $canDo = SolidresHelper::getActions('', $this->item->id);
     if ($isNew) {
         JToolBarHelper::title(JText::_('SR_ADD_NEW_EXTRA'), 'generic.png');
     } else {
         JToolBarHelper::title(JText::sprintf('SR_EDIT_EXTRA', $this->item->name), 'generic.png');
     }
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     JHtml::_('behavior.tooltip');
     //JHtml::_('behavior.formvalidation');
     SRHtml::_('jquery.validate');
     //echo SolidresHelperSideNavigation::getSideNavigation($this->getName());
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('extra.apply', 'JToolbar_Apply');
         JToolBarHelper::save('extra.save', 'JToolbar_Save');
         JToolBarHelper::addNew('extra.save2new', 'JToolbar_Save_and_new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('extra.save2copy', 'copy.png', 'copy_f2.png', 'JToolbar_Save_as_Copy', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('extra.cancel', 'JToolbar_Cancel');
     } else {
         JToolBarHelper::cancel('extra.cancel', 'JToolbar_Close');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.extra.edit', 'JTOOLBAR_HELP');
 }
Example #2
0
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     include JPATH_COMPONENT . '/helpers/toolbar.php';
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = SolidresHelper::getActions('', $this->item->id);
     if ($isNew) {
         JToolBarHelper::title(JText::_('SR_ADD_NEW_ROOM_TYPE'), 'generic.png');
     } else {
         JToolBarHelper::title(JText::sprintf('SR_EDIT_ROOM_TYPE', $this->item->name), 'generic.png');
     }
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     JHtml::_('behavior.tooltip');
     SRHtml::_('jquery.validate');
     // If not checked out, can save the item.
     if (!$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('roomtype.apply', 'JToolbar_Apply');
         JToolBarHelper::save('roomtype.save', 'JToolbar_Save');
         JToolBarHelper::addNew('roomtype.save2new', 'JToolbar_Save_and_new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('roomtype.save2copy', 'copy.png', 'copy_f2.png', 'JToolbar_Save_as_Copy', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('roomtype.cancel', 'JToolbar_Cancel');
     } else {
         JToolBarHelper::cancel('roomtype.cancel', 'JToolbar_Close');
     }
     SRToolBarHelper::mediaManager();
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.roomtype.edit', 'JTOOLBAR_HELP');
 }
Example #3
0
 function onAfterRoute()
 {
     JHtml::_('jquery.framework');
     if (class_exists('SRHtml')) {
         SRHtml::_('js.noconflict');
         SRHtml::_('jquery.ui');
         SRHtml::_('js.site');
         SRHtml::_('js.admin');
         SRHtml::_('jquery.cookie');
         SRHtml::_('jquery.validate');
     }
     if (JPluginHelper::isEnabled('solidres', 'statistics')) {
         define('SR_PLUGIN_STATISTICS_ENABLED', true);
         if (JFactory::getApplication()->isAdmin()) {
             $lang = JFactory::getLanguage();
             $lang->load('plg_solidres_statistics', JPATH_ADMINISTRATOR, null, 1);
             SRHtml::_('js.statistics');
         }
     } else {
         define('SR_PLUGIN_STATISTICS_ENABLED', false);
     }
     if (JPluginHelper::isEnabled('solidres', 'feedback')) {
         define('SR_PLUGIN_FEEDBACK_ENABLED', true);
     } else {
         define('SR_PLUGIN_FEEDBACK_ENABLED', false);
     }
     if (JPluginHelper::isEnabled('solidres', 'paypal_expresscheckout')) {
         define('SR_PLUGIN_PAYPAL_EXPRESSCHECKOUT_ENABLED', true);
     } else {
         define('SR_PLUGIN_PAYPAL_EXPRESSCHECKOUT_ENABLED', false);
     }
 }
Example #4
0
 /**
  * Writes a configuration button and invokes a cancel operation (eg a checkin).
  *
  * @param	string	$url	The url that open in a modal
  * @param	string	$text   The button text
  * @param	string	$class	The button class
  *
  * @return  void
  * @since	1.0
  */
 public static function mediaManager($url = 'index.php?option=com_solidres&view=medialist&tmpl=component', $text = 'SR_MEDIA_MANAGER', $class = 'sr-iframe btn btn-small')
 {
     $bar = JToolBar::getInstance('toolbar');
     SRHtml::_('jquery.colorbox');
     $html = '<a class="' . $class . '" href="' . JRoute::_($url) . '">';
     $html .= '<i class="icon-pictures"></i> ';
     $html .= JText::_($text);
     $html .= '</a>';
     $bar->appendButton('Custom', $html);
 }
Example #5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     include JPATH_COMPONENT . '/helpers/toolbar.php';
     JToolBarHelper::title(JText::_('SR_EDIT_RESERVATION'), 'generic.png');
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     JHtml::_('behavior.tooltip');
     SRHtml::_('jquery.validate');
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('reservation.cancel', 'JToolbar_Cancel');
     } else {
         JToolBarHelper::cancel('reservation.cancel', 'JToolbar_Close');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.reservation.edit', 'JTOOLBAR_HELP');
 }
Example #6
0
    function display($tpl = null)
    {
        $model = $this->getModel();
        $this->config = JComponentHelper::getParams('com_solidres');
        $this->defaultGallery = $this->config->get('default_gallery', 'simple_gallery');
        $this->showPoweredByLink = $this->config->get('show_solidres_copyright', '1');
        $this->item = $model->getItem();
        $this->checkin = $model->getState('checkin');
        $this->checkout = $model->getState('checkout');
        $this->adults = $model->getState('adults');
        $this->children = $model->getState('children');
        $this->countryId = $model->getState('country_id');
        $this->geoStateId = $model->getState('geo_state_id');
        $this->roomTypeObj = SRFactory::get('solidres.roomtype.roomtype');
        $this->numberOfNights = $this->roomTypeObj->calculateDateDiff($this->checkin, $this->checkout);
        $this->document = JFactory::getDocument();
        $this->context = 'com_solidres.reservation.process';
        $this->coupon = JFactory::getApplication()->getUserState($this->context . '.coupon');
        JHtml::_('jquery.framework');
        JHtml::_('bootstrap.framework');
        SRHtml::_('jquery.colorbox', 'show_map', '700px', '650px', 'true', 'false');
        JHtml::stylesheet('com_solidres/assets/main.css', false, true, false);
        $this->document->addScriptDeclaration('
			Solidres.jQuery(document).ready(function ($) {
				$(".sr-photo").colorbox({rel:"sr-photo", transition:"fade"});
				$("#sr-change-date").colorbox({inline: true, width:"500px", height: "350px"});
			});
		');
        JText::script('SR_CAN_NOT_REMOVE_COUPON');
        if (count($errors = $this->get('Errors'))) {
            JError::raiseError(500, implode("\n", $errors));
            return false;
        }
        $this->_prepareDocument();
        parent::display($tpl);
    }
Example #7
0
<?php

/*------------------------------------------------------------------------
  Solidres - Hotel booking extension for Joomla
  ------------------------------------------------------------------------
  @Author    Solidres Team
  @Website   http://www.solidres.com
  @Copyright Copyright (C) 2013 Solidres. All Rights Reserved.
  @License   GNU General Public License version 3, or later
------------------------------------------------------------------------*/
defined('_JEXEC') or die;
SRHtml::_('jquery.upload');
$comMediaUploadMaxFileSize = $this->comMediaParams->get('upload_maxsize', 10);
?>

<div id="uploader">You browser doesn't have Flash installed.</div>

<script type="text/javascript">
	Solidres.jQuery(function($) {
		$("#uploader").pluploadQueue({
			runtimes : 'html5,flash',
			url : '<?php 
echo JURI::root();
?>
administrator/index.php?option=com_solidres&task=media.upload&format=json',
			max_file_size : '<?php 
echo $comMediaUploadMaxFileSize;
?>
mb',
			unique_names : false,
			filters : [
Example #8
0
<?php

/*------------------------------------------------------------------------
  Solidres - Hotel booking extension for Joomla
  ------------------------------------------------------------------------
  @Author    Solidres Team
  @Website   http://www.solidres.com
  @Copyright Copyright (C) 2013 Solidres. All Rights Reserved.
  @License   GNU General Public License version 3, or later
------------------------------------------------------------------------*/
defined('_JEXEC') or die;
SRHtml::_('jquery.validate');
?>
<div id="solidres" class="row-fluid">
	<?php 
if ($this->reservation->room_types === false) {
    ?>
		<div>
			<?php 
    echo JText::_('SR_ROOM_QUANTITY_EXCEED_QUOTA');
    ?>
		</div>
	<?php 
} else {
    ?>
		<div id="reservation-form-holder" class="span12">
			<?php 
    echo $this->loadTemplate('room');
    ?>
			<?php 
    echo $this->loadTemplate('guest');
Example #9
0
/*------------------------------------------------------------------------
  Solidres - Hotel booking extension for Joomla
  ------------------------------------------------------------------------
  @Author    Solidres Team
  @Website   http://www.solidres.com
  @Copyright Copyright (C) 2013 Solidres. All Rights Reserved.
  @License   GNU General Public License version 3, or later
------------------------------------------------------------------------*/
defined('_JEXEC') or die;
$subTotal = $this->item->total_price_tax_excl . ' ' . $this->item->currency_code;
$tax = $this->item->total_price_tax_incl - $this->item->total_price_tax_excl . ' ' . $this->item->currency_code;
$totalExtraPrice = $this->item->total_extra_price;
$grandTotal = $this->item->total_price_tax_incl + $totalExtraPrice . ' ' . $this->item->currency_code;
$badges = array(0 => 'label-info', 1 => 'label-success', 2 => 'label-inverse', 3 => '', 4 => 'label-warning', -2 => 'label-important');
$statuses = array(0 => JText::_('SR_RESERVATION_STATE_PENDING_ARRIVAL'), 1 => JText::_('SR_RESERVATION_STATE_CHECKED_IN'), 2 => JText::_('SR_RESERVATION_STATE_CHECKED_OUT'), 3 => JText::_('SR_RESERVATION_STATE_CLOSED'), 4 => JText::_('SR_RESERVATION_STATE_CANCELED'), -2 => JText::_('JTRASHED'));
SRHtml::_('jquery.editable');
$script = ' Solidres.jQuery(function($) {
		$.fn.editable.defaults.mode = "inline";
		$( "#state" ).editable({
			url: "' . JRoute::_('index.php?option=com_solidres&task=reservation.save&format=json', false) . '",
			source: [
				{value: 0, text: "' . JText::_('SR_RESERVATION_STATE_PENDING_ARRIVAL') . '"},
				{value: 1, text: "' . JText::_('SR_RESERVATION_STATE_CHECKED_IN') . '"},
				{value: 2, text: "' . JText::_('SR_RESERVATION_STATE_CHECKED_OUT') . '"},
				{value: 3, text: "' . JText::_('SR_RESERVATION_STATE_CLOSED') . '"},
				{value: 4, text: "' . JText::_('SR_RESERVATION_STATE_CANCELED') . '"},
				{value: -2, text: "' . JText::_('JTRASHED') . '"}
			]
		});
	});';
JFactory::getDocument()->addScriptDeclaration($script);