54 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			PHTML
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			PHTML
		
	
	
		
			Executable File
		
	
	
<div class="custombanner-body">
 | 
						|
	<div class="width-100 div-button-add">
 | 
						|
		<a class="button-add" href="<?php echo $this->getUrl('*/*/new'); ?>">Add New</a>
 | 
						|
	</div>
 | 
						|
	<div class="width-100">
 | 
						|
		<h1>This is widget of controller</h1>
 | 
						|
	</div>
 | 
						|
	<div class="width-100">
 | 
						|
		<table class="table-listing">
 | 
						|
			<thead>
 | 
						|
				<tr class="table-header">
 | 
						|
					<th class="width-5">ID</th>
 | 
						|
					<th class="width-15">Title</th>
 | 
						|
					<th class="width-15">Image</th>
 | 
						|
					<th class="width-30">Description</th>
 | 
						|
					<th class="width-15">URL Redirect</th>
 | 
						|
					<th class="width-10">Status</th>
 | 
						|
					<th class="width-10">Action</th>
 | 
						|
				</tr>
 | 
						|
			</thead>
 | 
						|
			<tbody>
 | 
						|
				<?php if (count($block->getBannerData()) == 0): ?>
 | 
						|
					<td class="no-records-announce" colspan="7">We couldn't find any records.</td>
 | 
						|
				<?php else: ?>
 | 
						|
					<?php foreach ($block->getBannerData() as $item): ?>
 | 
						|
						<tr>
 | 
						|
							<td class="width-5"><?= $item["id"] ?></td>
 | 
						|
							<td class="width-15"><?= $item["title"] ?></td>
 | 
						|
							<td class="width-15">
 | 
						|
								<?php if($item["image_url"] != ""): ?>
 | 
						|
									<img class="image-banner" src="<?= $block->getImagePath().$item["image_url"]; ?>" alt="Banner"/>
 | 
						|
								<?php else: ?>
 | 
						|
									<img class="image-banner" src="<?= $this->getViewFileUrl('IpSupply_CustomBanner::images/prology.png'); ?>">
 | 
						|
								<?php endif; ?>
 | 
						|
								
 | 
						|
							</td>
 | 
						|
							<td class="width-30"><?= $item["description"] ?></td>
 | 
						|
							<td class="width-15"><a href="<?= $item['url_redirect'] ?>" target="_blank"><?= $item["url_redirect"] ?></a></td>
 | 
						|
							<td class="width-10"><?= $item["status"] ?></td>
 | 
						|
							<td class="width-10">
 | 
						|
								<a class="btn-edit" href="<?php echo $this->getUrl('*/*/edit/id/'.$item['id']); ?>">
 | 
						|
									<img class="icon-edit" src="<?= $this->getViewFileUrl('IpSupply_CustomBanner::images/edit-text.png'); ?>" />
 | 
						|
								</a>
 | 
						|
								<a class="btn-delete" href="<?php echo $this->getUrl('*/*/delete/id/'.$item['id']); ?>">
 | 
						|
									<img class="icon-edit" src="<?= $this->getViewFileUrl('IpSupply_CustomBanner::images/bin.png'); ?>" />
 | 
						|
								</a>
 | 
						|
							</td>
 | 
						|
						</tr>
 | 
						|
					<?php endforeach; ?>
 | 
						|
				<?php endif; ?>
 | 
						|
			</tbody>
 | 
						|
		</table>
 | 
						|
	</div>
 | 
						|
</div>
 |