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 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/List.php';
00026
00027
00028
00029
00040
00041 class FF_Action_List_Priority extends FF_Action_List {
00042
00043
00050 function renderAdditionalLinks()
00051 {
00052 $this->o_output->o_tpl->append('page_links', $this->o_output->link(
00053 FastFrame::selfURL(array('actionId' => ACTION_ADD)),
00054 sprintf(_('Add New %s'), $this->getSingularText())));
00055 }
00056
00057
00058
00059
00068 function getHighlightedRowUrl()
00069 {
00070 return FastFrame::selfURL(array('actionId' => ACTION_EDIT, 'objectId' => $this->o_model->getId()));
00071 }
00072
00073
00074
00075
00082 function getDefaultSortField()
00083 {
00084 return 'points';
00085 }
00086
00087
00088
00089
00096 function getFieldMap()
00097 {
00098 return array(
00099 array('description' => _('Options'), 'method' => 'getOptions'),
00100 array('field' => 'name', 'description' => _('Name'), 'method' => 'getName'),
00101 array('field' => 'points', 'description' => _('Points'), 'method' => 'getPoints'),
00102 array('field' => 'is_default', 'description' => _('Default'), 'method' => 'getIsDefault', 'args' => array(true)),
00103 array('description' => _('Alert Message'), 'method' => 'getAlertMessage'),
00104 );
00105 }
00106
00107
00108
00109
00116 function getSingularText()
00117 {
00118 return _('Priority');
00119 }
00120
00121
00122
00123
00130 function getPluralText()
00131 {
00132 return _('Priorities');
00133 }
00134
00135
00136
00137
00145 function getOptions()
00146 {
00147 $tmp_text = '';
00148 $tmp_text .= $this->o_output->link(
00149 FastFrame::selfURL(array(
00150 'actionId' => ACTION_EDIT, 'objectId' => $this->o_model->getId())),
00151 $this->o_output->imgTag('edit.gif', 'actions'),
00152 array('title' => sprintf (_('Edit %s'), $this->getSingularText())));
00153 $tmp_text .= ' ';
00154 $tmp_text .= $this->o_output->link(
00155 FastFrame::selfURL(array(
00156 'actionId' => ACTION_DELETE, 'objectId' => $this->o_model->getId())),
00157 $this->o_output->imgTag('delete.gif', 'actions'),
00158 array('title' => sprintf (_('Delete %s'), $this->getSingularText()),
00159 'confirm' => sprintf(_('Are you sure you want to delete this %s?'), $this->getSingularText())));
00160
00161 return $tmp_text;
00162 }
00163
00164
00165 }
00166 ?>