' . l($note->title, 'node/'. $note->nid) . theme('mark', node_mark($note->nid, $note->changed)) . '
' . l($note->organization_title, 'node/'. $note->organization_nid) . (!empty($note->project_title) ? ' » ' . l($note->project_title, 'node/'. $note->project_nid) : '' ) . (!empty($note->task_title) ? ' » ' . l($note->task_title, 'node/'. $note->task_nid) : '' ), $note->clip ? storm_icon('attached', t('Has attached files')) : ' ', format_date($note->created, 'small'), format_date($note->changed, 'small'), $note->version, array( 'data' => storm_icon_edit_node($note, $_GET) . storm_icon_delete_node($note, $_GET), 'class' => 'storm_list_operations', ), ); } $o = theme('table', $header, $rows, array('id' => 'stormnotes')); return $o; } function theme_stormnote_view($node, $teaser = FALSE, $page = FALSE) { drupal_add_css(drupal_get_path('module', 'storm') . '/storm-node.css', 'module'); $node = node_prepare($node, $teaser); $l_pos = 1; // Used to increase the link position number (see issue 814820) $node->content['links'] = array( '#prefix' => '', '#weight' => $l_pos++, ); $node->content['group1'] = array( '#prefix' => '
', '#suffix' => '
', '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : -20, ); if (!empty($node->organization_nid)) { $node->content['group1']['organization'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Organization'), l($node->organization_title, 'node/' . $node->organization_nid)), '#weight' => 3, ); } if (!empty($node->project_nid)) { $node->content['group1']['project'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Project'), l($node->project_title, 'node/' . $node->project_nid)), '#weight' => 4, ); } if (!empty($node->task_nid)) { $node->content['group1']['task'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Task'), l($node->task_title, 'node/' . $node->task_nid)), '#weight' => 5, ); } $node->content['group1']['created'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Note created'), format_date($node->created, 'small')), '#weight' => 12, ); if ($node->changed != $node->created) { $node->content['group1']['modified'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Note updated'), format_date($node->changed, 'small')), '#weight' => 13, ); } $node->content['group1']['version'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Revision'), $node->version), '#weight' => 14, ); $node->content['body_field'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Description'), $node->content['body']['#value']), '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : -16, ); unset($node->content['body']); return $node; }