<?php $pageTitle='Crystal scores';
include realpath(__DIR__).'/../../core/_common/header.php'; ?>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded',function(){

    const headers = ['Name', 'Scoring system'];
    const cellTemplates = ['<span style="display:inline-block;padding-left:0.5em;border-left:20px solid #' +
            '{{color}}"><a href="/crystalscore/{{id}}">{{name}}</a>',
        '<a href="/crystalscoringsystem/{{crystalscoringsystemid}}">{{crystalscoringsystemname}}</a></span>'
    ];
    ui.grid().box({
		classes:'r1 c1 h3 w3',
		url:'/api/crystalscore?sortby=name',
		headers:headers,
		cellTemplates:cellTemplates
	});


});
</script>
<?php include realpath(__DIR__).'/../../core/_common/footer.php';