cprojects.blade.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. @extends('layouts.master')
  2. @section('style')
  3. <link href="{{URL::asset('assets/dropzone/dropzone.css')}}" rel="stylesheet" type="text/css" />
  4. @endsection
  5. @section('content')
  6. <!-- Main content -->
  7. <section class="content">
  8. <!-- Main row -->
  9. <div class="row">
  10. <div class="col-md-7">
  11. <section class="panel tasks-widget">
  12. <header class="panel-heading">
  13. WORK PROGRESS
  14. </header>
  15. <div class="table-responsive project-list">
  16. <table class="table table-striped">
  17. <thead>
  18. <tr>
  19. <th colspan="2">
  20. Project Name
  21. </th>
  22. <th>
  23. Client
  24. </th>
  25. <th>
  26. Description
  27. </th>
  28. <th>
  29. Action
  30. </th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. @if (session('data'))
  35. <div class="alert alert-success">
  36. {{ session('data') }}
  37. </div>
  38. @endif
  39. <?php $login_user = Auth::user()->id; ?>
  40. @if(!empty($projj))
  41. @foreach($projj as $proj)
  42. <tr>
  43. <td>
  44. <div class="task-checkbox">
  45. <input class="flat-grey" type="checkbox"/>
  46. </div>
  47. </td>
  48. <td>
  49. <a href="{{url("client/cproject_details/$proj->proj_id")}}">{{$proj->proj_name->name}}</a>
  50. <br>
  51. <small>
  52. <i class="fa fa-clock-o">
  53. </i>
  54. Assigned in {{$proj->assign_time}}
  55. </small>
  56. </br>
  57. </td>
  58. <td>
  59. {{$proj->assigned->name}}
  60. </td>
  61. <td>
  62. {{str_limit($proj->proj_name->description, $limit = 30, $end = '...')}}
  63. </td>
  64. <td>
  65. @if($proj->proj_name->created_by == $login_user)
  66. <a href="" style="color: #7dcc93;">
  67. <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
  68. </a>
  69. &nbsp; &nbsp;
  70. <a onclick="return confirm ('want to delete?')" href="{{url("client/remove_proj/$proj->proj_id")}}" style="color:#FD4B39;">
  71. <i class="fa fa-times" aria-hidden="true"></i>
  72. </a>
  73. @endif
  74. <input type="hidden" id="proj_id" value="{{$proj->id}}">
  75. &nbsp; &nbsp;
  76. <i class="fa fa-paperclip upload-cls" aria-hidden="true" data-toggle="modal" data-target="#att_modal"></i>
  77. </td>
  78. </tr>
  79. @endforeach
  80. @endif
  81. </tbody>
  82. </table>
  83. <hr>
  84. </hr>
  85. </div>
  86. <div class="panel-body">
  87. <div class=" add-task-row">
  88. </div>
  89. <div class="table-foot">
  90. </div>
  91. </div>
  92. </section>
  93. </div>
  94. <div class="col-md-5">
  95. <div class="panel">
  96. <header class="panel-heading">
  97. Add Project
  98. </header>
  99. <div class="ibox-content">
  100. @include('layouts.message')
  101. <form role="form" action="{{url('client/add_proj')}}" method="POST">
  102. {!! csrf_field() !!}
  103. <div class="form-group">
  104. <label for="Add new Project">
  105. New Project
  106. </label>
  107. <input name="proj_name" class="form-control" id="new-project" placeholder="Add new project" required="" type="new-project">
  108. </input>
  109. </div>
  110. <div class="form-group">
  111. <label for="Add new Project">
  112. Description
  113. </label>
  114. <textarea name="description" rows="5" class="form-control" id="new-project" placeholder="Add new project" ></textarea>
  115. </div>
  116. <div class="form-group">
  117. <button class="btn btn-info" type="submit">
  118. Submit
  119. </button>
  120. </div>
  121. </form>
  122. <p>
  123. </p>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </section>
  129. <!-- row end -->
  130. <!-- /.content -->
  131. <!-- MODAL ATTATCHMENTSSS -->
  132. <div class="modal fade" tabindex="-1" id="att_modal" role="dialog">
  133. <div class="modal-dialog" role="document">
  134. <div class="modal-content">
  135. <div class="modal-header">
  136. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  137. <h4 class="modal-title">Attachment</h4>
  138. </div>
  139. <div class="modal-body">
  140. <form action="{{url('client/add_file')}}" class="dropzone" id="my-awesome-dropzone">
  141. {!! csrf_field() !!}
  142. <input type="hidden" name="proj_id" class="cls-proj-id" value="">
  143. </form>
  144. </div>
  145. <div class="modal-footer">
  146. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  147. </div>
  148. </div><!-- /.modal-content -->
  149. </div><!-- /.modal-dialog -->
  150. </div><!-- /.modal -->
  151. @endsection
  152. @section('script')
  153. <script src="{{URL::asset('assets/dropzone.js')}}" type="text/javascript"></script>
  154. <script type="text/javascript">
  155. $('.upload-cls').click(function(event) {
  156. var id = $(this).prev('input').val();
  157. $('.cls-proj-id').val(id);
  158. });
  159. </script>
  160. @endsection