diff -rup storm/storm.css storm-343818/storm.css --- storm/storm.css 2009-07-17 14:59:51.000000000 +0100 +++ storm-343818/storm.css 2009-08-13 10:15:18.000000000 +0100 @@ -264,4 +264,13 @@ background: transparent url(images/pdf.p div.gantt { width: 100%; overflow: hidden; -} \ No newline at end of file +} + +div#fields div.label, div.body div.label, div.field div.field-label-inline-first { + float: left; + width: 150px; + text-align: right; + clear: left; + font-weight: bold; +} + diff -rup storm/storm.theme.inc storm-343818/storm.theme.inc --- storm/storm.theme.inc 2009-07-30 19:12:47.000000000 +0100 +++ storm-343818/storm.theme.inc 2009-08-13 09:56:19.000000000 +0100 @@ -88,7 +88,7 @@ function theme_storm_report($header, $co } function theme_storm_view_item($label, $value) { - $o = '
'. t($label) .' :
'. $value .'
'; + $o = '
'. t($label) .': 
'. $value .'
'; return $o; } diff -rup storm/stormticket/stormticket.module storm-343818/stormticket/stormticket.module --- storm/stormticket/stormticket.module 2009-07-15 18:27:20.000000000 +0100 +++ storm-343818/stormticket/stormticket.module 2009-08-13 10:51:30.000000000 +0100 @@ -47,6 +47,17 @@ function stormticket_init() { drupal_add_js($settings, 'setting'); } +function stormticket_content_extra_fields($type_name) { + if ($type_name == 'stormticket') { + return array( + 'group1' => array('label' => 'Organization/Project/Task Group', 'weight' => -20), + 'group2' => array('label' => 'Category/Status/Priority Group', 'weight' => -19), + 'group3' => array('label' => 'Date/Duration Group', 'weight' => 2), + 'group5' => array('label' => 'Price Group', 'weight' => 3), + ); + } +} + // ACCESS FUNCTIONS function stormticket_access($op, $node, $account=NULL) { if (empty($account)) { @@ -281,7 +292,7 @@ function stormticket_form(&$node) { $form['group1'] = array( '#type' => 'markup', '#theme' => 'storm_form_group', - '#weight' => -20, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : -20, ); $s_org = stormorganization_access_sql($s_org); @@ -331,7 +342,7 @@ function stormticket_form(&$node) { $form['group2'] = array( '#type' => 'markup', '#theme' => 'storm_form_group', - '#weight' => -19, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group2') : -19, ); $category_list = stormattribute_attributes_bydomain('Ticket category'); @@ -363,13 +374,13 @@ function stormticket_form(&$node) { '#title' => check_plain($type->title_label), '#required' => TRUE, '#default_value' => $node->title, - '#weight' => 1, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'title') : 1, ); $form['group3'] = array( '#type' => 'markup', '#theme' => 'storm_form_group', - '#weight' => 2, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group3') : 2, ); $form['group3']['datebegin'] = array( @@ -404,7 +415,7 @@ function stormticket_form(&$node) { $form['group5'] = array( '#type' => 'markup', '#theme' => 'storm_form_group', - '#weight' => 3, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group5') : 3, ); $pricemodes = stormattribute_attributes_bydomain('Price mode'); @@ -431,7 +442,7 @@ function stormticket_form(&$node) { ); if ($type->has_body) { - $form['body_filter']['#weight'] = 4; + $form['body_filter']['#weight'] = module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : 4; $form['body_filter']['body'] = array( '#type' => 'textarea', '#title' => check_plain($type->body_label), diff -rup storm/stormticket/stormticket.theme.inc storm-343818/stormticket/stormticket.theme.inc --- storm/stormticket/stormticket.theme.inc 2009-07-24 23:05:33.000000000 +0100 +++ storm-343818/stormticket/stormticket.theme.inc 2009-08-13 10:00:14.000000000 +0100 @@ -37,75 +37,82 @@ function theme_stormticket_view($node, $ $node = node_prepare($node, $teaser); $w = 0; - $node->content['stormticket'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#weight' => $w++, - ); - $node->content['stormticket']['fields'] = array( + $node->content['group1'] = array( '#prefix' => '
', '#suffix' => '
', - '#weight' => $w++, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : -20, ); - $node->content['stormticket']['fields']['organization'] = array( - '#prefix' => '
', - '#suffix' => '
', - '#value' => theme('storm_view_item', t('Organization'), l($node->organization_title, 'node/'. $node->organization_nid)), - '#weight' => $w++, - ); - - $node->content['stormticket']['fields']['project'] = array( + $node->content['group1']['project_nid'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Project'), l($node->project_title, 'node/'. $node->project_nid)), - '#weight' => $w++, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : $w++, ); - $node->content['stormticket']['fields']['task'] = array( + $node->content['group1']['task_nid'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Task'), l($node->task_title, 'node/'. $node->task_nid)), - '#weight' => $w++, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : $w++, ); - $node->content['stormticket']['fields']['category'] = array( - '#prefix' => '
', + $node->content['group1']['organization_nid'] = array( + '#prefix' => '
', '#suffix' => '
', - '#value' => theme('storm_view_item', t('Category'), stormattribute_value('Ticket category', $node->ticketcategory)), - '#weight' => $w++, + '#value' => theme('storm_view_item', t('Organization'), l($node->organization_title, 'node/'. $node->organization_nid)), + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : $w++, ); - - $node->content['stormticket']['fields']['status'] = array( + + $node->content['group2'] = array( + '#prefix' => '
', + '#suffix' => '
', + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group2') : -19, + ); + + $node->content['group2']['status'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Status'), stormattribute_value('Ticket status', $node->ticketstatus)), - '#weight' => $w++, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group2') : $w++, ); - $node->content['stormticket']['fields']['priority'] = array( + $node->content['group2']['priority'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Priority'), stormattribute_value('Ticket priority', $node->ticketpriority)), - '#weight' => $w++, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group2') : $w++, + ); + + $node->content['group2']['category'] = array( + '#prefix' => '
', + '#suffix' => '
', + '#value' => theme('storm_view_item', t('Category'), stormattribute_value('Ticket category', $node->ticketcategory)), + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group2') : $w++, ); - $node->content['stormticket']['fields']['body'] = array( + $node->content['body_field'] = array( '#prefix' => '
', '#suffix' => '
', '#value' => theme('storm_view_item', t('Description'), $node->content['body']['#value']), - '#weight' => $w++, + '#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : $w++, ); unset($node->content['body']); + $node->content['stormticket'] = array( + '#prefix' => '
', + '#suffix' => '
', + '#weight' => $w++, + ); + $node->content['stormticket']['links'] = array( '#prefix' => '', '#value' => ' ', '#weight' => $w++, ); - + $w = 0; $i = new stdClass();