00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Display.php';
00027
00028
00029
00030
00041
00042 class FF_Action_Display_Job extends FF_Action_Display {
00043
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
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
00112
00119 function getSingularText()
00120 {
00121 return _('Job');
00122 }
00123
00124
00125
00126
00134 function getPluralText()
00135 {
00136 return _('Jobs');
00137 }
00138
00139
00140 }
00141 ?>