formatAnnotations() public static method

The array which is passed to the method will be modified.
public static formatAnnotations ( &$ann )
$ann array the annotation array (userid => (time, costs) )
Esempio n. 1
0
     // Load data and return it
 // Load data and return it
 case 'reload':
     $view->assign('exportData', export_get_data($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities, false, $reverse_order, $default_location, $filter_cleared, $filter_type, false, $filter_refundable));
     $view->assign('total', Kimai_Format::formatDuration($database->get_duration($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities, $filter_cleared)));
     $ann = export_get_user_annotations($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities);
     Kimai_Format::formatAnnotations($ann);
     $view->assign('user_annotations', $ann);
     $ann = export_get_customer_annotations($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities);
     Kimai_Format::formatAnnotations($ann);
     $view->assign('customer_annotations', $ann);
     $ann = export_get_project_annotations($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities);
     Kimai_Format::formatAnnotations($ann);
     $view->assign('project_annotations', $ann);
     $ann = export_get_activity_annotations($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities);
     Kimai_Format::formatAnnotations($ann);
     $view->assign('activity_annotations', $ann);
     $view->assign('timeformat', $timeformat);
     $view->assign('dateformat', $dateformat);
     if (isset($kga['user'])) {
         $view->assign('disabled_columns', export_get_disabled_headers($kga['user']['userID']));
     }
     echo $view->render("table.php");
     break;
     // Export as html file
 // Export as html file
 case 'export_html':
     $database->user_set_preferences(array('print_summary' => isset($_REQUEST['print_summary']) ? 1 : 0, 'reverse_order' => isset($_REQUEST['reverse_order']) ? 1 : 0), 'ki_export.print.');
     $exportData = export_get_data($in, $out, $filterUsers, $filterCustomers, $filterProjects, $filterActivities, false, $reverse_order, $default_location, $filter_cleared, $filter_type, false, $filter_refundable);
     $timeSum = 0;
     $wageSum = 0;
Esempio n. 2
0
File: init.php Progetto: kimai/kimai
if (isset($kga['customer'])) {
    $customers = array($kga['customer']['customerID']);
} else {
    $users = array($kga['user']['userID']);
}
// Get the total amount of time shown in the table.
$total = Kimai_Format::formatDuration($database->get_duration($in, $out, $users, $customers, null));
$view->assign('total', $total);
$view->assign('exportData', export_get_data($in, $out, $users, $customers));
// Get the annotations for the user sub list.
$userAnnotations = export_get_user_annotations($in, $out, $users, $customers);
Kimai_Format::formatAnnotations($userAnnotations);
$view->assign('user_annotations', $userAnnotations);
// Get the annotations for the customer sub list.
$customerAnnotations = export_get_customer_annotations($in, $out, $users, $customers);
Kimai_Format::formatAnnotations($customerAnnotations);
$view->assign('customer_annotations', $customerAnnotations);
// Get the annotations for the project sub list.
$projectAnnotations = export_get_project_annotations($in, $out, $users, $customers);
Kimai_Format::formatAnnotations($projectAnnotations);
$view->assign('project_annotations', $projectAnnotations);
// Get the annotations for the activity sub list.
$activityAnnotations = export_get_activity_annotations($in, $out, $users, $customers);
Kimai_Format::formatAnnotations($activityAnnotations);
$view->assign('activity_annotations', $activityAnnotations);
// Get the columns the user had disabled last time.
if (isset($kga['user'])) {
    $view->assign('disabled_columns', export_get_disabled_headers($kga['user']['userID']));
}
$view->assign('table_display', $view->render("table.php"));
echo $view->render('main.php');