page.list.issue.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. global $myUser;
  3. User::check_access('issue','read');
  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-9 noPrint">
  22. <h3>Mes Tickets</h3>
  23. </div>
  24. <div class="col-xl-3 noPrint">
  25. <div class="btn btn-primary right" onclick="issue_add();" title="Déclarer un nouveau bug ou faire une nouvelle demande"><i class="fas fa-plus"></i> Déclarer un ticket</div>
  26. </div>
  27. </div>
  28. <div class="row mt-2">
  29. <div class="tab-content col-xl-12">
  30. <!-- Onglet Listing des rapports -->
  31. <div class="tab-pane show active in" id="tab-reports" role="tabpanel" aria-labelledby="tab-reports">
  32. <div class="issue-reports-search mb-2">
  33. <select id="filters" data-join="and" data-slug="issue_search" data-label="Trouver un ticket" data-type="filter" data-function="issue_issuereport_search">
  34. <option value="{{table}}.id" data-filter-type="number">Numéro ticket</option>
  35. <option value="state" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($states); ?>'>État</option>
  36. <option value="from" data-filter-type="text">Url</option>
  37. <option value="comment" data-filter-type="text">Commentaire</option>
  38. <option value="{{table}}.creator" data-filter-type="user">Auteur</option>
  39. <option value="assign" data-filter-type="user">Assigné</option>
  40. <option value="{{table}}.created" data-filter-type="date">Date</option>
  41. <option value="browser" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($browsers); ?>'>Navigateur</option>
  42. <option value="ip" data-filter-type="text">Adresse IP</option>
  43. </select>
  44. <div class="pt-2">
  45. <label class="d-inline-block font-weight-bold text-muted text-uppercase">Tags :</label>
  46. <div class="d-inline-block">
  47. <input type="text" onchange="issue_issuereport_search()" data-tags='<?php echo json_encode($tags); ?>' id="report-tags" data-type="tagcloud">
  48. </div>
  49. <label class="d-inline-block font-weight-bold text-muted pointer">
  50. <input type="checkbox" checked="checked" onclick="issue_issuereport_search()" data-type="checkbox" id="onlyMine">Voir uniquement mes tickets
  51. </label>
  52. </div>
  53. </div>
  54. <ul id="issuereports" class="list-issue-reports" data-entity-search="issue_issuereport_search">
  55. <li data-id="{{id}}" class="hidden">
  56. <a class="issue-title" title="Voir le rapport détaillé" href="index.php?module=issue&page=sheet.report&id={{id}}">
  57. <div class="issue-state">
  58. <i class="{{state.icon}}" style="color: {{state.color}};" title="{{state.label}}"></i>
  59. </div>
  60. <div class="infos-cell text-left">
  61. <span class="font-weight-bold d-inline-block mb-1">{{excerpt}}</span>
  62. {{#assign}}<span class="assign"> Assigné à <i class="ml-1 far fa-meh-blank"></i> {{assign}}</span>{{/assign}}
  63. <div class="mb-1 mt-2 text-muted">
  64. <span class="pointer font-weight-bold mr-2" onclick="event.preventDefault(); $(this).parent().next('div.issue-details').slideToggle(150)" title="Afficher plus de détails">#{{id}}</span> <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>
  65. <ul class="report-tag ml-2">
  66. {{#tags}}
  67. <li>
  68. <span class="badge badge-tag no-select" style="background-color:{{color}}; border:1px solid {{color}};color:#ffffff;"><i class="{{icon}}"></i> {{label}}</span>
  69. </li>
  70. {{/tags}}
  71. </ul>
  72. </div>
  73. <div class="issue-details">
  74. <span> Page : <code title="Page concernée par le ticket">{{relativefrom}}</code></span><br>
  75. <small class="text-muted mb-2 d-block">IP: {{ip}}</small>
  76. <div>
  77. <span class="mr-1"><i class="{{browserIcon}}"></i> {{browser}}</span>|
  78. <span class="ml-1 mr-1"><i class="{{osIcon}}"></i> {{os}}</span>|
  79. <span class="ml-1"><i class="fas fa-tv"></i> {{width}}px * {{height}}px</span>
  80. </div>
  81. <small class="text-muted">{{browserVersion}}</small>
  82. </div>
  83. </div>
  84. <div class="report-buttons">
  85. {{#comments}}<i title="{{comments}} Commentaire(s)" class="fas fa-comment text-muted btn-comments"></i> {{comments}}{{/comments}}
  86. {{#belongUser}}
  87. <i class="far fa-trash-alt pointer btn-delete text-danger" title="Supprimer le ticket" onclick="event.preventDefault(); issue_issuereport_delete(this);"></i>
  88. {{/belongUser}}
  89. </div>
  90. </a>
  91. </li>
  92. </ul>
  93. <!-- Pagination -->
  94. <ul class="pagination justify-content-center">
  95. <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();">
  96. <a class="page-link" href="#">{{label}}</a>
  97. </li>
  98. </ul>
  99. </div>
  100. </div>
  101. </div>