| 1 |
<?php |
<?php |
| 2 |
// $Id: stormnote.module,v 1.6.4.8 2008/08/03 17:55:11 robertogerola Exp $ |
// $Id: stormnote.module,v 1.6.4.9 2008/08/25 09:04:45 robertogerola Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 10 |
|
|
| 11 |
switch ($path) { |
switch ($path) { |
| 12 |
case "admin/help#stormnote": |
case "admin/help#stormnote": |
| 13 |
$o = '<p>'. t("Provides note support for Storm") .'</p>'; |
$o = '<p>'. storm_t("Provides note support for Storm", 'note') .'</p>'; |
| 14 |
break; |
break; |
| 15 |
} |
} |
| 16 |
|
|
| 145 |
$items = array(); |
$items = array(); |
| 146 |
|
|
| 147 |
$items['storm/notes'] = array( |
$items['storm/notes'] = array( |
| 148 |
'title' => t('Notes'), |
'title' => storm_t('Notes', 'note'), |
| 149 |
'description' => t('Storm notes'), |
'description' => storm_t('Storm notes', 'note'), |
| 150 |
'page callback' => 'stormnote_list', |
'page callback' => 'stormnote_list', |
| 151 |
'access arguments' => array('Storm note: access'), |
'access arguments' => array('Storm note: access'), |
| 152 |
'type' => MENU_NORMAL_ITEM, |
'type' => MENU_NORMAL_ITEM, |
| 172 |
function stormnote_node_info() { |
function stormnote_node_info() { |
| 173 |
return array( |
return array( |
| 174 |
'stormnote' => array( |
'stormnote' => array( |
| 175 |
'name' => t('Note'), |
'name' => storm_t('Note', 'note'), |
| 176 |
'module' => 'stormnote', |
'module' => 'stormnote', |
| 177 |
'description' => t("A note for Storm."), |
'description' => storm_t("A note for Storm.", 'note'), |
| 178 |
'has_body' => true, |
'has_body' => true, |
| 179 |
) |
) |
| 180 |
); |
); |
| 248 |
} |
} |
| 249 |
$form['group1']['organization_nid'] = array( |
$form['group1']['organization_nid'] = array( |
| 250 |
'#type' => 'select', |
'#type' => 'select', |
| 251 |
'#title' => t('Organization'), |
'#title' => storm_t('Organization', 'note'), |
| 252 |
'#default_value' => $node->organization_nid, |
'#default_value' => $node->organization_nid, |
| 253 |
'#options' => $organizations, |
'#options' => $organizations, |
| 254 |
'#required' => true, |
'#required' => true, |
| 265 |
} |
} |
| 266 |
$form['group1']['project_nid'] = array( |
$form['group1']['project_nid'] = array( |
| 267 |
'#type' => 'select', |
'#type' => 'select', |
| 268 |
'#title' => t('Project'), |
'#title' => storm_t('Project', 'note'), |
| 269 |
'#default_value' => $node->project_nid, |
'#default_value' => $node->project_nid, |
| 270 |
'#options' => array(0 => '-') + $projects, |
'#options' => array(0 => '-') + $projects, |
| 271 |
'#process' => array('storm_dependent_select_process'), |
'#process' => array('storm_dependent_select_process'), |
| 277 |
$tasks = _stormtask_plain_tree($tree); |
$tasks = _stormtask_plain_tree($tree); |
| 278 |
$form['group1']['task_nid'] = array( |
$form['group1']['task_nid'] = array( |
| 279 |
'#type' => 'select', |
'#type' => 'select', |
| 280 |
'#title' => t('Task'), |
'#title' => storm_t('Task', 'note'), |
| 281 |
'#default_value' => $node->task_nid, |
'#default_value' => $node->task_nid, |
| 282 |
'#options' => array(0 => '-') + $tasks, |
'#options' => array(0 => '-') + $tasks, |
| 283 |
'#process' => array('storm_dependent_select_process'), |
'#process' => array('storm_dependent_select_process'), |
| 370 |
} |
} |
| 371 |
|
|
| 372 |
function stormnote_view($node, $teaser = FALSE, $page = FALSE) { |
function stormnote_view($node, $teaser = FALSE, $page = FALSE) { |
| 373 |
$node = node_prepare($node, $teaser); |
return theme('stormnote_view', $node, $teaser = FALSE, $page = FALSE); |
|
$node->content['stormnote'] = array( |
|
|
'#value' => theme('stormnote_view', $node, $teaser = FALSE, $page = FALSE), |
|
|
'#weight' => 1, |
|
|
); |
|
|
|
|
|
return $node; |
|
| 374 |
} |
} |
| 375 |
|
|