index.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. @extends('layouts.master')
  2. @section('content')
  3. <div class="panel panel-info">
  4. <div class="panel-heading">
  5. <h3 class="panel-title">{{ $title }}</h3>
  6. </div>
  7. <div class="panel-body">
  8. <a href="{{ url('ticket/new') }}" class="btn btn-info"><i class="fa fa-plus"></i> Open New Ticket</a>
  9. <br> <br>
  10. @if($tickets)
  11. @foreach($tickets as $ticket)
  12. <div class='media'>
  13. <a class='pull-left' href="{{ url('ticket/show'.'/'.$ticket->id) }}">
  14. <img class="media-object" src="{{ asset('assets/img/support.png') }}" alt="...">
  15. </a>
  16. <div class="media-body">
  17. <?php
  18. $priority='';
  19. switch ($ticket->priority) {
  20. case '1':
  21. $priority="<span class='label label-default'>Low</span>";
  22. break;
  23. case '2':
  24. $priority="<span class='label label-info'>Medium</span>";
  25. break;
  26. case '3':
  27. $priority="<span class='label label-warning'>High</span>";
  28. break;
  29. case '4':
  30. $priority="<span class='label label-danger'>Urgent</span>";
  31. break;
  32. default:
  33. break;
  34. }
  35. ?>
  36. <span class="label label-info">{{ @$ticket->user->company_data?$ticket->user->company_data->name:'' }}</span>
  37. <h4 class="media-heading">{{ $ticket->title }} {!! $priority !!}</h4>
  38. <p>
  39. {{ $ticket->details }}
  40. </p>
  41. <a href="{{ url('ticket/show'.'/'.$ticket->id) }}" !important;' class='btn btn-xs btn-link'>Details</a>
  42. <br>
  43. <p style='margin-left: 2px; padding-top:5px;'>
  44. <i class="fa fa-user"></i> {{ $ticket->user?$ticket->user->name:'' }} &nbsp;&nbsp;&nbsp;&nbsp;
  45. <i class="fa fa-user"></i> {{ $ticket->created_user?$ticket->created_user->name:'' }} &nbsp;
  46. <i class="fa fa-clock-o"></i> {{ date('d M, Y',strtotime($ticket->created_at)) }}
  47. &nbsp;&nbsp;
  48. <?php
  49. $status='';
  50. switch ($ticket->status) {
  51. case '0':
  52. $status='Initiated';
  53. break;
  54. case '1':
  55. $status='In Process';
  56. break;
  57. case '2':
  58. $status='Onhold';
  59. break;
  60. case '3':
  61. $status='Closed';
  62. break;
  63. default:
  64. # code...
  65. break;
  66. }
  67. ?>
  68. <i class="fa fa-tags"></i> {{ $status }}
  69. </p>
  70. <hr>
  71. </div>
  72. </div>
  73. @endforeach
  74. <div class="row">
  75. <div class="col-md-12">
  76. <div style="margin-left:42%">
  77. {!! $tickets->render() !!}
  78. </div>
  79. </div>
  80. </div>
  81. @endif
  82. </div>
  83. </div>
  84. @stop
  85. @section('style')
  86. <style>
  87. .label{
  88. padding: 0.2em 0.3em .2em !important;
  89. font-size: 60% !important;
  90. }
  91. </style>
  92. @stop