setting.global.report.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. global $myUser;
  3. User::check_access('issue','configure');
  4. require_once(__DIR__.SLASH.'IssueReport.class.php');
  5. require_once(__DIR__.SLASH.'IssueReportTag.class.php');
  6. $browsers = array(
  7. 'opera' => 'Opera',
  8. 'firefox' => 'Mozilla Firefox',
  9. 'chrome' => 'Google Chrome',
  10. 'safari' => 'Safari',
  11. 'ie' => 'Internet Explorer',
  12. 'edge' => 'Microsoft Edge',
  13. 'blink' => 'Blink'
  14. );
  15. $states = array();
  16. foreach(IssueReport::states() as $slug=>$state)
  17. $states[$slug] = $state['label'];
  18. $tags = IssueReportTag::tags();
  19. ?>
  20. <div class="row">
  21. <div class="col-xl-12 tab-container parent-tab mb-3 noPrint">
  22. <h3>Réglages Tickets</h3>
  23. <ul class="nav nav-tabs" role="tablist">
  24. <li class="nav-item"><a data-toggle="tab" class="nav-link active" href="#tab-reports" aria-controls="tab-reports" aria-selected="true">Listing des rapports</a></li>
  25. <li class="nav-item"><a data-toggle="tab" class="nav-link" href="#tab-settings" aria-controls="tab-settings" aria-selected="false">Paramètres</a></li>
  26. </ul>
  27. </div>
  28. <div class="tab-content col-xl-12">
  29. <!-- Onglet Listing des rapports -->
  30. <div class="tab-pane show active in" id="tab-reports" role="tabpanel" aria-labelledby="tab-reports">
  31. <div class="issue-reports-search mb-2">
  32. <select id="filters" data-join="and" data-slug="issue_search" data-type="filter" data-label="Recherche" data-function="issue_issuereport_search">
  33. <option value="state" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($states); ?>'>Etat</option>
  34. <option value="from" data-filter-type="text">Url</option>
  35. <option value="comment" data-filter-type="text">Commentaire</option>
  36. <option value="{{table}}.creator" data-filter-type="user">Auteur</option>
  37. <option value="{{table}}.created" data-filter-type="date">Date</option>
  38. <option value="browser" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($browsers); ?>'>Navigateur</option>
  39. <option value="ip" data-filter-type="text">Adresse IP</option>
  40. </select>
  41. <div>
  42. <label class="-d-inline-block mt-1 mb-1">Tags :</label>
  43. <input type="text" onchange="issue_issuereport_search()" data-tags='<?php echo json_encode($tags); ?>' id="report-tags" data-type="tagcloud">
  44. </div>
  45. </div>
  46. <ul id="issuereports" class="list-issue-reports" data-entity-search="issue_issuereport_search">
  47. <li data-id="{{id}}" class="hidden">
  48. <a>
  49. <div class="issue-state">
  50. <i class="{{state.icon}}" style="color: {{state.color}};" title="{{state.label}}"></i>
  51. </div>
  52. <div class="infos-cell text-left">
  53. <a class="issue-title" title="Voir le rapport détaillé" href="index.php?module=issue&page=sheet.report&id={{id}}">
  54. <span class="font-weight-bold d-inline-block mb-1">{{excerpt}}</span>
  55. </a>
  56. {{#assign}}<span class="assign"> Assigné à <i class="ml-1 far fa-meh-blank"></i> {{assign}}</span>{{/assign}}
  57. <div class="mb-1 mt-2 text-muted">
  58. <a class="pointer font-weight-bold mr-2" onclick="$(this).parent().next('div').slideToggle(150)" title="Afficher plus de détails">#{{id}}</a> <i class="far fa-calendar"></i> {{date}} <i class="far fa-clock ml-2"></i> {{hour}} par <span class=""><i class="far fa-meh-blank"></i> {{creator}}</span>
  59. <ul class="report-tag ml-2">
  60. {{#tags}}
  61. <li>
  62. <span class="badge badge-tag no-select" style="background-color:{{color}}; border:1px solid {{color}};color:#ffffff;"><i class="{{icon}}"></i> {{label}}</span>
  63. </li>
  64. {{/tags}}
  65. </ul>
  66. </div>
  67. <div class="hidden">
  68. <span> Page : <a title="Accéder à la page" href="<?php echo ROOT_URL; ?>{{relativefrom}}" target="_blank">{{relativefrom}}</a></span><br>
  69. <small class="text-muted mb-2 d-block">IP: {{ip}}</small>
  70. <div>
  71. <span class="mr-1"><i class="{{browserIcon}}"></i> {{browser}}</span>|
  72. <span class="ml-1 mr-1"><i class="{{osIcon}}"></i> {{os}}</span>|
  73. <span class="ml-1"><i class="fas fa-tv"></i> {{width}}px * {{height}}px</span>
  74. </div>
  75. <small class="text-muted">{{browserVersion}}</small>
  76. </div>
  77. </div>
  78. <div class="report-buttons">
  79. {{#comments}}<i title="{{comments}} Commentaire(s)" class="fas fa-comment text-muted btn-comments"></i> {{comments}}{{/comments}}
  80. <i class="far fa-trash-alt pointer btn-delete text-muted" title="Supprimer le rapport" onclick="issue_issuereport_delete(this);"></i>
  81. </div>
  82. </li>
  83. </ul>
  84. <!-- Pagination -->
  85. <ul class="pagination justify-content-center">
  86. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');issue_issuereport_search();">
  87. <a class="page-link" href="#">{{label}}</a>
  88. </li>
  89. </ul>
  90. </div>
  91. <!-- Onglet Paramètres -->
  92. <div class="tab-pane" id="tab-settings" role="tabpanel" aria-labelledby="tab-settings">
  93. <div class="row">
  94. <div class="col-md-12">
  95. <div onclick="issue_setting_save();" class="btn btn-success float-right"><i class="fas fa-check"></i> Enregistrer</div>
  96. <legend>Paramètres généraux :</legend>
  97. <div class="clear"></div>
  98. </div>
  99. </div>
  100. <?php echo Configuration::html('issue'); ?>
  101. </div>
  102. </div>
  103. </div>