page.reports.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. global $myUser;
  3. require_once(__DIR__.SLASH.'StatisticReport.class.php');
  4. ?>
  5. <h3>Rapports statistiques</h3>
  6. <hr class="mt-2 mb-2">
  7. <div class="row">
  8. <?php foreach(StatisticReport::loadAll(array(), array(' created ASC ')) as $report): ?>
  9. <div class="col-xs-3 report-bloc" data-id="<?php echo $report->id; ?>">
  10. <div class="report" style="background-color:<?php echo $report->color; ?>">
  11. <?php if($myUser->can('statistic','configure')): ?>
  12. <ul class="report-sheet-menu">
  13. <li>
  14. <a title="Éditer le rapport" href="index.php?module=statistic&page=edit_report&id=<?php echo $report->id; ?>">
  15. <i class="far fa-edit"></i>
  16. </a>
  17. </li>
  18. <li onclick="stats_delete_report(this);"><i title="Supprimer le rapport" class="far fa-trash-alt"></i></li>
  19. </ul>
  20. <?php endif; ?>
  21. <a href="index.php?module=statistic&page=report&id=<?php echo $report->id; ?>"><i class="<?php echo $report->icon; ?>"></i><?php echo $report->label; ?></a>
  22. </div>
  23. </div>
  24. <?php endforeach; ?>
  25. <?php if($myUser->can('statistic','configure')): ?>
  26. <div class="col-xs-3">
  27. <a class="report addReport" title="Créer un rapport" href="index.php?module=statistic&page=edit_report"><i class="fas fa-plus"></i></a>
  28. </div>
  29. <div class="col-xs-3">
  30. <div onclick="$('#import').click()" class="report importReport" title="Importer un rapport" href="index.php?module=statistic&page=edit_report"><i class="fas fa-file-upload"></i></div><input type="file" name="import" id="import" class="hidden" onchange="stats_report_import()" multiple accept=".zip">
  31. </div>
  32. <?php endif; ?>
  33. </div>