
 
<?php $__env->startSection('title'); ?> Accueil <?php $__env->stopSection(); ?>
 
<?php $__env->startSection('content'); ?>
<?php
    if(!isset($nav_bar)) {
        $titre_spec="";
        $nav_bar="";
    }
?>
<style>
    .welcome {
        width: 800px;
        height: 100px;
        position: relative;
        left: 15%;
        /*top: 50%;*/
        margin-left: -10px;
        margin-top: 10px;
        margin-bottom: 30px;
        text-align:center;
    }
</style>

<?php $__env->startSection('content'); ?>
<div class="content">

    <?php if(Session::has('message')): ?>
        <div class="alert alert-warning"><?php echo Session::get('message'); ?></div>
    <?php endif; ?>

<?php if($nav_bar==""): ?>
    <div style="min-height: 200px;" id="admin_page" class="with_sidebar">
    	<div class="container">
                <div id='welcome_large_menu' class="welcome">
                    <h2>
                        <?php echo Html::image("img/logo_cpswf.png", "", array( 'maxwidth' => '80%','width' => '50%' )); ?>

                            <?php echo Form::label('titre_label', 
                                'Système Informatique de gestion des Prestations et Recouvrements',
                                ['class'=>'small'] ); ?>

                    </h2>
                </div>
        </div>
    </div>
