Exemplo n.º 1
0
 function getSharingForm($id)
 {
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_job.php';
     $published = JobBoardJobHelper::jobPublished($id);
     $app = JFactory::getApplication();
     $catid = $app->getUserStateFromRequest('com_jobboard.list.selcat', 'selcat', 1);
     $view =& $this->getView('share', 'html');
     if ($published) {
         $job_model =& $this->getModel('Apply');
         $job_data = $job_model->getJobData($id);
         $messg_model =& $this->getModel('Message');
         $msg_id = $messg_model->getMsgID('sharejob');
         $msg = $messg_model->getMsg($msg_id);
         $config_model =& $this->getModel('Config');
         $config = $config_model->getShareConfig();
         $view->setModel($job_model, true);
         $view->assignRef('data', $job_data);
         $view->assignRef('config', $config);
         $view->assign('job_id', $id);
         $view->assign('msg', $msg->body);
     }
     $view->assign('selcat', $catid);
     $view->assign('published', $published);
     $view->display();
 }
Exemplo n.º 2
0
 function display($tpl = null)
 {
     $document =& JFactory::getDocument();
     $app = JFactory::getApplication();
     $this->config =& $this->get('JobConfig', 'Config');
     if ($this->published) {
         jimport('joomla.utilities.date');
         require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_job.php';
         $this->assign('post_date', JobBoardJobHelper::formatDate($this->data->post_date));
         $this->assign('setstate', JobBoardHelper::renderJobBoard());
         $extra_keywords = strlen($this->data->job_tags) > 1 ? ', ' . $this->data->job_tags : '';
         if ($this->config->use_location) {
             $job_location = $this->data->country_name != 'COM_JOBBOARD_DB_ANYWHERE_CNAME' ? ', ' . $this->data->city : ', ' . JText::_('WORK_FROM_ANYWHERE');
         } else {
             $job_location = '';
         }
         $ref_num = $this->data->ref_num != '' ? ' (' . JText::_('COM_JOBBOARD_ENT_REF') . ': ' . $this->data->ref_num . ')' : '';
         $params =& JComponentHelper::getParams('com_jobboard');
         $title_string = $this->data->job_title . $job_location . $ref_num;
         $menus =& JSite::getMenu();
         $menu = $menus->getActive();
         $uri =& JURI::getInstance();
         $this->uri = $uri->getScheme() . '://' . $uri->getHost() . $uri->getPath();
         if (is_object($menu) && isset($menu->query['view']) && $menu->query['view'] == 'job' && isset($menu->query['id']) && $menu->query['id'] == $item->id) {
             $menu_params = new JParameter($menu->params);
             if (!$menu_params->get('page_title')) {
                 $params->set('page_title', $title_string);
             }
         } else {
             $params->set('page_title', $title_string);
         }
         $document->setTitle($params->get('page_title'));
     } else {
         $document->setTitle(JText::_('COM_JOBBOARD_JOB_DISABLED'));
     }
     $this->rformat = JRequest::getVar('format', '');
     $this->user_entry_point = 'com_users';
     $retries = $app->getUserState('com_jobboard.member.retry', 0, 'int');
     $this->retries = $retries;
     if (version_compare(JVERSION, '2.5.0', 'ge') || version_compare(JVERSION, '1.7.0', 'ge') || version_compare(JVERSION, '1.6.0', 'ge')) {
         $this->user_entry_point = 'com_users';
     } elseif (version_compare(JVERSION, '1.5.0', 'ge')) {
         $this->user_entry_point = 'com_user';
     }
     $this->day_format = !version_compare(JVERSION, '1.6.0', 'ge') ? '%d' : 'd';
     $this->long_day_format = !version_compare(JVERSION, '1.6.0', 'ge') ? '%a' : 'D';
     $this->month_long_format = !version_compare(JVERSION, '1.6.0', 'ge') ? '%B' : 'F';
     $this->month_short_format = !version_compare(JVERSION, '1.6.0', 'ge') ? '%b' : 'M';
     $this->year_format = !version_compare(JVERSION, '1.6.0', 'ge') ? '%Y' : 'Y';
     $_format = JRequest::getString('tmpl', '');
     $this->is_modal = $_format == 'component' ? true : false;
     $this->itemid = JRequest::getInt('Itemid');
     $this->_addScripts($this->is_modal);
     parent::display($tpl);
 }
Exemplo n.º 3
0
 private function _getApplicationForm($id)
 {
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_job.php';
     $published = JobBoardJobHelper::jobPublished($id);
     $view =& $this->getView('apply', 'html');
     if ($published) {
         $app = JFactory::getApplication();
         $catid = $app->getUserStateFromRequest('com_jobboard.list.selcat', 'selcat', 1);
         $job_model =& $this->getModel('Apply');
         $job_data = $job_model->getJobData($id);
         $config_model =& $this->getModel('Config');
         //set the view parameters
         $view->setModel($job_model, true);
         $view->setModel($config_model);
         $view->assign('job_id', $id);
         $view->assign('selcat', $catid);
         $view->assignRef('data', $job_data);
     }
     $view->assign('id', $id);
     $view->assign('published', $published);
     $view->display();
 }
Exemplo n.º 4
0
 private function _getJob($id)
 {
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_job.php';
     $published = JobBoardJobHelper::jobPublished($id);
     $view =& $this->getView('job', 'html');
     $config_model =& $this->getModel('Config');
     $catid = JRequest::getInt('selcat');
     if ($published) {
         $app =& JFactory::getApplication();
         $user =& JFactory::getUser();
         $jobs =& JTable::getInstance('Job', 'Table');
         $jobs->hit($id);
         $job_model =& $this->getModel('Job');
         $user_model =& $this->getModel('User');
         $job_data = $job_model->getData($id);
         $list_deflt_layout = $config_model->getListcfg();
         $layout = $app->getUserStateFromRequest('com_jobboard.list.layout', 'layout', $list_deflt_layout);
         $view->setModel($job_model, true);
         //$view->setLayout($layout);
         $bid = 0;
         $has_applied = 0;
         if ($user->id > 0) {
             $bid = $user_model->hasBookmark($id, $user->id);
             $bid = $bid > 0 ? $bid : 0;
             $has_applied = $user_model->getJobApplicationStatus($user->id, $id) > 0 ? 1 : 0;
         }
         $view->assign('prev_applied', $has_applied);
         $view->assign('id', $id);
         $view->assign('bid', $bid);
         $view->assignRef('data', $job_data);
     }
     $view->setModel($config_model);
     $view->assign('published', $published);
     $view->assign('selcat', $catid);
     $view->display();
 }
Exemplo n.º 5
0
    }
    ?>
  <?php 
    if ($this->config->jobtype_coloring == 1) {
        ?>
      <?php 
        JHTML::_('stylesheet', 'job_colors.css', 'components/com_jobboard/css/');
        ?>
  <?php 
    }
    ?>
  <?php 
    if ($this->config->jobtype_coloring == 1) {
        ?>
  	<?php 
        $jt_color = '<span class="jobtype ' . JobBoardJobHelper::getClass($this->data->job_type) . '">' . JText::_($this->data->job_type) . '</span>';
        ?>
  <?php 
    } else {
        ?>
  	<?php 
        $jt_color = JText::_($this->data->job_type);
        ?>
  <?php 
    }
    ?>
  <!-- end job coloring -->

  <?php 
    $this->errors = JRequest::getVar('errors', '');
    ?>