function _display_results(SearchResult $result, $result_header = '')
{
    $proj_count = $result->project_count();
    $proj_plural = $proj_count == 1 ? '' : 's';
    $task_count = $result->task_count();
    $task_plural = $task_count == 1 ? '' : 's';
    $project_results = new Template('results');
    $result_header = $result_header == '' ? $result->name() : $result_header;
    $project_results->set('result_header', $result_header, 'project_header', $proj_count . ' Project' . $proj_plural, 'project_results', $result->projects(), 'task_header', $task_count . ' Task' . $task_plural, 'task_results', $result->tasks());
    $project_results->show();
}