<?php
$dashboardMenu = $this->dashboardMenu()->getDashboardModule($user_type_id); ?>

<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 203px;">

        <section class="sidebar">
            <!-- Sidebar user panel -->

            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">

                <?php if(isset($dashboardMenu)){
                foreach($dashboardMenu as $menu){
                      $menuUrl     = $menu['url'];
                      $icon_class  = $menu['icon_class'];
                      $moduleName = $menu['module_name'];
                      if($menu['url']!='' && $menu['action']!=''){
                            $href = $this->url($menu['url'], array('action' => $menu['action']));
                        }
                    ?>
                 <li>

                    <a href="<?php echo $href; ?>">
                        <i class="<?php echo $icon_class; ?>"></i> <span><?php echo $moduleName; ?></span>
                          <?php if(!empty($menu['submenu'])){ ?>
                         <i class="fa fa-angle-left pull-right"></i>
                          <?php } ?>

                    </a>

                    <?php if(!empty($menu['submenu'])){
                           foreach($menu['submenu'] as $submenu){
                               $href = '';
                               $subiconClass = $submenu['icon_class'];
                               $submoduleName = $submenu['module_name'];
                               if($submenu['url']!='' && $submenu['action']!=''){
                                   $href = $this->url($submenu['url'], array('action' => $submenu['action']));
                                   $href = str_replace('%2F','/',$href);
                               }
                        ?>

                        <ul class="treeview-menu">
                          <li><a href="<?php echo $href; ?>"><i class="<?php echo $subiconClass; ?>"></i> <span><?php echo $submoduleName; ?></span></a></li>

                      </ul>
                    <?php }} ?>
                </li>
                <?php }}else{ ?>
                
                <!--

                <li class="active">

                    <a href="<?php echo $this->url('dashboard'); ?>">
                        <i class="fa fa-dashboard"></i> <span style="color:green">Dashboard</span>
                    </a>

                </li>
                <li>
                    <a href="#">
                        <i class="fa fa-car"></i> <span>Vehicle Master</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>

                    <ul class="treeview-menu">
                        <li><a href="<?php echo $this->url('vehicletype', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Vehicle Type</span></a></li>
                        <li><a href="<?php echo $this->url('vehiclename', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Vehicle Name</span></a></li>
                        <li><a href="<?php echo $this->url('vehicleamenities', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Vehicle Amenities</span></a></li>
                        <li><a href="<?php echo $this->url('manage-payment-structure', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Payment Structure</span></a></li>
                        <li><a href="<?php echo $this->url('manage-documentation', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Documentation</span></a></li>
                        <li><a href="<?php echo $this->url('cancellation-policy', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Cancellation Policy</span></a></li>
                        <li><a href="<?php echo $this->url('manage-refund-policy', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Refund Policy</span></a></li>
                        <li><a href="<?php echo $this->url('manage-term-conditions', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Terms Conditions</span></a></li>
                        <li><a href="<?php echo $this->url('manage-transfer-master', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Transfer Master</span></a></li>
                        <li><a href="<?php echo $this->url('manage-city-instruction-master', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage City Instruction Master</span></a></li>
                        <li><a href="<?php echo $this->url('master-module', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Master Modules</span></a></li>
                    </ul>

                </li>
                <li class="treeview">
                    <a href="<?php echo $this->url('profile', array('action' => 'index')); ?>">
                        <i class="fa fa-user"></i>
                        <span style="color:green">Profile</span>
                    </a>
                </li>

                <li class="treeview">
                    <a href="<?php echo $this->url('bookinghistory', array('action' => 'index')); ?>">
                        <i class="fa fa-calendar"></i> <span style="color:blue">Booking History</span>

                    </a>

                </li>

                <li class="treeview">
                    <a href="<?php echo $this->url('cancellationdeadline', array('action' => 'index')); ?>">
                        <i class="fa fa-times"></i> <span style="color:green">Cancellation Deadline</span>
                    </a>
                </li>

                <li>
                    <a href="<?php echo $this->url('statementofaccount', array('action' => 'index')); ?>">
                        <i class="fa fa-bar-chart"></i> <span style="color:green">Statement of Account</span>
                    </a>
                </li>

                <li>
                    <a href="#">
                        <i class="fa fa-car"></i> <span>Vehicle Details</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>

                    <ul class="treeview-menu">
                        <li><a href="<?php echo $this->url('vehicle-details', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Vehicle</span></a></li>
                        <li><a href="<?php echo $this->url('vehicle-details', array('action' => 'vehicle-mapping')); ?>"><i class="fa fa-circle-o"></i> <span >Manage Vehicle Mapping </span></a></li>
                    </ul>

                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-group"></i>
                        <span>User Management</span>
                        <i class="fa fa-angle-left pull-right"></i>

                    </a>

                    <ul class="treeview-menu">
                        <li><a href="<?php echo $this->url('usermanagement', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> User</a></li>
                        <li><a href="<?php echo $this->url('usermanagement', array('action' => 'driver')); ?>"><i class="fa fa-circle-o"></i> Driver</a></li>
                        <li><a href="<?php echo $this->url('usermanagement', array('action' => 'vendor')); ?>"><i class="fa fa-circle-o"></i> Vender</a></li>

                    </ul>

                </li>


                <li>
                    <a href="#">
                        <i class="fa fa-money"></i> <span>Billing</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>

                    <ul class="treeview-menu">
                        <li><a href="<?php echo $this->url('billingmanagement', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i><span>Billing Management</span></a></li>
                        <li><a href="<?php echo $this->url('billingmanagement', array('action' => 'bill-invoice')); ?>"><i class="fa fa-circle-o"></i><span>Bill Invoice</span></a></li>
                    </ul>

                </li>


                <li>
                    <a href="<?php echo $this->url('credit', array('action' => 'index')); ?>">
                        <i class="fa fa-credit-card"></i> <span>Credit Request</span>
                    </a>
                </li>


                <li>
                    <a href="<?php echo $this->url('companyprice', array('action' => 'index')); ?>">
                        <i class="fa fa-inr"></i> <span style="color:green">Company Price</span>

                    </a>
                </li>

                <li>
                    <a href="<?php echo $this->url('markup', array('action' => 'index')); ?>">
                        <i class="fa fa-tag"></i> <span style="color:blue">Markup</span>
                    </a>
                </li>

                <li>
                    <a href="#">
                        <i class="fa fa-credit-card"></i> <span style="color:blue">Fare Management</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>

                    <ul class="treeview-menu">
                        <li><a href="<?php echo $this->url('cabfare', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Cab Fare </span></a></li>
                        <li><a href="<?php echo $this->url('cabfare', array('action' => 'vendor-fare')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Vendor Fare </span></a></li>
                        <li><a href="<?php echo $this->url('guidefare', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Guide Fare </span></a></li>
                        <li><a href="<?php echo $this->url('cabfare', array('action' => 'local-package-fare')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Add Local Package Fare </span></a></li>
                       

                    </ul>

                </li>

                <li>
                    <a href="<?php echo $this->url('payment', array('action' => 'index')); ?>">
                        <i class="fa fa-bank"></i> <span style="color:blue">Payment</span>
                    </a>
                </li>

                <li>
                    <a href="<?php echo $this->url('bid', array('action' => 'index')); ?>">
                        <i class="fa fa-money"></i> <span style="color:blue">Bid </span>
                    </a>
                </li>

                <li>
                    <a href="<?php echo $this->url('membership-package', array('action' => 'index')); ?>">
                        <i class="fa fa-user"></i> <span style="color:blue"> MemberShip Package </span>
                    </a>
                </li>

                <li>
                    <a href="#">
                        <i class="fa fa-umbrella"></i> <span style="color:blue">Tour Management</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="#"><i class="fa fa-circle-o"></i> Master</a>
                            <ul class="treeview-menu">
                                <li><a href="<?php echo $this->url('tour-type', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Manage Tour Type </span></a></li>
                                <li><a href="<?php echo $this->url('tour-inclusion', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Manage Tour Inclusions </span></a></li>
                                <li><a href="<?php echo $this->url('tour-exclusion', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Manage Tour Exclusions </span></a></li>
                            </ul>

                        </li>
                        <li><a href="<?php echo $this->url('tour-package', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> Manage Tour Packages</a></li>
                    </ul>
                </li>






                <li>
                    <a href="#">
                        <i class="fa fa-credit-card"></i> <span style="color:blue">CMS</span>
                        <i class="fa fa-angle-left pull-right"></i>
                    </a>

                    <ul class="treeview-menu">
                        <li><a href="<?php echo $this->url('menu', array('action' => 'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Menu Manager </span></a></li>
                        <li><a href="<?php echo $this->url('menu', array('action' => 'cms-pages')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Page Management </span></a></li>
                        <li><a href="<?php //echo $this->url('guidefare', array('action'=>'index')); ?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Theme Management </span></a></li>
                    </ul>
                </li>

                <li class="treeview">

                <a href="cancelation.html">
                    <i class="fa fa-wrench"></i> <span style="color:blue">Setup</span>
                    <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li><a href="<?php echo $this->url('global-settings', array('action'=>'index'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Global Settings </span></a></li>
                    <li><a href="<?php echo $this->url('userrolemanager', array('action'=>'index'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">User Role Manager </span></a></li>
                    <li><a href="<?php echo $this->url('userrolemanager', array('action'=>'department'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Department </span></a></li>
                    <li><a href="<?php echo $this->url('userrolemanager', array('action'=>'user-type-modules'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">User Type Modules </span></a></li>
                    <li><a href="<?php echo $this->url('theme-management', array('action'=>'index'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Theme Management </span></a></li>
                    <li><a href="<?php echo $this->url('templatesettings', array('action'=>'mail-template'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Mail Template </span></a></li>
                    <li><a href="<?php echo $this->url('templatesettings', array('action'=>'sms-template'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Sms Template </span></a></li>
                    <li><a href="<?php echo $this->url('templatesettings', array('action'=>'index'));?>"><i class="fa fa-circle-o"></i> <span style="color:blue">Template Settings </span></a></li>
                    
                </ul>
            </li>-->
                <?php } ?>


            </ul>
        </section>

    </div>
    <!-- /.sidebar -->
</aside>