show.blade.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @extends('layouts.admin.app')
  2. @section('content')
  3. <!-- Main content -->
  4. <section class="content">
  5. @include('layouts.errors-and-messages')
  6. <!-- Default box -->
  7. <div class="box">
  8. <div class="box-body">
  9. <h2>Attributes</h2>
  10. <table class="table">
  11. <thead>
  12. <tr>
  13. <td>Attribute name</td>
  14. <td></td>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <tr>
  19. <td>{{ $attribute->name }}</td>
  20. <td></td>
  21. </tr>
  22. </tbody>
  23. </table>
  24. @if(!$values->isEmpty())
  25. <table class="table table-striped" style="margin-left: 35px">
  26. <thead>
  27. <tr>
  28. <td>Attribute Values</td>
  29. <td></td>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @foreach($values as $item)
  34. <tr>
  35. <td>{{ $item->value }}</td>
  36. <td>
  37. <form action="{{ route('admin.attributes.values.destroy', [$attribute->id, $item->id]) }}" class="form-horizontal" method="post">
  38. {{ csrf_field() }}
  39. <input type="hidden" name="_method" value="delete">
  40. <div class="btn-group">
  41. <button onclick="return confirm('Are you sure?')" type="submit" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i> Remove</button>
  42. </div>
  43. </form>
  44. </td>
  45. </tr>
  46. @endforeach
  47. </tbody>
  48. </table>
  49. @endif
  50. </div>
  51. <!-- /.box-body -->
  52. <div class="box-footer">
  53. <div class="btn-group">
  54. <a href="{{ route('admin.attributes.values.create', $attribute->id) }}" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> Add values</a>
  55. <a href="{{ route('admin.attributes.index') }}" class="btn btn-default btn-sm">Back</a>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- /.box -->
  60. </section>
  61. <!-- /.content -->
  62. @endsection