JobDisplay.php

Go to the documentation of this file.
00001 <?php
00003 // {{{ license
00004 
00005 // +----------------------------------------------------------------------+
00006 // | FastFrame Application Framework                                      |
00007 // +----------------------------------------------------------------------+
00008 // | Copyright (c) 2002-2006 The Codejanitor Group                        |
00009 // +----------------------------------------------------------------------+
00010 // | This source file is subject to the GNU Lesser Public License (LGPL), |
00011 // | that is bundled with this package in the file LICENSE, and is        |
00012 // | available at through the world-wide-web at                           |
00013 // | http://www.fsf.org/copyleft/lesser.html                              |
00014 // | If you did not receive a copy of the LGPL and are unable to          |
00015 // | obtain it through the world-wide-web, you can get it by writing the  |
00016 // | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
00017 // | MA 02111-1307, USA.                                                  |
00018 // +----------------------------------------------------------------------+
00019 // | Authors: Jason Rust <jrust@codejanitor.com>                          |
00020 // | Authors: Greg Gilbert <ggilbert@codejanitor.com>                     |
00021 // +----------------------------------------------------------------------+
00022 
00023 // }}}
00024 // {{{ requires
00025 
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Display.php';
00027 
00028 // }}}
00029 // {{{ class FF_Action_Display_Job 
00030 
00041 // }}}
00042 class FF_Action_Display_Job extends FF_Action_Display {
00043     // {{{ renderDisplay()
00044 
00051     function renderDisplay()
00052     {
00053         require_once FASTFRAME_ROOT . '/lib/FastFrame/Output/Table.php';
00054         $o_table =& new FF_Output_Table('twoColumn');
00055         $o_table->setTableHeaderText($this->getPageName());
00056         $o_table->setTableHeaders($this->getTableData());
00057         $o_table->setAlternateRowColors(true);
00058         $o_table->render();
00059         $o_tableWidget =& $o_table->getWidgetObject();
00060         $this->o_output->o_tpl->append('content_middle', $o_tableWidget->fetch());
00061         $this->o_output->o_tpl->append('page_links', $this->o_output->link(
00062                     FastFrame::selfURL(array('actionId' => ACTION_LIST)),
00063                     sprintf(_('Return to %s List'), $this->getSingularText())));
00064     }
00065 
00066     // }}}
00067     // {{{ getTableData()
00068 
00075     function getTableData()
00076     {
00077         $a_headers = array();
00078         $a_headers[] = array(
00079             'title' => _('Job Title:'),
00080             'data' => $this->o_model->getTitle(),
00081         );
00082         $a_headers[] = array(
00083             'title' => _('Company:'),
00084             'data' => $this->o_model->getCompany(),
00085         );
00086         $a_headers[] = array(
00087             'title' => _('Location:'),
00088             'data' => $this->o_model->getLocation(),
00089         );
00090         $a_headers[] = array(
00091             'title' => _('URL:'),
00092             'data' => $this->o_output->link($this->o_model->getUrl(), $this->o_model->getUrl(), array('target' => '_blank')),
00093             'dataIsSafe' => true,
00094         );
00095         $a_headers[] = array(
00096             'title' => _('Date Posted to Website:'),
00097             'data' => $this->o_model->getFormattedOpeningDate(),
00098         );
00099         require_once 'HTML/BBCodeParser.php';
00100         $o_bbCodeParser =& new HTML_BBCodeParser(array('filters' => 'Basic,Email,Links'));
00101         $a_headers[] = array(
00102             'title' => _('Description:'),
00103             'data' => $o_bbCodeParser->qparse(nl2br(htmlspecialchars($this->o_model->getDescription()))),
00104             'dataIsSafe' => true,
00105         );
00106 
00107         return $a_headers;
00108     }
00109 
00110     // }}}
00111     // {{{ getSingularText()
00112 
00119     function getSingularText()
00120     {
00121         return _('Job');
00122     }
00123 
00124     // }}}
00125     // {{{ getPluralText()
00126 
00134     function getPluralText()
00135     {
00136         return _('Jobs');
00137     }
00138 
00139     // }}}
00140 }
00141 ?>

Generated on Fri Jun 23 11:38:16 2006 for FastFrame by  doxygen 1.4.4