<main>
    <div style="display: grid; gap:0.5rem; grid-template-columns:repeat(2,1fr);">
		<?php if (auth()->user()->can_edit_by_controller($controller)) : ?>
    		<?php if(!(null == $urltonew || empty($urltonew))): ?>
            <div style="grid-column:1; grid-row:1;">
                <a style="margin-left:25px;" class="button" href="<?= url_to($urltonew) ?>">New</a>
            </div>
            <div style="grid-column:2; grid-row:1;">
                <h1><?= $tabulatortitle ?></h1>
            </div>
            <?php endif; ?>
        <php else: ?>
            <div style="grid-column:1 / SPAN 2; grid-row:1;">
                <h1><?= $tabulatortitle ?></h1>
            </div>
		<?php endif; ?>
	
        <div style="grid-column:1 / SPAN 2; grid-row:2;">
            <div id="wrapper" class="index-div"></div>
        </div>
    </div>
</main>