private static function renderReport(common_report_Report $report, array $childRenderedReports = array(), $nesting = 0, $leaf = false) {
        
        switch ($report->getType()) {
            
            case common_report_Report::TYPE_SUCCESS:
                $typeClass = 'success';
            break;
            
            case common_report_Report::TYPE_WARNING:
                $typeClass = 'warning';
            break;
            
            case common_report_Report::TYPE_ERROR:
                $typeClass = 'error';
            break;
            
            default:
                $typeClass = 'info';
            break;
        }
        
        $openingTag = '<div class="feedback-' . $typeClass . ' feedback-nesting-' . $nesting . ' ' . (($leaf === true) ? 'leaf' : 'hierarchical') . ' tao-scope">';
        $leafIcon = ($leaf === true) ? ' leaf-icon' : ' hierarchical-icon';
        $icon = '<span class="icon-' . $typeClass . $leafIcon . '"></span>';
        $message = nl2br(_dh($report->__toString()));
        $endingTag = '</div>';
        $okButton = '<p><button id="import-continue" class="btn-info"><span class="icon-right"></span>' . __("Continue") . '</button></p>';
        
        // Put all the children renderings together.
        $content = implode('', $childRenderedReports);
        return $openingTag . $icon . $message . $content . (($nesting != 0) ? '' : $okButton) . $endingTag;
    }