
<p><?php echo $this->link('/admin/restaurant/menu/addmenu', '+ Add Menu')?></p><br>


<?php if (empty ($this->view->menus)): ?>
<div class="notice_message">
	You have no active menus. Click on the status button to enable a menu.
</div>
<?php endif; ?>




<?php if (!empty ($this->view->menus)): ?>


	<table>
		<tr>
			<th>Menu Name</th>
			<th>Status</th>
			<th>Action</th>
		</tr>

		<?php foreach ($this->view->menus as $key => $val): ?>
		<tr>

			<td><?php echo $val['name'] ?></td>
			<td>
				<?php if ($val['active'] == 1): ?>
					<a title="Status Active: Click to de-activate" href="/admin/restaurant/menu/togglefoodmenu/<?php echo $val['id'] ?>"><?php echo $this->image('restaurant/img/active.png', 'active image'); ?></a>
				<?php else: ?>
					<!--<a title = "Status Inactive: Click to activate" href="/admin/restaurant/menu/toggle/<?php echo $val['id'] ?>"><img alt="Menu Inactive" src="restaurant/img/inactive.png"></a>-->
						<a title="Status Inactive: Click to activate" href="/admin/restaurant/menu/togglefoodmenu/<?php echo $val['id'] ?>"><?php echo $this->image('restaurant/img/inactive.png', 'inactive image'); ?></a>
				<?php endif; ?>
			</td>
			<td>

				<a href="/admin/restaurant/foodmenu/<?php echo $val['id'] ?>" title="edit menu"><?php echo $this->image('restaurant/img/edit-4.png', 'edit image') ?></a>
				<a onclick="return confirm('Delete this menu?');" href="/admin/restaurant/deletemenu/menu/<?php echo $val['id'] ?>" title="delete"><?php echo $this->image('restaurant/img/edit-delete-2.png'); ?></a>

			</td>

		</tr>
		<?php endforeach; ?>
	</table>


<?php else: ?>

	<div class="notice_message">There are no menus created yet</div>

<?php endif; ?>
