/[drupal]/contributions/modules/storm/stormnote/stormnote.module
ViewVC logotype

Diff of /contributions/modules/storm/stormnote/stormnote.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6.4.9, Mon Aug 25 09:04:45 2008 UTC revision 1.6.4.10, Mon Sep 1 08:50:21 2008 UTC
# Line 1  Line 1 
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
# Line 10  function stormnote_help($path, $arg) { Line 10  function stormnote_help($path, $arg) {
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    
# Line 145  function stormnote_menu() { Line 145  function stormnote_menu() {
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,
# Line 172  function stormnote_theme() { Line 172  function stormnote_theme() {
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    );    );
# Line 248  function stormnote_form(&$node) { Line 248  function stormnote_form(&$node) {
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,
# Line 265  function stormnote_form(&$node) { Line 265  function stormnote_form(&$node) {
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'),
# Line 277  function stormnote_form(&$node) { Line 277  function stormnote_form(&$node) {
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'),
# Line 370  function stormnote_load($node) { Line 370  function stormnote_load($node) {
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    

Legend:
Removed from v.1.6.4.9  
changed lines
  Added in v.1.6.4.10

  ViewVC Help
Powered by ViewVC 1.1.2