$row, 'class' => 'formgroup'); $output .= theme('table', array(), $rows, array('class' => 'formgroup')); return $output; } function theme_datetime($element) { return theme('form_element', $element, '
'. $element['#children'] .'
'); } function theme_dateext($element) { return theme('form_element', $element, '
'. $element['#children'] .'
'); } function theme_storm_list_report($header, $rows, $title, $footer) { $css_all_file = drupal_get_path('module', 'storm') .'/storm_list_report_all.css'; $query_string = '?'. drupal_substr(variable_get('css_js_query_string', '0'), 0, 1); $o = "\n"; $o .= ''; $o .= ''; $o .= ''. (drupal_get_title() ? strip_tags(drupal_get_title()) : variable_get('site_name', 'Drupal')) .''; $o .= ''; $o .= ''; $o .= ''; $o .= ''; $o .= ''; $o .= ''; $o .= '
'; $o .= '
'. variable_get('site_name', '') .'
'; $o .= '
'. variable_get('site_slogan', '') .'
'; $o .= '
'. variable_get('storm_report_header', '') .'
'; $o .= '
'. $title .'
'; $o .= '
'; $o .= theme('table', $header, $rows); $o .= '
'; $o .= ''; $o .= ''; $o .= ''; return $o; } function theme_storm_report($header, $content, $title, $footer, $headtitle='') { $css_all_file = drupal_get_path('module', 'storm') .'/storm_report_all.css'; $query_string = '?'. drupal_substr(variable_get('css_js_query_string', '0'), 0, 1); $o = "\n"; $o .= ''; $o .= ''; $o .= ''. ($headtitle ? strip_tags($headtitle) : $title) .''; $o .= ''; $o .= ''; $o .= ''; $o .= ''; $myorg = node_load(variable_get('storm_organization_nid', 0)); $o .= ''; $o .= ''; $o .= '
'; $o .= '
'. variable_get('site_name', '') .'
'; $o .= '
'. variable_get('site_slogan', '') .'
'; $o .= '
'. variable_get('storm_report_header', '') .'
'; $o .= '
'. $title .'
'; $o .= '
'; $o .= $content; $o .= '
'; $o .= ''; $o .= ''; $o .= ''; return $o; } function theme_storm_view_item($label, $value) { $o = '
' . $label . ': 
' . $value . ' 
'; return $o; } // See 498108: Proposed to refactor creation of Storm Dashboard function theme_storm_dashboard() { $o = '
'; $o .= '
'; $o .= '
'; $o .= theme('storm_link', '', 'stormorganization'); $o .= theme('storm_link', '', 'stormperson'); $o .= theme('storm_link', '', 'stormteam'); $o .= theme('storm_link', '', 'stormproject'); $o .= theme('storm_link', '', 'stormtask'); $o .= theme('storm_link', '', 'stormticket'); $o .= theme('storm_link', '', 'stormtimetracking'); $o .= '
'; $o .= '
'; $o .= theme('storm_link', '', 'stormnote'); $o .= theme('storm_link', '', 'storminvoice'); $o .= theme('storm_link', '', 'stormexpense'); $o .= theme('storm_link', '', 'stormknowledgebase'); $o .= theme('storm_link', '', 'stormattribute'); $o .= theme('storm_link', '', 'stormconfiguration'); $o .= '
'; $o .= '
'; $o .= '
'; return $o; } function theme_storm_link($source_module='', $destination_module='', $node_nid=0, $weight=0) { switch ($source_module) { case "stormorganization": $params_key = 'organization_nid'; break; case "stormproject": $params_key = 'project_nid'; break; case "stormtask": $params_key = 'task_nid'; break; case "stormticket": $params_key = 'ticket_nid'; break; } switch ($destination_module) { case "stormattribute": $user_access_check = 'Storm: access administration pages'; $list_text = t('Attributes'); $list_path = 'storm/attributes'; $add_icon_type = 'stormattribute'; $add_path = 'storm/attributes/add'; $dt_id = 'stormattributes'; break; case "stormconfiguration": $user_access_check = 'Storm: access administration pages'; $list_text = t('Configuration'); $list_path = 'admin/settings/storm'; $add_icon_type = ''; $add_path = ''; $dt_id = 'stormconfiguration'; break; case "stormexpense": $user_access_check = 'Storm expense: access'; $list_text = t('Expenses'); $list_path = 'storm/expenses'; $add_icon_type = 'stormexpense'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormexpenses'; break; case "storminvoice": $user_access_check = 'Storm invoice: access'; $list_text = t('Invoices'); $list_path = 'storm/invoices'; $add_icon_type = 'storminvoice'; $add_path = 'node/add/'. $destination_module; $dt_id = 'storminvoices'; break; case "stormknowledgebase": $user_access_check = 'Storm knowledgebase: access'; $list_text = t('Knowledge base'); $list_path = 'storm/knowledgebase'; $add_icon_type = 'stormknowledgebase'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormknowledgebase'; break; case "stormnote": $user_access_check = 'Storm note: access'; $list_text = t('Notes'); $list_path = 'storm/notes/'; $add_icon_type = 'stormnote'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormnotes'; break; case "stormorganization": $user_access_check = 'Storm organization: access'; $list_text = t('Organizations'); $list_path = 'storm/organizations'; $add_icon_type = 'stormorganization'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormorganizations'; break; case "stormperson": $user_access_check = 'Storm person: access'; $list_text = t('People'); $list_path = 'storm/people/'; $add_icon_type = 'stormperson'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormpeople'; break; case "stormproject": $user_access_check = 'Storm project: access'; $list_text = t('Projects'); $list_path = 'storm/projects'; $add_icon_type = 'stormproject'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormprojects'; break; case "stormtask": $user_access_check = 'Storm task: access'; $list_text = t('Tasks'); $list_path = 'storm/tasks/'; $add_icon_type = 'stormtask'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormtasks'; break; case "stormteam": $user_access_check = 'Storm team: access'; $list_text = t('Teams'); $list_path = 'storm/teams'; $add_icon_type = 'stormteam'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormteams'; break; case "stormticket": $user_access_check = 'Storm ticket: access'; $list_text = t('Tickets'); $list_path = 'storm/tickets/'; $add_icon_type = 'stormticket'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormtickets'; break; case "stormtimetracking": $user_access_check = 'Storm timetracking: access'; $list_text = t('Timetrackings'); $list_path = 'storm/timetrackings'; $add_icon_type = 'stormtimetracking'; $node_links_key = 'timetrackings'; $add_path = 'node/add/'. $destination_module; $dt_id = 'stormtimetrackings'; break; } if (($destination_module=='stormconfiguration' && user_access($user_access_check)) || (module_exists($destination_module) && user_access($user_access_check))) { if ($node_nid == 0) { $params = array(); } else { $params = array('query' => array($params_key => $node_nid)); } $v = l($list_text, $list_path, $params); if (!$add_icon_type=='') { $i->type = $add_icon_type; if ($node_nid == 0) { $params = $_GET; } else { $params = $_GET; $params[$params_key] = $node_nid; } $v .= storm_icon_add($add_path, $i, $params); } if ($node_nid == 0) { $r = variable_get('storm_icons_display', TRUE) ? '
' : '
'; $r .= $v; $r .= '
'; } else { $r = array( '#prefix' => variable_get('storm_icons_display', TRUE) ? '
' : '
', '#suffix' => '
', '#value' => $v, '#weight' => $weight, ); } return $r; } }