├── atrium_time_tracker_reports.features.inc ├── atrium_time_tracker_reports.info ├── atrium_time_tracker_reports.context.inc ├── README.txt ├── atrium_time_tracker_reports.module └── atrium_time_tracker_reports.views_default.inc /atrium_time_tracker_reports.features.inc: -------------------------------------------------------------------------------- 1 | 3); 10 | } 11 | } 12 | 13 | /** 14 | * Implementation of hook_views_api(). 15 | */ 16 | function atrium_time_tracker_reports_views_api() { 17 | return array( 18 | 'api' => '2', 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /atrium_time_tracker_reports.info: -------------------------------------------------------------------------------- 1 | core = "6.x" 2 | dependencies[] = "casetracker" 3 | dependencies[] = "comment" 4 | dependencies[] = "context" 5 | dependencies[] = "og_views" 6 | dependencies[] = "time_tracker" 7 | description = "A view for reporting on time tracker data, specifically in Open Atrium." 8 | features[context][] = "reports_layout" 9 | features[ctools][] = "context:context:3" 10 | features[views][] = "atrium_time_tracker_reports" 11 | features[views_api][] = "api:2" 12 | name = "Atrium Time Tracker Reports" 13 | package = "Features" 14 | project = "atrium_time_tracker_reports" 15 | version = "6.x-1.0-dev" 16 | -------------------------------------------------------------------------------- /atrium_time_tracker_reports.context.inc: -------------------------------------------------------------------------------- 1 | disabled = FALSE; /* Edit this to true to make a default context disabled initially */ 10 | $context->api_version = 3; 11 | $context->name = 'reports_layout'; 12 | $context->description = 'Layout switcher for the reports'; 13 | $context->tag = 'time_tracker'; 14 | $context->conditions = array( 15 | 'path' => array( 16 | 'values' => array( 17 | 'time_tracker/atrium_reports' => 'time_tracker/atrium_reports', 18 | 'time_tracker/reports' => 'time_tracker/reports', 19 | ), 20 | ), 21 | ); 22 | $context->reactions = array( 23 | 'block' => array( 24 | 'blocks' => array(), 25 | 'layout' => 'wide', 26 | ), 27 | ); 28 | $context->condition_mode = 0; 29 | 30 | // Translatables 31 | // Included for use with string extractors like potx. 32 | t('Layout switcher for the reports'); 33 | t('time_tracker'); 34 | 35 | $export['reports_layout'] = $context; 36 | return $export; 37 | } 38 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | ====================================================================== 2 | ATRIUM TIME TRACKER REPORTS - README.txt 3 | ====================================================================== 4 | 5 | --- OVERVIEW --- 6 | 7 | This is a Feature specifically for Open Atrium and the Time Tracker 8 | (drupal.org/project/time_tracker) module. 9 | 10 | The purpose of this feature is simply to include the atrium 'group' into 11 | the original time tracker reports view as well as provide some extra 12 | AHAH/AJAX powered dependent drop downs to the exposed filters. 13 | 14 | 15 | --- SETUP --- 16 | 17 | To enable goto admin/build/modules and enable as you would a module. 18 | 19 | Once enabled you will have the following: 20 | 21 | - A new view (time_tracker/atrium_reports) 22 | This new view extends the original time tracker reporting page 23 | (time_tracker/reports) and adds a filter for atrium 'groups'. 24 | The new 'groups' filter will also auto fill the Projects filter 25 | with projects from the chosen group. 26 | NOTE: The filters are also 'spaces aware' so they will only give 27 | you options relative to the current space / project you are in 28 | 29 | 30 | --- NOTES ---- 31 | 32 | Please note that this view is really just for administrators. The option 33 | list for filtering groups and projects does not take into consideration 34 | which groups the current user is a member of. 35 | 36 | However, you can easily create your own views that take this into account. 37 | Time Tracker data is readily available in views so it should be no problem 38 | to create a new view or extend the original time_tracker reports view 39 | to accommodate for your needs. 40 | -------------------------------------------------------------------------------- /atrium_time_tracker_reports.module: -------------------------------------------------------------------------------- 1 | 'report_js', 24 | 'access arguments' => array('view all time tracker entries'), 25 | 'type' => MENU_CALLBACK, 26 | ); 27 | 28 | return $items; 29 | } 30 | 31 | /** 32 | * Implementation of hook_form_alter() 33 | */ 34 | function atrium_time_tracker_reports_form_views_exposed_form_alter(&$form, $form_state) { 35 | 36 | // Only want this to work on the atrium_time_tracker_reports view for now 37 | if ($form['#id'] == 'views-exposed-form-atrium-time-tracker-reports-page-1') { 38 | // If we're in a particular space, the project drop down automatically 39 | // reduces to only show projects within the current space, but we have to 40 | // manually adjust the group drop down to match or it's confusing 41 | if ($form['group_nid'] && $space = spaces_get_space()) { 42 | $form['group_nid']['#options'] = array( 43 | $space->id => $space->group->title, 44 | ); 45 | $form['group_nid']['#value'] = $space->id; 46 | } // Only applies the AHAH if it both fields are there 47 | elseif ($form['group_nid'] && $form['pid']) { 48 | $form['group_nid']['#ahah'] = array( 49 | 'event' => 'change', 50 | 'path' => 'reports/js', 51 | 'wrapper' => 'edit-pid-wrapper', 52 | 'method' => 'replace', 53 | 'effect' => 'slide', 54 | ); 55 | if (isset($_GET['group_nid']) && is_numeric($_GET['group_nid'])) { 56 | $options = _get_projects_for_group($_GET['group_nid']); 57 | $form['pid']['#options'] = $options; 58 | } 59 | //$form['pid']['#options'] = array('All' => t('')); 60 | } 61 | } 62 | } 63 | 64 | /** 65 | * AHAH Callback for the views filters 66 | * Creates a dependency for the 'Project' filter to 67 | * Get the user to choose a Group First. 68 | * 69 | * Currently building the html from scratch rather than using 70 | * a drupal function because views exposed filters uses a different 71 | * caching method for it's form build_id etc. and we can't employ 72 | * the usual AHAH methods. 73 | */ 74 | function report_js() { 75 | 76 | // Get the chosen group from the POST variable 77 | $group_nid = $_POST['group_nid']; 78 | 79 | $projects = _get_projects_for_group($group_nid); 80 | 81 | $options = ''; 82 | foreach ($projects as $nid => $project) { 83 | if ($nid == 'All') { 84 | $options = ''; 85 | } 86 | else { 87 | $options .= ''; 88 | } 89 | } 90 | 91 | // Rebuild the element the way views expects it to be built 92 | $html = ''; 93 | 94 | $output = theme('status_messages') . $html; 95 | 96 | drupal_json(array('status' => TRUE, 'data' => $output)); 97 | } 98 | 99 | /** 100 | * Returns the projects for a given Group ID 101 | * 102 | * NOTE: 103 | * Groups and Projects are just node types, all stored in the 104 | * node table in the db. However the og_ancestry table 105 | * stored the relationship between a project and a group. 106 | * 107 | * @param 108 | * The Group nid for the project. 109 | */ 110 | function _get_projects_for_group($group_id = 'All') { 111 | $options = array('All' => urlencode(t(""))); 112 | 113 | if ($group_id == 'All') { 114 | $sql = "SELECT node.title, node.nid 115 | FROM {node} 116 | JOIN {og_ancestry} AS oa ON oa.nid = node.nid 117 | JOIN {node} AS no ON no.nid = oa.group_nid 118 | WHERE node.type = '%s' 119 | AND node.status = 1 120 | ORDER BY node.title ASC"; 121 | 122 | $result = db_query($sql, 'casetracker_basic_project'); 123 | } 124 | else { 125 | $sql = "SELECT node.title, node.nid 126 | FROM {node} 127 | JOIN {og_ancestry} AS oa ON oa.nid = node.nid 128 | JOIN {node} AS no ON no.nid = oa.group_nid 129 | WHERE node.type = '%s' 130 | AND no.nid = '%s' 131 | AND node.status = 1 132 | ORDER BY node.title ASC"; 133 | 134 | $result = db_query($sql, 'casetracker_basic_project', $group_id); 135 | } 136 | 137 | while ($row = db_fetch_object($result)) { 138 | $options[$row->nid] = $row->title; 139 | } 140 | 141 | return $options; 142 | } -------------------------------------------------------------------------------- /atrium_time_tracker_reports.views_default.inc: -------------------------------------------------------------------------------- 1 | name = 'atrium_time_tracker_reports'; 12 | $view->description = 'A view for reporting on time tracker data, specifically in Open Atrium.'; 13 | $view->tag = ''; 14 | $view->view_php = ''; 15 | $view->base_table = 'time_tracker_entry'; 16 | $view->is_cacheable = FALSE; 17 | $view->api_version = 2; 18 | $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 19 | $handler = $view->new_display('default', 'Defaults', 'default'); 20 | $handler->override_option('relationships', array( 21 | 'uid' => array( 22 | 'label' => 'User', 23 | 'required' => 0, 24 | 'id' => 'uid', 25 | 'table' => 'time_tracker_entry', 26 | 'field' => 'uid', 27 | 'relationship' => 'none', 28 | ), 29 | 'cid' => array( 30 | 'label' => 'Comment', 31 | 'required' => 0, 32 | 'id' => 'cid', 33 | 'table' => 'time_tracker_entry', 34 | 'field' => 'cid', 35 | 'relationship' => 'none', 36 | ), 37 | 'nid' => array( 38 | 'label' => 'Node', 39 | 'required' => 0, 40 | 'id' => 'nid', 41 | 'table' => 'time_tracker_entry', 42 | 'field' => 'nid', 43 | 'relationship' => 'none', 44 | ), 45 | 'pid' => array( 46 | 'label' => 'project', 47 | 'required' => 0, 48 | 'id' => 'pid', 49 | 'table' => 'casetracker_case', 50 | 'field' => 'pid', 51 | 'relationship' => 'nid', 52 | ), 53 | 'group_nid' => array( 54 | 'label' => 'Group node', 55 | 'required' => 0, 56 | 'id' => 'group_nid', 57 | 'table' => 'og_ancestry', 58 | 'field' => 'group_nid', 59 | 'relationship' => 'nid', 60 | ), 61 | 'activity' => array( 62 | 'label' => 'Activity', 63 | 'required' => 0, 64 | 'id' => 'activity', 65 | 'table' => 'time_tracker_entry', 66 | 'field' => 'activity', 67 | 'override' => array( 68 | 'button' => 'Override', 69 | ), 70 | 'relationship' => 'none', 71 | ), 72 | )); 73 | $handler->override_option('fields', array( 74 | 'name' => array( 75 | 'label' => 'Name / Group', 76 | 'alter' => array( 77 | 'alter_text' => 0, 78 | 'text' => '', 79 | 'make_link' => 0, 80 | 'path' => '', 81 | 'link_class' => '', 82 | 'alt' => '', 83 | 'prefix' => '', 84 | 'suffix' => '', 85 | 'target' => '', 86 | 'help' => '', 87 | 'trim' => 0, 88 | 'max_length' => '', 89 | 'word_boundary' => 1, 90 | 'ellipsis' => 1, 91 | 'html' => 0, 92 | 'strip_tags' => 0, 93 | ), 94 | 'empty' => '', 95 | 'hide_empty' => 0, 96 | 'empty_zero' => 0, 97 | 'link_to_user' => 1, 98 | 'overwrite_anonymous' => 0, 99 | 'anonymous_text' => '', 100 | 'exclude' => 0, 101 | 'id' => 'name', 102 | 'table' => 'users', 103 | 'field' => 'name', 104 | 'relationship' => 'uid', 105 | ), 106 | 'title_2' => array( 107 | 'label' => 'Group', 108 | 'alter' => array( 109 | 'alter_text' => 0, 110 | 'text' => '', 111 | 'make_link' => 0, 112 | 'path' => '', 113 | 'link_class' => '', 114 | 'alt' => '', 115 | 'prefix' => '', 116 | 'suffix' => '', 117 | 'target' => '', 118 | 'help' => '', 119 | 'trim' => 0, 120 | 'max_length' => '', 121 | 'word_boundary' => 1, 122 | 'ellipsis' => 1, 123 | 'html' => 0, 124 | 'strip_tags' => 0, 125 | ), 126 | 'empty' => '', 127 | 'hide_empty' => 0, 128 | 'empty_zero' => 0, 129 | 'link_to_node' => 1, 130 | 'spaces' => array( 131 | 'frontpage' => 1, 132 | 'type' => 'spaces_og', 133 | ), 134 | 'exclude' => 0, 135 | 'id' => 'title_2', 136 | 'table' => 'node', 137 | 'field' => 'title', 138 | 'relationship' => 'group_nid', 139 | ), 140 | 'title_1' => array( 141 | 'label' => 'Project', 142 | 'alter' => array( 143 | 'alter_text' => 0, 144 | 'text' => '', 145 | 'make_link' => 0, 146 | 'path' => '', 147 | 'link_class' => '', 148 | 'alt' => '', 149 | 'prefix' => '', 150 | 'suffix' => '', 151 | 'help' => '', 152 | 'trim' => 0, 153 | 'max_length' => '', 154 | 'word_boundary' => 1, 155 | 'ellipsis' => 1, 156 | 'strip_tags' => 0, 157 | 'html' => 0, 158 | ), 159 | 'link_to_node' => 1, 160 | 'exclude' => 0, 161 | 'id' => 'title_1', 162 | 'table' => 'node', 163 | 'field' => 'title', 164 | 'relationship' => 'pid', 165 | ), 166 | 'title' => array( 167 | 'label' => 'Title', 168 | 'alter' => array( 169 | 'alter_text' => 0, 170 | 'text' => '', 171 | 'make_link' => 0, 172 | 'path' => '', 173 | 'link_class' => '', 174 | 'alt' => '', 175 | 'prefix' => '', 176 | 'suffix' => '', 177 | 'target' => '', 178 | 'help' => '', 179 | 'trim' => 0, 180 | 'max_length' => '', 181 | 'word_boundary' => 1, 182 | 'ellipsis' => 1, 183 | 'strip_tags' => 0, 184 | 'html' => 0, 185 | ), 186 | 'empty' => '', 187 | 'hide_empty' => 0, 188 | 'empty_zero' => 0, 189 | 'link_to_node' => 1, 190 | 'exclude' => 0, 191 | 'id' => 'title', 192 | 'table' => 'node', 193 | 'field' => 'title', 194 | 'relationship' => 'nid', 195 | ), 196 | 'comment' => array( 197 | 'label' => 'Body', 198 | 'alter' => array( 199 | 'alter_text' => 0, 200 | 'text' => '', 201 | 'make_link' => 0, 202 | 'path' => '', 203 | 'link_class' => '', 204 | 'alt' => '', 205 | 'prefix' => '', 206 | 'suffix' => '', 207 | 'target' => '', 208 | 'help' => '', 209 | 'trim' => 1, 210 | 'max_length' => '200', 211 | 'word_boundary' => 1, 212 | 'ellipsis' => 1, 213 | 'html' => 0, 214 | 'strip_tags' => 0, 215 | ), 216 | 'empty' => '', 217 | 'hide_empty' => 0, 218 | 'empty_zero' => 0, 219 | 'exclude' => 0, 220 | 'id' => 'comment', 221 | 'table' => 'comments', 222 | 'field' => 'comment', 223 | 'relationship' => 'cid', 224 | ), 225 | 'note' => array( 226 | 'label' => '', 227 | 'alter' => array( 228 | 'alter_text' => 0, 229 | 'text' => '', 230 | 'make_link' => 0, 231 | 'path' => '', 232 | 'link_class' => '', 233 | 'alt' => '', 234 | 'prefix' => '', 235 | 'suffix' => '', 236 | 'target' => '', 237 | 'help' => '', 238 | 'trim' => 0, 239 | 'max_length' => '', 240 | 'word_boundary' => 1, 241 | 'ellipsis' => 1, 242 | 'html' => 0, 243 | 'strip_tags' => 0, 244 | ), 245 | 'empty' => '', 246 | 'hide_empty' => 0, 247 | 'empty_zero' => 0, 248 | 'exclude' => 0, 249 | 'id' => 'note', 250 | 'table' => 'time_tracker_entry', 251 | 'field' => 'note', 252 | 'relationship' => 'none', 253 | ), 254 | 'timestamp' => array( 255 | 'label' => 'Timestamp', 256 | 'alter' => array( 257 | 'alter_text' => 0, 258 | 'text' => '', 259 | 'make_link' => 0, 260 | 'path' => '', 261 | 'link_class' => '', 262 | 'alt' => '', 263 | 'prefix' => '', 264 | 'suffix' => '', 265 | 'target' => '', 266 | 'help' => '', 267 | 'trim' => 0, 268 | 'max_length' => '', 269 | 'word_boundary' => 1, 270 | 'ellipsis' => 1, 271 | 'html' => 0, 272 | 'strip_tags' => 0, 273 | ), 274 | 'empty' => '', 275 | 'hide_empty' => 0, 276 | 'empty_zero' => 0, 277 | 'date_format' => 'custom', 278 | 'custom_date_format' => 'M jS, Y', 279 | 'reldate' => '0', 280 | 'exclude' => 0, 281 | 'id' => 'timestamp', 282 | 'table' => 'time_tracker_entry', 283 | 'field' => 'timestamp', 284 | 'relationship' => 'none', 285 | ), 286 | 'duration' => array( 287 | 'label' => 'Duration', 288 | 'alter' => array( 289 | 'alter_text' => 0, 290 | 'text' => '', 291 | 'make_link' => 0, 292 | 'path' => '', 293 | 'link_class' => '', 294 | 'alt' => '', 295 | 'prefix' => '', 296 | 'suffix' => '', 297 | 'target' => '', 298 | 'help' => '', 299 | 'trim' => 0, 300 | 'max_length' => '', 301 | 'word_boundary' => 1, 302 | 'ellipsis' => 1, 303 | 'strip_tags' => 0, 304 | 'html' => 0, 305 | ), 306 | 'empty' => '', 307 | 'hide_empty' => 0, 308 | 'empty_zero' => 0, 309 | 'set_precision' => FALSE, 310 | 'precision' => 0, 311 | 'decimal' => '.', 312 | 'separator' => ',', 313 | 'prefix' => '', 314 | 'suffix' => ' hours', 315 | 'exclude' => 0, 316 | 'id' => 'duration', 317 | 'table' => 'time_tracker_entry', 318 | 'field' => 'duration', 319 | 'relationship' => 'none', 320 | ), 321 | )); 322 | $handler->override_option('sorts', array( 323 | 'timestamp' => array( 324 | 'id' => 'timestamp', 325 | 'table' => 'time_tracker_entry', 326 | 'field' => 'timestamp', 327 | ), 328 | )); 329 | $handler->override_option('arguments', array( 330 | 'name' => array( 331 | 'default_action' => 'default', 332 | 'style_plugin' => 'default_summary', 333 | 'style_options' => array(), 334 | 'wildcard' => 'all', 335 | 'wildcard_substitution' => 'All', 336 | 'title' => '', 337 | 'breadcrumb' => '', 338 | 'default_argument_type' => 'fixed', 339 | 'default_argument' => '', 340 | 'validate_type' => 'none', 341 | 'validate_fail' => 'not found', 342 | 'glossary' => 0, 343 | 'limit' => '0', 344 | 'case' => 'none', 345 | 'path_case' => 'none', 346 | 'transform_dash' => 0, 347 | 'id' => 'name', 348 | 'table' => 'users', 349 | 'field' => 'name', 350 | 'relationship' => 'uid', 351 | 'validate_user_argument_type' => 'uid', 352 | 'validate_user_roles' => array( 353 | '2' => 0, 354 | '3' => 0, 355 | '5' => 0, 356 | '4' => 0, 357 | ), 358 | 'default_options_div_prefix' => '', 359 | 'default_argument_fixed' => 'Chris Eastwood', 360 | 'default_argument_user' => 0, 361 | 'default_argument_php' => '', 362 | 'validate_argument_node_type' => array( 363 | 'blog' => 0, 364 | 'book' => 0, 365 | 'event' => 0, 366 | 'feed_ical' => 0, 367 | 'feed_ical_item' => 0, 368 | 'group' => 0, 369 | 'profile' => 0, 370 | 'shoutbox' => 0, 371 | 'casetracker_basic_case' => 0, 372 | 'casetracker_basic_project' => 0, 373 | 'feed' => 0, 374 | ), 375 | 'validate_argument_node_access' => 0, 376 | 'validate_argument_nid_type' => 'nid', 377 | 'validate_argument_vocabulary' => array( 378 | '1' => 0, 379 | ), 380 | 'validate_argument_type' => 'tid', 381 | 'validate_argument_transform' => 0, 382 | 'validate_user_restrict_roles' => 0, 383 | 'validate_argument_is_member' => 'OG_VIEWS_DO_NOT_VALIDATE_MEMBERSHIP', 384 | 'validate_argument_group_node_type' => array( 385 | 'group' => 0, 386 | ), 387 | 'validate_argument_php' => '', 388 | ), 389 | )); 390 | $handler->override_option('filters', array( 391 | 'uid' => array( 392 | 'operator' => 'in', 393 | 'value' => '', 394 | 'group' => '0', 395 | 'exposed' => TRUE, 396 | 'expose' => array( 397 | 'use_operator' => 0, 398 | 'operator' => 'uid_op', 399 | 'identifier' => 'uid', 400 | 'label' => 'Name', 401 | 'optional' => 1, 402 | 'remember' => 0, 403 | 'reduce' => 0, 404 | ), 405 | 'id' => 'uid', 406 | 'table' => 'users', 407 | 'field' => 'uid', 408 | 'relationship' => 'uid', 409 | ), 410 | 'timestamp' => array( 411 | 'operator' => 'between', 412 | 'value' => array( 413 | 'type' => 'relative', 414 | 'value' => '', 415 | 'min' => 'bimonthly', 416 | 'max' => 'bimonthly', 417 | ), 418 | 'group' => '0', 419 | 'exposed' => TRUE, 420 | 'expose' => array( 421 | 'use_operator' => 0, 422 | 'operator' => 'timestamp_op', 423 | 'identifier' => 'timestamp', 424 | 'label' => 'Entered Between', 425 | 'optional' => 1, 426 | 'remember' => 0, 427 | ), 428 | 'id' => 'timestamp', 429 | 'table' => 'time_tracker_entry', 430 | 'field' => 'timestamp', 431 | 'relationship' => 'none', 432 | 'override' => array( 433 | 'button' => 'Override', 434 | ), 435 | ), 436 | 'group_nid' => array( 437 | 'operator' => 'or', 438 | 'value' => array(), 439 | 'group' => '0', 440 | 'exposed' => TRUE, 441 | 'expose' => array( 442 | 'use_operator' => 0, 443 | 'operator' => 'group_nid_op', 444 | 'identifier' => 'group_nid', 445 | 'label' => 'Groups', 446 | 'optional' => 1, 447 | 'single' => 1, 448 | 'remember' => 0, 449 | 'reduce' => 0, 450 | ), 451 | 'id' => 'group_nid', 452 | 'table' => 'og_ancestry', 453 | 'field' => 'group_nid', 454 | 'relationship' => 'nid', 455 | 'reduce_duplicates' => 0, 456 | ), 457 | 'pid' => array( 458 | 'operator' => 'or', 459 | 'value' => array(), 460 | 'group' => '0', 461 | 'exposed' => TRUE, 462 | 'expose' => array( 463 | 'use_operator' => 0, 464 | 'operator' => 'pid_op', 465 | 'identifier' => 'pid', 466 | 'label' => 'Project', 467 | 'optional' => 1, 468 | 'single' => 1, 469 | 'remember' => 0, 470 | 'reduce' => 0, 471 | ), 472 | 'id' => 'pid', 473 | 'table' => 'casetracker_case', 474 | 'field' => 'pid', 475 | 'relationship' => 'nid', 476 | 'reduce_duplicates' => 0, 477 | ), 478 | )); 479 | $handler->override_option('access', array( 480 | 'type' => 'role', 481 | 'role' => array( 482 | '4' => 4, 483 | ), 484 | )); 485 | $handler->override_option('cache', array( 486 | 'type' => 'none', 487 | )); 488 | $handler->override_option('items_per_page', 0); 489 | $handler->override_option('style_plugin', 'views_calc'); 490 | $handler->override_option('style_options', array( 491 | 'grouping' => '', 492 | 'override' => 1, 493 | 'sticky' => 0, 494 | 'order' => 'asc', 495 | 'columns' => array( 496 | 'name' => 'name', 497 | 'title_2' => 'name', 498 | 'title_1' => 'title_1', 499 | 'title' => 'title', 500 | 'comment' => 'comment', 501 | 'note' => 'comment', 502 | 'timestamp' => 'timestamp', 503 | 'duration' => 'duration', 504 | ), 505 | 'info' => array( 506 | 'name' => array( 507 | 'sortable' => 0, 508 | 'separator' => '
', 509 | 'justification' => 'views_calc_justify_none', 510 | 'has_calc' => 0, 511 | 'calc' => array(), 512 | ), 513 | 'title_2' => array( 514 | 'sortable' => 0, 515 | 'separator' => '
', 516 | 'justification' => 'views_calc_justify_none', 517 | 'has_calc' => 0, 518 | 'calc' => array(), 519 | ), 520 | 'title_1' => array( 521 | 'sortable' => 0, 522 | 'separator' => '', 523 | 'justification' => 'views_calc_justify_none', 524 | 'has_calc' => 0, 525 | 'calc' => array(), 526 | ), 527 | 'title' => array( 528 | 'sortable' => 0, 529 | 'separator' => '', 530 | 'justification' => 'views_calc_justify_none', 531 | 'has_calc' => 0, 532 | 'calc' => array(), 533 | ), 534 | 'comment' => array( 535 | 'separator' => '', 536 | 'justification' => 'views_calc_justify_none', 537 | 'has_calc' => 0, 538 | 'calc' => array(), 539 | ), 540 | 'note' => array( 541 | 'separator' => '', 542 | 'justification' => 'views_calc_justify_none', 543 | 'has_calc' => 0, 544 | 'calc' => array(), 545 | ), 546 | 'timestamp' => array( 547 | 'separator' => '', 548 | 'justification' => 'views_calc_justify_none', 549 | 'has_calc' => 0, 550 | 'calc' => array(), 551 | ), 552 | 'duration' => array( 553 | 'separator' => '', 554 | 'justification' => 'views_calc_justify_none', 555 | 'has_calc' => 1, 556 | 'calc' => array( 557 | 'SUM' => 'SUM', 558 | ), 559 | ), 560 | ), 561 | 'default' => '-1', 562 | 'detailed_values' => '0', 563 | )); 564 | $handler = $view->new_display('page', 'Page', 'page_1'); 565 | $handler->override_option('arguments', array()); 566 | $handler->override_option('path', 'time_tracker/atrium_reports'); 567 | $handler->override_option('menu', array( 568 | 'type' => 'none', 569 | 'title' => 'Reports', 570 | 'description' => '', 571 | 'weight' => '0', 572 | 'name' => 'primary-links', 573 | )); 574 | $handler->override_option('tab_options', array( 575 | 'type' => 'none', 576 | 'title' => '', 577 | 'description' => '', 578 | 'weight' => 0, 579 | 'name' => 'navigation', 580 | )); 581 | $translatables['atrium_time_tracker_reports'] = array( 582 | t('Defaults'), 583 | t('Page'), 584 | ); 585 | 586 | $views[$view->name] = $view; 587 | 588 | return $views; 589 | } 590 | --------------------------------------------------------------------------------