<?php namespace App\Http\Controllers;?>
<!DOCTYPE html>
<html>

<head>

    <title>Management Team | Admin | Milijuli </title>
    <?php echo $__env->make('Admin.Parts.MetaCSS', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</head>

<body>

<!--====================================================
                     MAIN NAVBAR
======================================================-->
    <?php echo $__env->make('Admin.Parts.TopHeader', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<!--====================================================
                    PAGE CONTENT
======================================================-->
    <div class="page-content d-flex align-items-stretch">

        <!--***** SIDE NAVBAR *****-->
        <?php echo $__env->make('Admin.Parts.LeftNav', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

        <div class="content-inner form-cont">
            <div class="row">
                <div class="col-md-12">
                    <div class="row">
                        <div class="col-md-6 col-lg-6">
                           <?php if(session('info')): ?>
                           <div class="alert alert-success" style="text-transform: capitalize;">
                              <?php echo e(session('info')); ?>

                           </div>
                           <?php endif; ?>
                           <?php
                               $boards=session('avisd');
                           ?>
                           <?php if($errors->any()): ?>
                           <div class="alert alert-danger">
                              <ul>
                                 <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                 <li><?php echo e($error); ?></li>
                                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                              </ul>
                           </div>
                           <?php endif; ?>
                        </div>
                     </div>
                    <div class="card form" id="form1">
                        <div class="card-header">
                            <h3>Add Management Team</h3>
                        </div>
                        <br>
                        <?php if(!$boards): ?>
                        <form action="admin_team_member" method="post" enctype="multipart/form-data">
                            <?php else: ?>
                            <form action="<?php echo e(url('admin_team_member/update',array($boards->id))); ?>" method="post" enctype="multipart/form-data">
                            <?php endif; ?>
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label for="title">Name<i style="color: red">*</i></label>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Name" name="name" value="<?php if($boards) {echo $boards->name;}?>" required>
                                        
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Name in Nepali</label>
                                        <a rel="nofollow" href="http://naya.com.np" title="Nepali Social Network" class="naya_convert" data-site="dark"></a>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Name in Nepali" name="name_nepali" value="<?php if($boards) {echo $boards->name_nepali;}?>">
                                        
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Position<i style="color: red">*</i></label>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Position" name="position" value="<?php if($boards) {echo $boards->position;}?>" required>
                                        
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Position in Nepali</label>
                                        <a rel="nofollow" href="http://naya.com.np" title="Nepali Social Network" class="naya_convert" data-site="dark"></a>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Position in Nepali" name="position_nepali" value="<?php if($boards) {echo $boards->position_nepali;}?>">
                                        
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Position Order</label>
                                        <input type="number" class="form-control" id="title" placeholder="Enter Position Order" name="position_order" value="<?php if($boards) {echo $boards->position_order;}?>">
                                        
                                    </div>
                                    
                                    

                                    <div class="form-group">
                                        <label for="exampleInputFile">Image <i style="margin-left: 20px; font-size: 10px;">single image</i></label>
                                        
                                        <input type="file" class="form-control-file" id="exampleInputFile" name="image">
                                        
                                        <?php if(  $boards): ?>
                                        <div class="form-group"  >
                                          <img src="img/Team/<?php echo e($boards->token); ?>.jpg?t=<?php echo e(rand()); ?>" width="250" height="150">
                                        </div>
                                        <?php endif; ?>
                                       
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Facebook</label>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Facebook URL" name="facebook" value="<?php if($boards) {echo $boards->facebook;}?>">
                                        
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Instagram</label>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Instagram URL" name="instagram" value="<?php if($boards) {echo $boards->instagram;}?>" >
                                        
                                    </div>

                                    <div class="form-group">
                                        <label for="title">Google plus</label>
                                        <input type="text" class="form-control" id="title" placeholder="Enter Google plus URL" name="google_plus" value="<?php if($boards) {echo $boards->google_plus;}?>" >
                                        
                                    </div>

                                  
                                    
                                </div>
                                
                            </div>
                            <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                            
                            <button type="reset" class="btn btn-general btn-white">Cancel</button>
                            <button type="submit" class="btn btn-general btn-blue mr-2"><?php if($boards){echo "Update";}else {echo "Save";}?></button>
                        </form>
                    </div>

       <div class="card form" id="form1">           
        <div class="row">
          <div class="col-xs-12">
            <div class="box">
              <div class="box-header">
                <h3 class="box-title">Data Table</h3>
              </div>
             <!-- /.box-header -->
             <div class="box-body" >
              <table id="example2" class="table table-bordered table-hover">
                <thead>
                  <tr>
                  <th width="5%">SN</th>
                
                  <th width="25%">Name</th>
                  <th width="20%">Position</th>
                  <th width="30%">Position Order</th>
                  <th width="20%">Action</th>
                </tr>
                </thead>
                <tbody>
     
                  <tbody>
                  
                    <?php
                    echo AdminlogController::table_generator('team_members',array('name','position','position_order'), 'admin_team_member','Team');?>
  
           
                </tbody>
               
              </table>
            </div>
            <!-- /.box-body -->
            </div>
          </div>
        </div>
    </div>

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

<?php echo $__env->make('Admin.Parts.Js', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</body>

</html>
