<?= $this->extend("layouts/default") ?>
<?= $this->section("title") ?>Roast Levels<?= $this->endSection() ?>
<?= $this->section("content") ?>


<?= view(
	"layouts/bcr-nav",
	[
		"title" => "Roast Levels",
		"controller" => "Roastlevels",
		"links" => [
			"New" =>  ["url" => url_to("Roastlevels::new"), "auth_check" => true]
		]
	]
) ?>

<div class="index-div">
	<table>
		<tr>
			<th></th>
			<th>ID</th>
			<th>Roast Level</th>
			<th>Last Updated</th>
			<th>Updated By</th>

			<?php
			foreach ($roastlevels as $roastlevel) : ?>
		<tr>
			<td>
				<a href="<?= site_url('/roastlevels/' . $roastlevel->RoastLevelID) ?>">
					<button>View</button>
				</a>
			</td>
			<td>
				<?= $roastlevel->RoastLevelID ?>
			</td>
			<td>
				<?= esc($roastlevel->RoastLevel) ?>
			</td>
			<td>
				<?= $roastlevel->lastupdated ?>
			</td>
			<td>
				<?= esc($roastlevel->username) ?>
			</td>
		</tr>
	<?php
			endforeach; ?>

	</table>

</div>
<?= $this->endSection() ?>