<?php /* Smarty version Smarty-3.1.11, created on 2017-08-31 18:18:23
         compiled from "application\views\templates\route.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2154959a7e9c2b69ac1-25331449%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4a5d3027b2d7dd60d4bae9b7d8987622b35bd9ef' => 
    array (
      0 => 'application\\views\\templates\\route.tpl',
      1 => 1504178302,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2154959a7e9c2b69ac1-25331449',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_59a7e9c2bdaf58_18221358',
  'variables' => 
  array (
    'data' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_59a7e9c2bdaf58_18221358')) {function content_59a7e9c2bdaf58_18221358($_smarty_tpl) {?><div class="row">
	<div class="col-md-12">
		<?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['route_details']==''){?>
					<h3 class="panel-title">
                 		<h2>
                 			<span class="fa fa-road"></span> Create New Route
                 		</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'];?>
route/">
						<div class=" col-sm-12">
							<div class="form-group">
                                <label class="col-sm-3 control-label">	New Route Name <span>*</span>
                                </label>
                                <div class="col-sm-9">    
                                	<div class="input-group">
                                        <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                       <textarea class="form-control" type="text"  id="name"  name="data[name]" required></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-12 col-xs-12">
							        <input type="submit" class="btn btn-primary pull-right" value="Save" name="route" ></button>
							    </div>
                            </div>
						</div>
					</form>
	            <?php }else{ ?>
	            	<h3 class="panel-title">
                 		<h2>
                 			<span class="fa fa-sitemap"></span> Edit Route
                 		</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'];?>
route/update/">
						<input type="hidden" id="id" name="data[id]" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['route_details']['id'];?>
">
						<div class=" col-sm-12">
							<div class="form-group">
                                <label class="col-md-3 col-xs-12 control-label">	 Route 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['route_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="route" ></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">
            			<span class="fa fa-road"></span> Route List
            		</h3>
            	</div>
                <table class="table datatable">
                	<thead>
                		<tr>
							<th>Name</th>
							<th>Action</th>
						</tr>
                	</thead>
					<tbody>
						<?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['route']) ? 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 mb_strtoupper($_smarty_tpl->tpl_vars['data']->value['route'][$_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'];?>
route/update/<?php echo $_smarty_tpl->tpl_vars['data']->value['route'][$_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'];?>
route/delete/<?php echo $_smarty_tpl->tpl_vars['data']->value['route'][$_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; ?>
					</tbody>
				</table>

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

 <?php }} ?>