
<?php  
use App\Models\User;
$user=User::where('id','=',Session::get('id'))->first(); 

$classe_admin="disabled";
if($user->HasRole("ADMINISTRATEUR")|| $user->HasRole("ADMINISTRATEUR FONCTIONNEL") ) 
    $classe_admin="";

$isadmin=$user->HasRole("ADMINISTRATEUR");
$isadmin_f=$user->HasRole("ADMINISTRATEUR FONCTIONNEL");

?>

  <ul class="nav navbar-nav" style='margin:0px'>
        <li class ="dropdown">
            <a href="{!! url('accueil') !!} ">
              <span class="glyphicon glyphicon-home"></span>
            </a>
        </li>

        <!--
        <li class ="dropdown">
          <h4 style='color:darkred;font-weight:bold;padding-top:4px'>{!! Session::get('titre_spec') !!}</h4>
        </li>
      -->
        
      <!-- AIDES SOCIALES -->
        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Tiers<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="{!! URL::to('/tiers/beneficiaires/limit/S') !!} ">Bénéficiaires</a></li>
            <li><a href="{!! URL::to('/tiers/enfants/limit/S') !!} ">Enfants</a></li>   
            @if($user->can("SOC_RAZ") || $isadmin) 
            <li class="divider"></li>  
            <li class=""><a href="{!! URL::to('/raz_rappel/SOC') !!} ">RAZ Rappel</a></li> 
            @endif
            <!--
            <li class="divider"></li>  
            <li class=""><a href="{!! URL::to('/rappel_soc_2018') !!} ">Rappel 2018</a></li>          
            -->         
          </ul>
        </li>

        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Versements Aide Sociale<b class="caret"></b></a>
          <ul class="dropdown-menu"> 
            <li><a href="{!! URL::to('versements_encours/SOC') !!} ">Versements en cours</a></li> 

            @if($user->can("SOC_GEN") || $isadmin) 
            <li class="divider"></li> 
            <li><a href="{!! URL::to('versements_generation_b/SOC') !!} ">Génération du mois</a></li> 
            <li class=""><a href="{!! URL::to('versements_generation_def/SOC') !!} ">Génération du mois définitive</a></li> 
            @endif 

            @if($user->can("VER_EXP") || $isadmin)
            <li><a href="{!! URL::to('prestations/versement_annee/SOC') !!} ">Liste pour Edition & Export</a></li> 
            @endif   

          </ul>
        </li>

        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Versements CSR<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="{!! URL::to('versements_encours/SAV') !!} ">Versements en cours</a></li> 
              
              @if($user->can("CSR_GEN") || $isadmin)
              <li class="divider"></li> 
              <li><a href="{!! URL::to('versements_generation_b/SAV') !!} ">Génération du mois</a></li>
              <li class=""><a href="{!! URL::to('versements_generation_def/SAV') !!} ">Génération du mois définitive</a></li>
              @endif

              @if($user->can("VER_EXP") || $isadmin)
              <li class="divider"></li> 
              <li><a href="{!! URL::to('prestations/versement_annee/SAV') !!} ">Liste pour Edition & Export</a></li> 
              @endif

              @if($user->can("CSR_AJUST") || $isadmin)
                <li class="divider"></li> 
                <li class="">
                  <a href="{!! URL::to('retraites/reajustement_csr') !!} ">Réajustement de la CSR</a>
                </li>
              @endif
            </ul>
        </li>

        @if($user->can("CER_MAJ") || $isadmin) 
        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Certificats<b class="caret"></b></a>
          <ul class="dropdown-menu"> 
            <!-- <li><a href="{!! URL::to('editions_aidessociales') !!} ">Editions</a></li> -->
            <li class="divider"></li>
            <li class=""><a href="{!! URL::to('/maj_certificats/SOC') !!} ">Mise à jour des  Certificats</a></li> 
            <li class=""><a href="{!! URL::to('/maj_certificats_etrangers/SOC') !!} ">Mise à jour des  Certificats étrangers</a></li>                  
          </ul>
        </li>
         @endif   

    </ul>


<!-- ACTIONS -->
@include('layouts.navbar_actions')





