file_upload.blade.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. @extends('layouts.master')
  2. @section('content')
  3. <!-- Main content -->
  4. <section class="content">
  5. <!-- Main row -->
  6. <div class="row">
  7. <div class="col-md-12">
  8. <section class="panel tasks-widget">
  9. <header class="panel-heading" style="height:40px;">
  10. <div class="pull-left">
  11. {{$title}}
  12. </div>
  13. <div>
  14. <button class="btn btn-success btn-xs pull-right" data-toggle="modal" data-target=".add-modal">Upload file</button>
  15. </div>
  16. </header>
  17. <div class="table-responsive project-list">
  18. @if(Session::has('msg'))
  19. {{Session::get('msg')}}
  20. {{"sdjflsdfjls"}}
  21. @endif
  22. <table class="table table-striped">
  23. <thead>
  24. <tr>
  25. <th>
  26. Name
  27. </th>
  28. <th>
  29. Details
  30. </th>
  31. <th>
  32. Action
  33. </th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. @if($all)
  38. @foreach($all as $info)
  39. <tr>
  40. <th>
  41. {{$info->name}}
  42. </th>
  43. <th>
  44. {{$info->details}}
  45. </th>
  46. <th>
  47. <a target="_blank" href="{{URL::asset("assets/document/files/$info->url")}}" class="btn btn-xs btn-success">Download</a>
  48. <a onclick="return confirm('Want to delete?')" href="{{url("admin/file_upload/$info->id")}}" class="btn btn-xs btn-danger" style="background-color:#FF6501;color:#fff;">X</a>
  49. </th>
  50. </tr>
  51. @endforeach
  52. @endif
  53. </tbody>
  54. </table>
  55. <hr>
  56. </hr>
  57. </div>
  58. </section>
  59. </div>
  60. </div>
  61. </section>
  62. <!-- row end -->
  63. <!-- /.content -->
  64. <!-- Modal Add Contract person -->
  65. <div class="modal fade add-modal" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
  66. <div class="modal-dialog" role="document">
  67. <div class="modal-content">
  68. <div class="modal-header">
  69. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  70. <h4 class="modal-title" id="gridSystemModalLabel">Add Address Book Info</h4>
  71. </div>
  72. <div class="modal-body">
  73. <form action="{{url('admin/file_upload')}}" method="POST" enctype="multipart/form-data">
  74. {{ csrf_field() }}
  75. <div class="form-group in-group">
  76. <label for="">Name</label>
  77. <input type="text" name="name" class="form-control" id="" placeholder="File name" >
  78. </div>
  79. <div class="form-group in-group">
  80. <label for="">Upload File</label>
  81. <input type="file" name="file" id="fileToUpload">
  82. </div>
  83. <div class="form-group in-group">
  84. <label for="">Details</label>
  85. <textarea type="text" name="details" class="form-control"></textarea>
  86. </div>
  87. </div>
  88. <div class="modal-footer">
  89. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  90. <button type="submit" class="btn btn-primary">Submit</button>
  91. </div>
  92. </form>
  93. </div><!-- /.modal-content -->
  94. </div><!-- /.modal-dialog -->
  95. </div><!-- /.modal -->
  96. @endsection
  97. @section('script')
  98. @endsection