page.quick.item.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. require_once('../../common.php');
  3. if(!$myUser->can('navigation','read')) throw new Exception("Vous n'avez pas la permission pour executer cette fonctionnalité",403);
  4. require_once('MenuItem.class.php');
  5. $menuItem = MenuItem::provide();
  6. ?>
  7. <div class="navigation">
  8. <div id="menuitem-form" class="row menuitem-form" data-action="navigation_menuitem_save" data-id="<?php echo $menuItem->id; ?>">
  9. <div class="col-md-12">
  10. <h3>Élement de menu</h3>
  11. <label for="label">Libellé :</label>
  12. <div class="input-group mb-3">
  13. <div class="input-group-prepend">
  14. <span class="icon-chooser" id="basic-addon-icon-navigation"><input id="icon" data-type="icon" name="icon" class="form-control" placeholder="" value="<?php echo $menuItem->icon==''? 'fas fa-question': $menuItem->icon; ?>" type="text"></span>
  15. </div>
  16. <input id="label" name="label" class="form-control" placeholder="Mon menu" value="<?php echo $menuItem->label; ?>" type="text">
  17. </div>
  18. <label for="url">Adresse web / Lien :</label>
  19. <div class="input-group mb-3">
  20. <input id="url" name="url" class="form-control" placeholder="http://www.monadresse.com" value="<?php echo $menuItem->url; ?>" type="text">
  21. <div class="input-group-append">
  22. <span class="input-group-text btn" id="url-btn">
  23. <i class="fas fa-globe"></i>
  24. </span>
  25. </div>
  26. </div>
  27. <div class="row navigation-options">
  28. <div class="col-md-4">
  29. <?php if($myUser->can('navigation','configure')): ?>
  30. <div class="nav-option-container">
  31. <input id="public" class="form-control" <?php echo $menuItem->user == '' ? 'checked' : ''; ?> type="checkbox" data-type="checkbox">
  32. <label for="public">Menu public</label>
  33. </div>
  34. <?php endif; ?>
  35. <div class="nav-option-container">
  36. <input id="target" class="form-control" <?php echo $menuItem->target == 1 ? 'checked' : ''; ?> type="checkbox" data-type="checkbox">
  37. <label for="target">Ouvrir dans un nouvel onglet</label>
  38. </div>
  39. </div>
  40. <div class="col-md-2">
  41. </div>
  42. <div class="col-md-6">
  43. <!-- <div class="nav-select-container">
  44. <label for="parent">Menu parent : </label>
  45. <select id="parent" name="parent" class="form-control" placeholder="" type="text">
  46. <option value="0"> - </option>
  47. <?php foreach(MenuItem::loadAll(array('parent'=>0), array(' label ASC ')) as $parentItem){
  48. if($parentItem->id == $menuItem->id) continue;
  49. $selected = ($parentItem->id == $menuItem->parent) ? 'selected' : '';
  50. echo '<option value="'.$parentItem->id.'" '.$selected.'>'.$parentItem->label.'</option>';
  51. } ?>
  52. </select>
  53. </div> -->
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>