widget.php 720 B

123456789101112131415161718192021
  1. <?php
  2. global $myUser;
  3. $icon = empty($widget->data('icon')) ? 'far fa-bookmark' : $widget->data('icon');
  4. $color = empty($widget->data('color'))? '#ffffff': $widget->data('color');
  5. $url = navigation_meta_link($widget->data('url'));
  6. $title = navigation_meta_link($widget->data('title'));
  7. ?>
  8. <div style="background: <?php echo $color; ?>" class="widgetNavigationContainer">
  9. <?php if(!empty($widget->data('title'))): ?>
  10. <a href="<?php echo $url; ?>" <?php if(!empty($widget->data('redirect'))) echo 'target="_blank"'; ?> >
  11. <i class="<?php echo $icon; ?>"></i>
  12. <?php echo $title; ?>
  13. </a>
  14. <?php else: ?>
  15. <h4 class="noContent"><i class="far fa-compass"></i> Aucun menu spécifié</h4>
  16. <?php endif; ?>
  17. </div>