<?php else: ?>
          <div class='col-lg-max'>
              <nav class="navbar navbar-default navbar-static-top " role="navigation">
                  <div class="container" style='margin:0px;padding:0px'>
                      <?php echo $__env->make('layouts.navbar_'.$nav_bar, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                  </div>
              </nav>
          <div>
<?php endif; ?>


<?php if(isset($user) && ($nav_bar=="")): ?>
    <?php
        $def_value="0.5";
        $opacity_retraites=$def_value;
        $opacity_allocations=$def_value;
        $opacity_recouvrement=$def_value;
        $opacity_aidessociales=$def_value;
        $opacity_mandatement=$def_value;
        $opacity_comptabilite=$def_value;


        if( $user->HasRole("ADMINISTRATEUR") || $user->HasRole("ADMINISTRATEUR FONCTIONNEL") ) {
            $opacity_retraites="1";
            $opacity_allocations="1";
            $opacity_recouvrement="1";
            $opacity_aidessociales="1";
            $opacity_mandatement="1";
            $opacity_comptabilite="1";
        } else {
            if($user->HasRole('RETRAITE') || $user->HasRole('COMPTABILITE')|| $user->can('RET_VISU')) 
                $opacity_retraites="1";

            if($user->HasRole('PRESTATIONS') || $user->HasRole('COMPTABILITE')|| $user->can('ALL_VISU')) 
                $opacity_allocations="1";

            if($user->HasRole('RECOUVREMENT') || $user->HasRole('SALAIRE')|| $user->HasRole('CHEF COMPTABILITE') ||  $user->can('REC_VISU')) 
                $opacity_recouvrement="1";

            if($user->HasRole('AIDES SOCIALES') || $user->HasRole('COMPTABILITE')|| $user->can('SOC_VISU')) 
                $opacity_aidessociales="1";

            if($user->HasRole('MANDATEMENT') || $user->can('MDT_VISU') ) 
                $opacity_mandatement="1";

            if($user->HasRole('COMPTABILITE') || $user->can('CPT_VISU')) 
                $opacity_comptabilite="1";
        }

        $style_retraite='border-color:white;opacity:'.$opacity_retraites.';';
        $style_allocations='border-color:white;opacity:'.$opacity_allocations.';';
        $style_recouvrement='border-color:white;opacity:'.$opacity_recouvrement.';';
        $style_aidessociales='border-color:white;opacity:'.$opacity_aidessociales.';';
        $style_mandatement='border-color:white;opacity:'.$opacity_mandatement.';';
        $style_comptabilite='border-color:white;opacity:'.$opacity_comptabilite.';';


        $style_retraite.='background-color:'.(($nav_bar!='retraites')?'white':'lightgrey').";";
        $style_allocations.='background-color:'.(($nav_bar!='allocations')?'white':'lightgrey').";";
        $style_recouvrement.='background-color:'.(($nav_bar!='recouvrement')?'white':'lightgrey').";";
        $style_aidessociales.='background-color:'.(($nav_bar!='aidessociales')?'white':'lightgrey').";";
        $style_mandatement.='background-color:'.(($nav_bar!='mandatement')?'white':'lightgrey').";";
        $style_comptabilite.='background-color:'.(($nav_bar!='comptabilite')?'white':'lightgrey').";";

    ?>
    <div class="col-lg-12" style='padding-top:10px' >
        <table class="" align='center' style="border-spacing: 20px;border-collapse: separate;">
            <tr align='center'  >
                <td class="col-xs-4">
                    <?php if($opacity_retraites=="1"): ?><a href="<?php echo url('accueil_spec/retraites'); ?>"><?php endif; ?>
                        <?php echo Html::image("img/menu_retraites.png", "", 
                            ['min-width' => '50%','max-width' => '50%','width' => '50%','style'=>$style_retraite ]
                        ); ?> 
                    <?php if($opacity_retraites=="1"): ?></a><?php endif; ?>
                    
                </td>
                <td class="col-xs-4">
                    <?php if($opacity_allocations=="1"): ?><a href="<?php echo url('accueil_spec/allocations'); ?>"><?php endif; ?>
                   <?php echo Html::image("img/menu_allocations.png", "", 
                        ['maxwidth' => '50%','width' => '50%','style'=>$style_allocations ]); ?> 
                    <?php if($opacity_allocations=="1"): ?></a><?php endif; ?>
                </td>
            </tr>
            <tr align='center' >
                <td class="col-xs-4"> 
                    <?php if($opacity_recouvrement=="1"): ?><a href="<?php echo url('accueil_spec/recouvrement'); ?>"> <?php endif; ?> 
                    <?php echo Html::image("img/menu_recouvrement.png", "", 
                        ['maxwidth' => '50%','width' => '50%' ,'style'=>$style_recouvrement ] ); ?> 
                    <?php if($opacity_recouvrement=="1"): ?></a><?php endif; ?>
                </td>
                <td class="col-xs-4">     
                    <?php if($opacity_aidessociales=="1"): ?><a href="<?php echo url('accueil_spec/aidessociales'); ?>"><?php endif; ?>
                    <?php echo Html::image("img/menu_aidessociales.png", "", 
                        ['maxwidth' => '50%','width' => '50%','style'=>$style_aidessociales ]); ?> 
                    <?php if($opacity_aidessociales=="1"): ?></a><?php endif; ?>
                </td>
            </tr>

            <tr align='center' >
                <td class="col-xs-3"> 
                    <?php if($opacity_mandatement=="1"): ?><a href="<?php echo url('accueil_spec/mandatement'); ?>"><?php endif; ?>
                    <?php echo Html::image("img/menu_mandatement.png", "", 
                        ['maxwidth' => '50%','width' => '50%' ,'style'=>$style_mandatement ]); ?> 
                    <?php if($opacity_mandatement=="1"): ?></a><?php endif; ?>
                </td>
                <td class="col-xs-3"> 
                    <?php if($opacity_comptabilite=="1"): ?><a href="<?php echo url('accueil_spec/comptabilite'); ?>"><?php endif; ?>
                    <?php echo Html::image("img/menu_comptabilite.png", "", 
                        ['maxwidth' => '50%','width' => '50%' ,'style'=>$style_comptabilite ]); ?> 
                    <?php if($opacity_comptabilite=="1"): ?></a><?php endif; ?>
                </td>
            </tr>


            <?php if($user->HasRole("ADMINISTRATEUR") 
                || $user->can("ANA_ALL")
                || $user->can("ANA_ASOC")
                || $user->can("ANA_DATA")
                || $user->can("ANA_REC")
                || $user->can("ANA_RET")
                ): ?> 
            <tr align='center' >
                <td colspan="1" class="col-xs-3"> 
                    <a href="<?php echo url('accueil_spec/parametres'); ?>">
                    <?php echo Html::image("img/menu_parametres.png", "", 
                        ['maxwidth' => '50%','width' => '50%' ,'style'=>'border-color:white;' ]); ?> 
                    </a>
                </td>
                <td colspan="1" class="col-xs-3"> 
                    <a href="<?php echo url('accueil_spec/analyses'); ?>">
                    <?php echo Html::image("img/menu_analyses.png", "", 
                        ['maxwidth' => '50%','width' => '50%' ,'style'=>'border-color:white;' ]); ?> 
                    </a>
                </td>
            </tr>
            <?php endif; ?>

        </table>
    </div >
<?php else: ?>

<h2 align="center" style='color:darkred;font-weight:bold;padding-top:40px'><?php echo $titre_spec; ?></h2>

<?php endif; ?>

</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master_accueil', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\CPSWF\old_sipre\sipre\resources\views/accueil.blade.php ENDPATH**/ ?>