Blame view

src/Template/Element/menu_responsive.ctp 4.64 KB
b2dade50   Prugniel   modifs Jeanne boo...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!-- début menu -->


<nav class="navbar navbar-expand-xl navbar-light bg-light">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">


      <li class="nav-item">
        <?=$this->Html->link('<i class="nav-link" id="police">Retour</i>', 'javascript:window.history.go(-1)', ['escape' => false])?>
      </li>

      <li class="nav-item">
        <?=$this->Html->link('<i class="nav-link" id="police">Accueil</i>', ['controller' => 'pages','action' => 'home'], ['escape' => false]);?>
      </li>

      <?php if(isset($username) && $username != " "): ?>

          <li class="nav-item dropdown">

            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="text-decoration-color: #17457F;">
              Matériel
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <?=$this->Html->link('<i class="dropdown-item">Nouveau</i>', ['controller' => 'Materiels','action' => 'add'], ['escape' => false]);?> 
              <?=$this->Html->link('<i class="dropdown-item">Ma liste</i>', ['controller' => 'Materiels', 'action' => 'index', 'MY' => $username ], ['escape' => false]);?>
              <?=$this->Html->link('<i class="dropdown-item">Tous</i>', ['controller' => 'Materiels','action' => 'index'], ['escape' => false])?>
              <?=$this->Html->link('<i class="dropdown-item">Rechercher</i>', ['controller' => 'materiels','action' => 'find'], ['escape' => false]);?>
            </div>                              
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="text-decoration-color: #17457F;">
              Suivi
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <?=$this->Html->link('<i class="dropdown-item">Liste</i>', ['controller' => 'Suivis','action' => 'index'], ['escape' => false])?>
              <?=$this->Html->link('<i class="dropdown-item">Rechercher</i>', ['controller' => 'suivis','action' => 'find'], ['escape' => false]);?> 
            </div>                              
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="text-decoration-color: #17457F;">
              Emprunt
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <?=$this->Html->link('<i class="dropdown-item">Liste</i>', ['controller' => 'Emprunts','action' => 'index'], ['escape' => false]);?> 
              <?=$this->Html->link('<i class="dropdown-item">Rechercher</i>', ['controller' => 'emprunts','action' => 'find'], ['escape' => false])?> 
            </div>                              
          </li>

          <li class="nav-item">
            <?=$this->Html->link('<i class="nav-link aligner" id="police">Autres listes</i>', ['controller' => 'pages','action' => 'tools_sm'], ['escape' => false])?>
          </li>

          <?php if(isset($role) && !(in_array($role, ['Utilisateur']))): ?>
          <li class="nav-item">
            <?=$this->Html->link('<i class="nav-link" id="police">Outils</i>', ['controller' => 'pages','action' => 'tools'], ['escape' => false])?>         
          </li>
          <?php endif; ?>
      <?php endif; ?>

      <li class="nav-item">
        <?=$this->Html->link('<i class="nav-link aligner" id="police">A propos</i>', ['controller' => 'pages','action' => 'about'], ['escape' => false])?>
      </li>

    </ul>

    <div id="barre">
    <?php if (isset($username) && $username != " ") {

        // Search function
        echo $this->Form->create('Materiel', ['url' => '/materiels/find']);

        echo '<input name="s_all_2" class="form-control mr-2 mr-sm-2 col-8 col-sm-6 col-md-6 col-lg-9" type="search" placeholder="Recherche (matériels)" aria-label="Search" id="MaterielSAll barre">';
        echo $this->Form->button('Chercher', [ 'class'=>'btn btn-outline-success', 'type'=>'submit', 'name' => 'MaterielSAll', 'id' => 'MaterielSAll', 'style' => 'margin: 0px;' ]); 
        
        echo $this->Form->end();
    }?>
    </div>
    
  </div>
</nav>


<!-- fin menu -->