<?php /* Smarty version Smarty-3.1.11, created on 2017-11-08 11:43:55
         compiled from "application\views\templates\category.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1796359a803479f8620-35181687%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ad5e9dc897ff665858c621ab58bfeaebc665ed2b' => 
    array (
      0 => 'application\\views\\templates\\category.tpl',
      1 => 1510116233,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1796359a803479f8620-35181687',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_59a80347a8cd47_71107238',
  'variables' => 
  array (
    'data' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_59a80347a8cd47_71107238')) {function content_59a80347a8cd47_71107238($_smarty_tpl) {?><div class="page-content-wrap">                
	<div class="row">
		<div class="col-md-12">

            <!-- START DEFAULT DATATABLE -->
            <?php if ($_smarty_tpl->tpl_vars['data']->value['message']!=''){?>
	            <div class="alert alert-info alert-dismissible fade in" role="alert">
					<button type="button" class="close" data-dismiss="alert" aria-label="Close">
						<span aria-hidden="true">×</span>
					</button>
					<strong><?php echo $_smarty_tpl->tpl_vars['data']->value['message'];?>
.</strong>
				</div>
            <?php }?>
	        <div class="panel panel-default">
				<div class="panel-body">
					<?php if ($_smarty_tpl->tpl_vars['data']->value['category_details']==''){?>
						<h3 class="panel-title">
	                 		<h2>
	                 			<span class="fa fa-sitemap"></span> Create New Category
	                 		</h2>
	                 	</h3>
						<form class="form-horizontal" name="services-form" id="services-form" enctype="multipart/form-data" method="post" action="<?php echo $_smarty_tpl->tpl_vars['data']->value['base_url'];?>
category/">
							<div class=" col-sm-12">
								<div class="form-group">
	                                <label class="col-md-3 col-xs-12 control-label">	New Category Name <span>*</span>
	                                </label>
	                                <div class="col-md-6 col-xs-12">    
	                                	<div class="input-group">
	                                        <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
	                                       <input  class="form-control" type="text" id="name" name="data[name]" maxlength="55"   required>
	                                    </div>
	                                </div>
	                                <div class="col-sm-2 col-xs-12">
								        <input type="submit" class="btn btn-primary pull-right" value="Save" name="category" ></button>
								    </div>
	                            </div>
							</div>
						</form>
		            <?php }else{ ?>
		            	<h3 class="panel-title">
	                 		<h2>
	                 			<span class="fa fa-sitemap"></span> Edit Category
	                 		</h2>
	                 	</h3>
						<form class="form-horizontal" name="services-form" id="services-form" enctype="multipart/form-data" method="post" action="<?php echo $_smarty_tpl->tpl_vars['data']->value['base_url'];?>
category/update/">
							<input type="hidden" id="id" name="data[id]" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['category_details']['id'];?>
">
							<div class=" col-sm-12">
								<div class="form-group">
	                                <label class="col-md-3 col-xs-12 control-label">	 Category Name <span>*</span>
	                                </label>
	                                <div class="col-md-6 col-xs-12">    
	                                	<div class="input-group">
	                                        <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
	                                       <input  class="form-control" type="text" id="name" name="data[name]" maxlength="55"  value="<?php echo $_smarty_tpl->tpl_vars['data']->value['category_details']['name'];?>
"   required>
	                                    </div>
	                                </div>
	                                <div class="col-sm-2 col-xs-12">
								        <input type="submit" class="btn btn-primary pull-right" value="Update" name="category" ></button>
								    </div>
	                            </div>
							</div>
						</form>
					 <?php }?>
	            </div>
	        </div>
            <div class="panel panel-default">
				<div class="panel-body">
                	<div class="panel-heading">                                

                    <h3 class="panel-title"> <h2><span class="fa fa-sitemap"></span> Category List</h2></h3>
                     
                </div>
                    <table class="table datatable">

                    	<tr>
                    		<th>Sr No.</th>
                    		<th>Id</th>
							<th>Name</th>
							<th>Action</th>
						</tr>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['i'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['data']->value['category']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?>
                            <tr>
                            	<td><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['i']['index']+1;?>
</td>
                            	<td><?php echo $_smarty_tpl->tpl_vars['data']->value['category'][$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['id'];?>
</td>
                                <td><?php echo mb_strtoupper($_smarty_tpl->tpl_vars['data']->value['category'][$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['name'], 'UTF-8');?>
</td>
                               	<td>
                               		<a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['base_url'];?>
category/update/<?php echo $_smarty_tpl->tpl_vars['data']->value['category'][$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['id'];?>
">
                                		 <span class="btn btn-primary"><i class="fa fa-pencil"></i></span>
                                	</a>
                                	<a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['base_url'];?>
category/delete/<?php echo $_smarty_tpl->tpl_vars['data']->value['category'][$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]['id'];?>
">
                                		 <span class="btn btn-danger"><i class="fa fa-trash-o"></i></span> 
                                	</a>
                                </td>
                            </tr>   
                        <?php endfor; endif; ?>
						
                    </table>

                </div>

            </div>

            <!-- END DEFAULT DATATABLE -->

        </div>
	</div>                                
</div>
 
 

 <?php }} ?>