index.blade.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @extends('layouts.admin')
  2. @section('title')
  3. Pubblicità Evento {{$event->name}}
  4. @stop
  5. @section('content')
  6. @foreach($aDatas as $idx => $data)
  7. <div class="row">
  8. <div class="col-xs-2">
  9. <h2>{{$idx}}</h2>
  10. </div>
  11. <div class="col-xs-10 text-right">
  12. <br><a href="{{ route('events.advs.create', $event) }}?position={{$idx}}" class="btn btn-success">Aggiungi</a>
  13. </div>
  14. </div>
  15. <div class="row">
  16. <div class="col-xs-2">
  17. <img src="/images/{{str_replace(" ", "", $idx)}}.png" style="max-width:180px">
  18. </div>
  19. <div class="col-xs-10">
  20. <div class="col-xs-12">
  21. <div class="box">
  22. <div class="box-body table-responsive no-padding">
  23. <table class="table table-striped table-hover">
  24. <tr>
  25. <th>Nome</th>
  26. <th>Google</th>
  27. <th>Immagine</th>
  28. <th>Online</th>
  29. <th width="50"></th>
  30. <th width="50"></th>
  31. </tr>
  32. @foreach($data as $adv)
  33. <tr>
  34. <td>{{$adv->name}}</td>
  35. <td>{{$adv->google_code}}</td>
  36. <td>
  37. @if($adv->image != '')
  38. <img src="/files/adv/{{$adv->image}}" style="max-width:250px" />
  39. @endif
  40. </td>
  41. <td>{{$adv->online ? 'Si' : 'No'}}</td>
  42. <td>
  43. <a href="{{ route('events.advs.edit', array($event, $adv->id)) }}" type="button" class="btn btn-w-m btn-primary">Modifica</a>
  44. </td>
  45. <td>
  46. <form class="form-inline" method="POST" action="{{ route('events.advs.destroy', [$event, $adv->id]) }}">
  47. @csrf
  48. @method('DELETE')
  49. <button type="submit" class="btn btn-w-m btn-danger" onclick="return confirm('Sei sicuro?')">Elimina</button>
  50. </form>
  51. </td>
  52. </tr>
  53. @endforeach
  54. </table>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. @endforeach
  61. <div class="col-xs-2" style="margin-top:50px">
  62. <a href="{{ route('events.index') }}" class="btn btn-info">Elenco eventi</a>
  63. </div>
  64. @stop