<div class="p5">
	[{if $error_message}]
		<p class="p5 mt5 [{if $friendly_error}]box-blue[{else}]box-red[{/if}]">[{if $friendly_error}]<img src="[{$dir_images}]icons/silk/information.png" class="vam" /> [{/if}]<span class="vam">[{$error_message}]</span></p>
	[{else}]
		[{if $report_description}]
        <p class="ml10 mr10">[{$report_description}]</p>
		[{/if}]

		<div id="table_[{$unique_id}]" class="mt10"></div>
        [{if isset($compressedMultivalueCategories) && $compressedMultivalueCategories == 1}]
            <div class="mt10 p10 text-blue">
                <img src="[{$dir_images}]axialis/basic/button-info.svg" class="vam mr5" />
                [{isys type="lang" ident="LC__REPORT__VIEW__GROUPING_SORTING_HINT"}]
            </div>
        [{/if}]
		<script>
            [{include file="`$report_assets_dir`js/report.js"}]

			var reportData = JSON.parse('[{$report_json|escape:"javascript"}]');

			if (reportData.length > 0) {
				new Lists.ReportList('table_[{$unique_id}]', {
					data:           reportData,
                    focusFilter:    false,
					filter:         "top",
					paginate:       "top",
					pageCount:      [{$items_per_page|default:25}],
					draggable:      false,
					checkboxes:     false,
                    [{if isset($compressedMultivalueCategories) && $compressedMultivalueCategories == 1}]
                    filter:         false,
                    // Disable sorting for compressed multivalue mode
                    unsortedColumn: JSON.parse('[{$columnNames|escape:"javascript"}]')
                    [{/if}]
				});
			} else {
                $('table_[{$unique_id}]')
                    .insert(new Element('div', { className: 'p5 text-blue display-flex align-items-center' })
                        .update(new Element('img', { src: window.dir_images + 'axialis/basic/button-info.svg', className: 'mr5', alt: '' }))
                        .insert(new Element('p').update('[{isys type="lang" ident="LC__REPORT__POPUP__REPORT_PREVIEW__EMPTY_RESULT"}]')));
            }
		</script>
	[{/if}]
</div>

<style type="text/css">
	#table_[{$unique_id}] {
		overflow: hidden;
		overflow-x: auto;
	}
</style>
