<style>
.control-label {  
  padding-top: 0 !important;
}
.div-left {  
  width: 100%;
}
</style>
<style>
@media only screen and (max-width: 480px), (min-device-width: 300px) and (max-device-width: 480px) {
	.table-checkable tr > td:first-child, .table-checkable tr > th:first-child {
	  max-width: 100%;  
	}
	td:nth-of-type(1)::before {
	  content: "";
	}
}
</style>
<script>
function showDiv() {	
	$('#add_div').show();
}
</script>
<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">View Task Project</div>                                
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.php?page=home">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="index.php?page=manage_user_tasks">manage Tasks</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">View Task</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header>Project #<?php echo $resEdit['id'];?></header>                                      
	                                <div style="float: right;margin-left: 10px;margin-right: 5px;">Status: <?php echo ucfirst($resEdit['status']); ?></div>                               
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($_REQUEST['success'])){ ?>                                		
                                		<div class="alert alert-success"><?php echo urldecode($_REQUEST['success']); ?></div>
                                	<?php } else if(isset($error)){ ?>                                		
                                		<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } ?>                               	
                                	                              		
                                		                                      	                          	                                	
                                    <form action="" id="form_staff_add" class="form-horizontal" method="post">                                    	
                                        <div class="form-body div-left">                                        	                                        	 
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">User</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo getUserName($resEdit['user_id']);?>
                                                </div>
                                            </div>  
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Category</label>
                                                <div class="col-md-4">                                                    
                                                    <?php echo getCategory($resEdit['category_id']);?>
                                                </div>
                                            </div>  
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Order Date</label>
                                                <div class="col-md-4">        
                                                	<?php echo getFormattedDate($resEdit['date']);?>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Details</label>
                                                <div class="col-md-4">        
                                                	<?php echo $resEdit['details'];?>                                            
                                                </div>
                                            </div>
                                            <?php if($resEdit['image']!=''){ ?>
                                            <div class="form-group row">
                                                <img style="max-width:500px;" src="<?php echo TASK_IMG_URL.$resEdit['image'];?>">
                                            </div>
                                            <?php } ?>
                                            <div class="form-group col-12">
                                                <b>Add Current Status of Project</b>
                                            </div>                      
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Status</label>
                                                <div class="col-md-4">        
                                                	<input placeholder="15 chars max." maxlength="15" class="form-control" type="text" name="status" id="status" value="<?php if(isset($_POST['status']) && $_POST['status']!=''){ echo $_POST['status']; }?>">                                       
                                                </div>
                                            </div>                     
                                            <div class="form-group row">
                                                <div class="col-md-12">     
                                                	<textarea class="col-12" placeholder="Enter description here.." name="stat_description" id="stat_description" cols="20" rows="6" ><?php if(isset($_POST['stat_description']) && $_POST['stat_description']!=''){ echo $_POST['stat_description']; }?></textarea>   
                                                </div>
                                            </div>
                                            <div class="form-group col-12 text-center">
                                                <input type="submit" name="submit" id="submit" value="Submit">    
                                            </div>
                                            
                                                                                        
                                        </div>  
                                                                              
                                      	
                                    </form>
                                </div>
                                
                                
                               
                                
                                <div class="card card-topline-red">
                                <div class="card-head">
                                    <header>Project Status</header>                                    
                                </div>
                                <div class="card-body ">                                    
                                    <?php if(mysqli_num_rows($statRs)>0){ ?>
                                    <table class="table table-striped table-bordered table-hover table-checkable order-column" style="width: 100%" id="example4">
                                        <thead>
                                            <tr>                                                
                                                <th> Proj. ID </th>
                                                <th> Date </th>
                                                <th> Status </th>
                                                <th> Description </th> 
                                                <th> Actions </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        	<?php while($statRec = mysqli_fetch_array($statRs)){ ?> 
                                            <tr class="odd gradeX">                                                
                                                <td><?php echo '#'.$statRec['task_id']; ?></td>
                                                <td><?php echo getFormattedDate($statRec['date']); ?></td>
                                                <td><?php echo $statRec['status']; ?></td>
                                                <td><?php echo $statRec['description']; ?></td>     
                                                <td class="valigntop">
                                                    <div class="btn-group">
                                                        <button class="btn btn-xs deepPink-bgcolor dropdown-toggle no-margin" type="button" data-toggle="dropdown" aria-expanded="false"> Actions
                                                            <i class="fa fa-angle-down"></i>
                                                        </button>
                                                        <ul class="dropdown-menu pull-left" role="menu">                                                        	
                                                            <li>
                                                               <!-- <a  onclick="return confirm('Are you sure to delete this item?');" href="index.php?page=manage_projects&action=delete&id=<?php echo $resDetails['id']; ?>&p=<?php echo $p; ?>">
                                                                    <i class="icon-docs"></i> Delete </a>-->
                                                            </li>                                                           
                                                        </ul>
                                                    </div>
                                                </td>
                                            </tr>
                                            <?php } ?>                                            
                                        </tbody>
                                    </table>                                    
                                    <?php } else { ?>
                                    	<div class="alert alert-danger">Sorry! No Status details Found.</div>					        		
					        		<?php }	?> 
                                </div>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                                              
                            </div>
                        </div>
                        
                        
                        
                        
                        
                    </div>
	</div>
</div>
