<? global $vis_language; ?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
    <div class="col-sm-6" id="vis_header">
        <h3 class="m-b-xs text-black"><? echo $org_details['group_name'];?></h3>
        <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
            <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
			<li><a class="link" href="#/client/view_clients/<? echo $vis_language['TXTCLIENTS']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTCLIENTS']; ?>',{'vis_module':'client','vis_operation':'view_clients'});"><? echo $vis_language['TXTCLIENTS']; ?></a></li>
            <li><a class="link" href="#/client/view_client_group/<? echo $vis_language['TXTORGANIZATION']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTORGANIZATION']; ?>',{'vis_module':'client','vis_operation':'view_client_group'});"><? echo $vis_language['TXTORGANIZATION']; ?></a></li>
            <li class="active"><? echo $org_details['group_name'];?></li>
        </ul>
    </div>
    

</section>
<section class="row m-b m-l-none m-r-none b-t b-light">
    <div class="col-md-2">
        <div class="wrapper text-center">
            <div class="thumb-lg padder-v m-t-lg avatar m-b-sm">
                <img src="<? echo VIS_PATH.'design/images/organisation.png'; ?>" class="bg-white img-responsive ">
            </div>
             <div>
				 

				 <span id="approve_label" class="<? if($org_details['is_enable']==1){ echo "label vh-green-bg inline"; }else{ echo "label label-default inline";}?> "> <? if($org_details['is_enable']==1){ echo $vis_language['TXTENABLE']; }else {echo $vis_language['TXTDISABLE']; } ?></span>
				
			</div>
        </div>
        
    </div>
    <div class="col-md-6" id="short_summary"><? include(VIS_PATH_TEMPLATE.'org_short_summary.php');?></div>
    
</section>
<section class="padder">
    <section class="panel panel-default">
		    
        <header class="panel-heading text-right bg-light clear">
            <ul class="nav nav-tabs pull-left"  id="tabs">
            
                <li  id="summary" class="active"><a data-toggle="tab" oncontextmenu="return false;" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'client', 'vis_operation':'get_orgsummary', 'vis_action':'details', 'vis_organization_id':<? echo $org_details['group_id']; ?>});set_active_tab('summary');" href="#vis_details_list" ><? echo $vis_language['TXTSUMMARY']; ?></a></li>
                
                <li id="profile"><a data-toggle="tab" oncontextmenu="return false;" href="#vis_details_list" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'client', 'vis_operation':'get_organizationdetails', 'vis_action':'details', 'vis_organization_id':<? echo $org_details['group_id']; ?>});set_active_tab('profile');"><? echo $vis_language['TXTPROFILE']; ?></a></li>
                                
                <li id="client"><a data-toggle="tab" oncontextmenu="return false;" href="#vis_details_list" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'client', 'vis_operation':'getorganization_client', 'vis_organization_id':<? echo $org_details['group_id']; ?>,'vis_client':1});set_active_tab('client');"><? echo $vis_language['TXTCLIENT']; ?></a></li>
                
                <li id="ticket"><a data-toggle="tab" oncontextmenu="return false;" href="#vis_details_list" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'client', 'vis_operation':'getorganization_ticket', 'vis_organization_id':<? echo $org_details['group_id']; ?>,'vis_action':'history','vis_ticket':1});set_active_tab('ticket');"><? echo $vis_language['TXTTICKETS']; ?></a></li>

            </ul>
           
        </header>
        <div class="panel-body">
			<div class="tab-content">
				<div id="vis_details_list" class="tab-pane active">
                    <div id="summary" class="tab-pane active">
                        <div class="col-md-12">
                            <div class="row">
                                <div class="wrapper">
                                    <div class="bg-light b-a">
                                        <h4 class="b-b b-2x m-t-n-xxs padder padder-v"><?= $vis_language['TXTTICKETS'];?></h4>
                                        <div class="rnd">
                                            <ul class="lg">
                                                <li id="new_cnt"><h4><?=($quick_view['new']!='')?$quick_view['new']:0;?></h4><p> <? echo $vis_language['TXTNEW']; ?></p></li>
                                                <li id="overdue_cnt"><h4><?=($quick_view['overdue']!='')?$quick_view['overdue']:0;?></h4><p><? echo $vis_language['TXTOVERDUE']; ?></p></li>
                                                <li id="assigned_cnt"><h4><?=($quick_view['assigned']!='')?$quick_view['assigned']:0;?></h4><p> <? echo $vis_language['TXTSELFASSIGNED']; ?></p></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                           
                      </div>
                    </div>
					<script>$('#vis_details_list').visExecution('load_operations',{'vis_module':'client', 'vis_operation':'get_orgsummary', 'vis_action':'details', 'vis_organization_id':<? echo $org_details['group_id']; ?>});</script>
				</div>
			</div>
			</div>
		</form>
    </section>
</section>
<script>
	$( document ).ready(function() {
		<? if($clientcount<=0){ ?>
		$("li#client").css('display','none');
		<? } else {?>
			$("li#client").css('display','block');
		<? } if($ticketcount<=0){?>
		$("li#ticket").css('display','none');
		<? } else {?>
			$("li#ticket").css('display','block');
		<? } ?>

});
    $(".selectpicker").selectpicker();
    
	    function set_active_tab(tab_id){
        var active = $("#tabs .active").attr("id");
        $("#"+active).removeClass("active");
        $("#"+tab_id).addClass("active").show();
        var parent_div = $("#vis_details_list").parent().parent();
        if($("#vis_child_client_form #tabs #client.active").length || $("#vis_child_client_form #tabs #ticket.active").length)
            parent_div.addClass("p-l-none").addClass("p-r-none");
        else parent_div.removeClass("p-l-none").removeClass("p-r-none");
    }
    function check_access()
	{
		   $("#vis_global_msg_div").visInterface("load_global_message", "<?php echo  $vis_language['MSGACCSSDND'] ;?>");
		   return false;
	}

</script>
