| 1 |
<?php |
<?php |
| 2 |
// $Id: stormnote.admin.inc,v 1.4.4.3 2008/07/23 07:10:37 robertogerola Exp $ |
// $Id: stormnote.admin.inc,v 1.4.4.4 2008/07/23 19:37:49 robertogerola Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 46 |
|
|
| 47 |
$header = array( |
$header = array( |
| 48 |
array( |
array( |
| 49 |
'data' => t('Organization'), |
'data' => storm_t('Organization', 'note'), |
| 50 |
'field' => 'sno.organization_title', |
'field' => 'sno.organization_title', |
| 51 |
), |
), |
| 52 |
array( |
array( |
| 53 |
'data' => t('Project'), |
'data' => storm_t('Project', 'note'), |
| 54 |
'field' => 'sno.project_title', |
'field' => 'sno.project_title', |
| 55 |
), |
), |
| 56 |
array( |
array( |
| 57 |
'data' => t('Task'), |
'data' => storm_t('Task', 'note'), |
| 58 |
'field' => 'sno.task_title', |
'field' => 'sno.task_title', |
| 59 |
), |
), |
| 60 |
array( |
array( |
| 61 |
'data' => t('Title'), |
'data' => storm_t('Title', 'note'), |
| 62 |
'field' => 'n.title', |
'field' => 'n.title', |
| 63 |
), |
), |
| 64 |
array( |
array( |
| 115 |
|
|
| 116 |
$form['filter'] = array( |
$form['filter'] = array( |
| 117 |
'#type' => 'fieldset', |
'#type' => 'fieldset', |
| 118 |
'#title' => t('Filter'), |
'#title' => storm_t('Filter', 'note'), |
| 119 |
'#collapsible' => true, |
'#collapsible' => true, |
| 120 |
'#collapsed' => true, |
'#collapsed' => true, |
| 121 |
); |
); |
| 133 |
while ($organization = db_fetch_object($r)) { |
while ($organization = db_fetch_object($r)) { |
| 134 |
$organizations[$organization->nid] = $organization->title; |
$organizations[$organization->nid] = $organization->title; |
| 135 |
} |
} |
| 136 |
$organizations = array(0 => t('All')) + $organizations; |
$organizations = array(0 => storm_t('All', 'note')) + $organizations; |
| 137 |
$form['filter']['group1']['organization_nid'] = array( |
$form['filter']['group1']['organization_nid'] = array( |
| 138 |
'#type' => 'select', |
'#type' => 'select', |
| 139 |
'#title' => t('Organization'), |
'#title' => storm_t('Organization', 'note'), |
| 140 |
'#default_value' => $organization_nid, |
'#default_value' => $organization_nid, |
| 141 |
'#options' => $organizations, |
'#options' => $organizations, |
| 142 |
'#attributes' => array('onchange' => "stormtask_organization_project_tasks(this, 'edit-project-nid', 'edit-task-nid', true, 'All')"), |
'#attributes' => array('onchange' => "stormtask_organization_project_tasks(this, 'edit-project-nid', 'edit-task-nid', true, 'All')"), |
| 151 |
while ($project = db_fetch_object($r)) { |
while ($project = db_fetch_object($r)) { |
| 152 |
$projects[$project->nid] = $project->title; |
$projects[$project->nid] = $project->title; |
| 153 |
} |
} |
| 154 |
$projects = array(0 => t('All')) + $projects; |
$projects = array(0 => storm_t('All', 'note')) + $projects; |
| 155 |
$form['filter']['group1']['project_nid'] = array( |
$form['filter']['group1']['project_nid'] = array( |
| 156 |
'#type' => 'select', |
'#type' => 'select', |
| 157 |
'#title' => t('Project'), |
'#title' => storm_t('Project', 'note'), |
| 158 |
'#default_value' => $project_nid, |
'#default_value' => $project_nid, |
| 159 |
'#options' => $projects, |
'#options' => $projects, |
| 160 |
'#process' => array('storm_dependent_select_process'), |
'#process' => array('storm_dependent_select_process'), |
| 169 |
while ($task = db_fetch_object($r)) { |
while ($task = db_fetch_object($r)) { |
| 170 |
$tasks[$task->nid] = $task->title; |
$tasks[$task->nid] = $task->title; |
| 171 |
} |
} |
| 172 |
$tasks = array(0 => t('All')) + $tasks; |
$tasks = array(0 => storm_t('All', 'note')) + $tasks; |
| 173 |
$form['filter']['group1']['task_nid'] = array( |
$form['filter']['group1']['task_nid'] = array( |
| 174 |
'#type' => 'select', |
'#type' => 'select', |
| 175 |
'#title' => t('Task'), |
'#title' => storm_t('Task', 'note'), |
| 176 |
'#default_value' => $task_nid, |
'#default_value' => $task_nid, |
| 177 |
'#options' => $tasks, |
'#options' => $tasks, |
| 178 |
); |
); |
| 184 |
|
|
| 185 |
$form['filter']['group2']['title'] = array( |
$form['filter']['group2']['title'] = array( |
| 186 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 187 |
'#title' => t('Title'), |
'#title' => storm_t('Title', 'note'), |
| 188 |
'#default_value' => $title, |
'#default_value' => $title, |
| 189 |
); |
); |
| 190 |
|
|
| 195 |
|
|
| 196 |
$form['filter']['group3']['submit'] = array( |
$form['filter']['group3']['submit'] = array( |
| 197 |
'#type' => 'submit', |
'#type' => 'submit', |
| 198 |
'#value' => t('Filter'), |
'#value' => storm_t('Filter', 'note'), |
| 199 |
'#submit' => array('stormnote_list_filter_filter'), |
'#submit' => array('stormnote_list_filter_filter'), |
| 200 |
); |
); |
| 201 |
|
|
| 202 |
$form['filter']['group3']['reset'] = array( |
$form['filter']['group3']['reset'] = array( |
| 203 |
'#type' => 'submit', |
'#type' => 'submit', |
| 204 |
'#value' => t('Reset'), |
'#value' => storm_t('Reset', 'note'), |
| 205 |
'#submit' => array('stormnote_list_filter_reset'), |
'#submit' => array('stormnote_list_filter_reset'), |
| 206 |
); |
); |
| 207 |
|
|
| 208 |
$form['filter']['group3']['itemsperpage'] = array( |
$form['filter']['group3']['itemsperpage'] = array( |
| 209 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 210 |
'#title' => t('Items'), |
'#title' => storm_t('Items', 'note'), |
| 211 |
'#size' => 10, |
'#size' => 10, |
| 212 |
'#default_value' => $itemsperpage, |
'#default_value' => $itemsperpage, |
| 213 |
'#prefix' => '<div class="container-inline">', |
'#prefix' => '<div class="container-inline">', |