/[drupal]/contributions/modules/storm/stormtimetracking/stormtimetracking.admin.inc
ViewVC logotype

Diff of /contributions/modules/storm/stormtimetracking/stormtimetracking.admin.inc

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

revision 1.9.4.6, Tue Aug 5 07:21:14 2008 UTC revision 1.9.4.7, Mon Sep 1 08:50:22 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: stormtimetracking.admin.inc,v 1.9.4.5 2008/07/23 19:37:50 robertogerola Exp $  // $Id: stormtimetracking.admin.inc,v 1.9.4.6 2008/08/05 07:21:14 robertogerola Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 59  function stormtimetracking_list() { Line 59  function stormtimetracking_list() {
59    
60    $header = array(    $header = array(
61      array(      array(
62        'data' => t('Organization'),        'data' => storm_t('Organization', 'timetracking'),
63        'field' => 'stt.organization_title',        'field' => 'stt.organization_title',
64      ),      ),
65      array(      array(
66        'data' => t('Project'),        'data' => storm_t('Project', 'timetracking'),
67        'field' => 'stt.project_title',        'field' => 'stt.project_title',
68      ),      ),
69      array(      array(
70        'data' => t('Title'),        'data' => storm_t('Title', 'timetracking'),
71        'field' => 'n.title',        'field' => 'n.title',
72      ),      ),
73      array(      array(
74        'data' => t('Date'),        'data' => storm_t('Date', 'timetracking'),
75        'field' => 'stt.trackingdate',        'field' => 'stt.trackingdate',
76        'sort' => 'desc',        'sort' => 'desc',
77      ),      ),
78      array(      array(
79        'data' => t('Duration (h)'),        'data' => storm_t('Duration (h)', 'timetracking'),
80        'style' => 'text-align: right;'        'style' => 'text-align: right;'
81      ),      ),
82      array(      array(
83        'data' => storm_icon_l('report', '', t('Reports'), '', array(), $report_attrs) .'&nbsp;'. storm_icon_add_node($i, $_GET),        'data' => storm_icon_l('report', '', storm_t('Reports', 'timetracking'), '', array(), $report_attrs) .'&nbsp;'. storm_icon_add_node($i, $_GET),
84        'class' => 'storm_list_operations',        'class' => 'storm_list_operations',
85      ),      ),
86    );    );
# Line 191  function stormtimetracking_list_filter() Line 191  function stormtimetracking_list_filter()
191    
192    $form['filter'] = array(    $form['filter'] = array(
193          '#type' => 'fieldset',          '#type' => 'fieldset',
194          '#title' => t('Filter'),          '#title' => storm_t('Filter', 'timetracking'),
195          '#collapsible' => TRUE,          '#collapsible' => TRUE,
196          '#collapsed' => TRUE,          '#collapsed' => TRUE,
197          '#theme' => 'stormtimetracking_list_filter',          '#theme' => 'stormtimetracking_list_filter',
# Line 212  function stormtimetracking_list_filter() Line 212  function stormtimetracking_list_filter()
212    while ($organization = db_fetch_object($r)) {    while ($organization = db_fetch_object($r)) {
213      $organizations[$organization->nid] = $organization->title;      $organizations[$organization->nid] = $organization->title;
214    }    }
215    $organizations = array(0 => t('All')) + $organizations;    $organizations = array(0 => storm_t('All', 'timetracking')) + $organizations;
216    $form['filter']['group1']['organization_nid'] = array(    $form['filter']['group1']['organization_nid'] = array(
217      '#type' => 'select',      '#type' => 'select',
218      '#title' => t('Organization'),      '#title' => storm_t('Organization', 'timetracking'),
219      '#default_value' => $organization_nid,      '#default_value' => $organization_nid,
220      '#options' => $organizations,      '#options' => $organizations,
221      '#attributes' => array('onchange' => "stormticket_organization_project_task_tickets(this, 'edit-project-nid', 'edit-task-nid', 'edit-ticket-nid', true, 'All')"),      '#attributes' => array('onchange' => "stormticket_organization_project_task_tickets(this, 'edit-project-nid', 'edit-task-nid', 'edit-ticket-nid', true, 'All')"),
# Line 230  function stormtimetracking_list_filter() Line 230  function stormtimetracking_list_filter()
230    while ($project = db_fetch_object($r)) {    while ($project = db_fetch_object($r)) {
231      $projects[$project->nid] = $project->title;      $projects[$project->nid] = $project->title;
232    }    }
233    $projects = array(0 => t('All')) + $projects;    $projects = array(0 => storm_t('All', 'timetracking')) + $projects;
234    $form['filter']['group1']['project_nid'] = array(    $form['filter']['group1']['project_nid'] = array(
235      '#type' => 'select',      '#type' => 'select',
236      '#title' => t('Project'),      '#title' => storm_t('Project', 'timetracking'),
237      '#default_value' => $project_nid,      '#default_value' => $project_nid,
238      '#options' => $projects,      '#options' => $projects,
239      '#process' => array('storm_dependent_select_process'),      '#process' => array('storm_dependent_select_process'),
# Line 242  function stormtimetracking_list_filter() Line 242  function stormtimetracking_list_filter()
242    
243    $tree = _stormtask_get_tree($project_nid);    $tree = _stormtask_get_tree($project_nid);
244    $tasks = _stormtask_plain_tree($tree);    $tasks = _stormtask_plain_tree($tree);
245    $tasks = array(0 => t('All')) + $tasks;    $tasks = array(0 => storm_t('All', 'timetracking')) + $tasks;
246    $form['filter']['group1']['task_nid'] = array(    $form['filter']['group1']['task_nid'] = array(
247      '#type' => 'select',      '#type' => 'select',
248      '#title' => t('Task'),      '#title' => storm_t('Task', 'timetracking'),
249      '#default_value' => $task_nid,      '#default_value' => $task_nid,
250      '#options' => $tasks,      '#options' => $tasks,
251      '#process' => array('storm_dependent_select_process'),      '#process' => array('storm_dependent_select_process'),
# Line 261  function stormtimetracking_list_filter() Line 261  function stormtimetracking_list_filter()
261    while ($ticket = db_fetch_object($r)) {    while ($ticket = db_fetch_object($r)) {
262      $tickets[$ticket->nid] = $ticket->title;      $tickets[$ticket->nid] = $ticket->title;
263    }    }
264    $tickets = array(0 => t('All')) + $tickets;    $tickets = array(0 => storm_t('All', 'timetracking')) + $tickets;
265    $form['filter']['group1']['ticket_nid'] = array(    $form['filter']['group1']['ticket_nid'] = array(
266      '#type' => 'select',      '#type' => 'select',
267      '#title' => t('Ticket'),      '#title' => storm_t('Ticket', 'timetracking'),
268      '#default_value' => $ticket_nid,      '#default_value' => $ticket_nid,
269      '#process' => array('storm_dependent_select_process'),      '#process' => array('storm_dependent_select_process'),
270      '#options' => $tickets,      '#options' => $tickets,
# Line 278  function stormtimetracking_list_filter() Line 278  function stormtimetracking_list_filter()
278    
279    $form['filter']['group2']['datefrom'] = array(    $form['filter']['group2']['datefrom'] = array(
280      '#type' => 'date',      '#type' => 'date',
281      '#title' => t('Date from'),      '#title' => storm_t('Date from', 'timetracking'),
282      '#default_value' => $datefrom,      '#default_value' => $datefrom,
283    );    );
284    
285    $form['filter']['group2']['dateto'] = array(    $form['filter']['group2']['dateto'] = array(
286      '#type' => 'date',      '#type' => 'date',
287      '#title' => t('Date to'),      '#title' => storm_t('Date to', 'timetracking'),
288      '#default_value' => $dateto,      '#default_value' => $dateto,
289    );    );
290    
291    $form['filter']['group2']['user'] = array(    $form['filter']['group2']['user'] = array(
292      '#type' => 'textfield',      '#type' => 'textfield',
293      '#title' => t('User'),      '#title' => storm_t('User', 'timetracking'),
294      '#size' => 25,      '#size' => 25,
295      '#default_value' => $trackinguser,      '#default_value' => $trackinguser,
296      '#autocomplete_path' => 'user/autocomplete',      '#autocomplete_path' => 'user/autocomplete',
# Line 299  function stormtimetracking_list_filter() Line 299  function stormtimetracking_list_filter()
299    $form['filter']['billable'] = array(    $form['filter']['billable'] = array(
300      '#type' => 'select',      '#type' => 'select',
301      '#title' => 'Billable',      '#title' => 'Billable',
302      '#options' => array('-' => t('all'), '1' => t('billable'), '0' => t('not billable')),      '#options' => array('-' => storm_t('all', 'timetracking'), '1' => storm_t('billable', 'timetracking'), '0' => storm_t('not billable', 'timetracking')),
303      '#default_value' => $_SESSION['stormtimetracking_list_filter']['billable'],      '#default_value' => $_SESSION['stormtimetracking_list_filter']['billable'],
304    );    );
305    
# Line 310  function stormtimetracking_list_filter() Line 310  function stormtimetracking_list_filter()
310    
311    $form['filter']['group3']['submit'] = array(    $form['filter']['group3']['submit'] = array(
312      '#type' => 'submit',      '#type' => 'submit',
313      '#value' => t('Filter'),      '#value' => storm_t('Filter', 'timetracking'),
314      '#submit' => array('stormtimetracking_list_filter_filter'),      '#submit' => array('stormtimetracking_list_filter_filter'),
315    );    );
316    
317    $form['filter']['group3']['reset'] = array(    $form['filter']['group3']['reset'] = array(
318      '#type' => 'submit',      '#type' => 'submit',
319      '#value' => t('Reset'),      '#value' => storm_t('Reset', 'timetracking'),
320      '#submit' => array('stormtimetracking_list_filter_reset'),      '#submit' => array('stormtimetracking_list_filter_reset'),
321    );    );
322    
323    $form['filter']['group3']['itemsperpage'] = array(    $form['filter']['group3']['itemsperpage'] = array(
324      '#type' => 'textfield',      '#type' => 'textfield',
325      '#title' => t('Items'),      '#title' => storm_t('Items', 'timetracking'),
326      '#size' => 10,      '#size' => 10,
327      '#default_value' => $itemsperpage,      '#default_value' => $itemsperpage,
328      '#prefix' => '<div class="container-inline">',      '#prefix' => '<div class="container-inline">',
# Line 353  function stormtimetracking_list_form_rep Line 353  function stormtimetracking_list_form_rep
353    $form['#prefix'] = '<div id="stormtimetracking_list_form_report" class="storm_list_form_report">';    $form['#prefix'] = '<div id="stormtimetracking_list_form_report" class="storm_list_form_report">';
354    $form['report'] = array(    $form['report'] = array(
355      '#type' => 'select',      '#type' => 'select',
356      '#title' => t('Reports'),      '#title' => storm_t('Reports', 'timetracking'),
357      '#options' => theme('stormtimetracking_list_form_report_reports'),      '#options' => theme('stormtimetracking_list_form_report_reports'),
358    );    );
359    
# Line 365  function stormtimetracking_list_form_rep Line 365  function stormtimetracking_list_form_rep
365      }      }
366      $form['language'] = array(      $form['language'] = array(
367        '#type' => 'select',        '#type' => 'select',
368        '#title' => t('Language'),        '#title' => storm_t('Language', 'timetracking'),
369        '#options' => $languages,        '#options' => $languages,
370      );      );
371    }    }
# Line 377  function stormtimetracking_list_form_rep Line 377  function stormtimetracking_list_form_rep
377    }    }
378    $form['submit'] = array(    $form['submit'] = array(
379      '#type' => 'submit',      '#type' => 'submit',
380      '#value' => t('Report'),      '#value' => storm_t('Report', 'timetracking'),
381    );    );
382    $form['#suffix'] = '</div>';    $form['#suffix'] = '</div>';
383    return $form;    return $form;

Legend:
Removed from v.1.9.4.6  
changed lines
  Added in v.1.9.4.7

  ViewVC Help
Powered by ViewVC 1.1.2