No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.blade.php 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @extends('layouts.layout-user')
  2. @section('content')
  3. <table id="table-register" class="table table-bordered table-hover">
  4. <thead>
  5. <tr>
  6. <th colspan="6">
  7. <h2 style="display: inline-block; margin-right: 10px;">Data Pelaporan Apresiasi</h2>
  8. <span style="margin:1%; float: right;"></span>
  9. <form class="w-72" action="{{route('apresiasi.userIndex')}}" method="GET">
  10. <div class="input-group input-group-merge" style="max-width: 300px">
  11. <span class="input-group-text" id="basic-addon-search31"><i class="fa fa-search"></i></span>
  12. <input name="search" class="form-control" placeholder="Search..." aria-label="Search..." aria-describedby="basic-addon-search31"></input>
  13. </div>
  14. </form>
  15. <a href="{{ route('apresiasi.userCreate') }}" class="btn btn-primary btn-delete" style="float: left; margin-top:1%;">Buat Pelaporan</a>
  16. </th>
  17. </tr>
  18. <tr style="background-color: #155dfa;">
  19. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">No</th>
  20. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Judul</th>
  21. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px; width: 30%;">Deskripsi</th>
  22. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Lokasi</th>
  23. <th style="vertical-align: middle; color: white; text-align: center; padding: 10px;">Foto</th>
  24. <th style="vertical-align: middle; text-align: center; color: white; padding: 10px; width: 20%;">Action</th>
  25. </tr>
  26. </thead>
  27. <!-- Isi tabel -->
  28. <tbody>
  29. @php
  30. $i=1;
  31. @endphp
  32. @if($apresiasi->count() > 0)
  33. @foreach ($apresiasi as $apresiasi)
  34. <tr>
  35. <td style="text-align: center; vertical-align: middle;">{{ $i++ }}</td>
  36. <td style="text-align: center; vertical-align: middle;">{{ $apresiasi->judul }}</td>
  37. <td style="text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 10em;">{{ $apresiasi->deskripsi }}</td>
  38. <td style="text-align: center; vertical-align: middle;">{{ $apresiasi->lokasi }}</td>
  39. <td style="text-align: center; vertical-align: middle;">
  40. <img src="{{ asset('foto/' . $apresiasi->foto) }}" alt="Foto" style="width: 100px; height: 100px; object-fit: cover;">
  41. </td>
  42. <td style="text-align: center; vertical-align: middle;">
  43. <div style="display: flex; justify-content: center; gap: 10px;">
  44. @if (Auth::id() === $apresiasi->user_id)
  45. <a href="{{ route('apresiasi.userEdit', ['id' => $apresiasi->id]) }}" class="btn btn-delete" style="background-color: rgb(0, 106, 255); color: #fff; border: none; border-radius: 4px; cursor: pointer; width: 80px;">Update</a>
  46. <a href="{{ route('apresiasi.userDestroy', ['id' => $apresiasi->id]) }}" class="btn btn-delete" style="background-color: red; color: #fff; border: none; border-radius: 4px; cursor: pointer; width: 80px;">Delete</a>
  47. @endif
  48. <a href="{{ route('apresiasi.userShow', ['id' => $apresiasi->id]) }}" class="btn btn-delete" style="background-color: rgb(82, 210, 67); color: #fff; border: none; border-radius: 4px; cursor: pointer; width: 80px;">Show</a>
  49. </div>
  50. </td>
  51. </tr>
  52. @endforeach
  53. @else
  54. <tr>
  55. <td class="text-center" colspan="6">Pelaporan Apresiasi not found</td>
  56. </tr>
  57. @endif
  58. </tbody>
  59. </table>
  60. @endsection