123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- @extends('layouts.master')
- @section('style')
- <link href="{{URL::asset('assets/dropzone/dropzone.css')}}" rel="stylesheet" type="text/css"/>
- <style type="text/css">
- .cls-show-time{
- color: #000;
- font-style: italic;
- font-size: 12px;
- }
- </style>
- @endsection
- @section('content')
- <!-- Main content -->
- <section class="content">
- <!-- Main row -->
- <div class="row">
- <div class="col-md-7">
- <section class="panel tasks-widget">
- <header class="panel-heading">
- WORK PROGRESS
- </header>
- <div class="table-responsive project-list">
- <table class="table table-striped">
- <thead>
- <tr>
- <th colspan="2">
- Project Name
- </th>
- <th>
- Client
- </th>
- <th>
- Description
- </th>
- <th>
- Action
- </th>
- </tr>
- </thead>
- <tbody>
- @if (session('data'))
- <div class="alert alert-success">
- {{ session('data') }}
- </div>
- @endif
- @foreach($projj as $proj)
- <tr>
- <td>
- <div class="task-checkbox">
- <input class="flat-grey" type="checkbox"/>
- </div>
- </td>
- <td>
- <a href="{{url("admin/project_details/$proj->id")}}">{{$proj->name}}</a>
- <span class="cls-show-time">
- @if(count($proj->tasks) > 0)
- <?php
- $pend = 0;
- $donee = 0;
- $not_assign = 0;
- ?>
- @foreach($proj->tasks as $pt)
- @if($pt->user_id == 0)
- <?php $not_assign++; ?>
- @elseif($pt->status < 6 && $pt->user_id > 0)
- <?php $pend++; ?>
- @elseif($pt->status == 6)
- <?php $donee++; ?>
- @endif
- @endforeach
- <br>
- Not Assigned: {{$not_assign}},
- Pending: {{$pend}},
- Done: {{$donee++}}
- @else
- {{"No tasks added"}}
- @endif
- </span>
- <br>
- <small>
- <i class="fa fa-clock-o">
- </i>
- Created {{$proj->created_time}}
- </small>
- </br>
- </td>
- <td>
- {{$proj->client->name or 'No client selected'}}
- </td>
- <td>
- {{str_limit($proj->description, $limit = 30, $end = '...')}}
- </td>
- <td>
- <a href="" style="color: #7dcc93;">
- <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
- </a>
-
- <a onclick="return confirm ('want to delete?')" href="{{url("admin/remove_proj/$proj->id")}}" style="color:#FD4B39;">
- <i class="fa fa-times" aria-hidden="true"></i>
- </a>
- <input type="hidden" id="proj_id" value="{{$proj->id}}">
-
- <i class="fa fa-paperclip upload-cls" aria-hidden="true" data-toggle="modal" data-target="#att_modal"></i>
- </td>
- </tr>
- @endforeach
-
-
- </tbody>
- </table>
- <hr>
- </hr>
- </div>
- <div class="panel-body">
- <div class=" add-task-row">
- </div>
- <div class="table-foot">
-
- </div>
- </div>
- </section>
- </div>
- <div class="col-md-5">
- <div class="panel">
- <header class="panel-heading">
- Add Project
- </header>
- <div class="ibox-content">
- @include('layouts.message')
- <form role="form" action="{{url('admin/add_proj')}}" method="POST">
- {!! csrf_field() !!}
- <div class="form-group">
- <label for="Add new Project">
- New Project
- </label>
- <input name="proj_name" class="form-control" id="new-project" placeholder="Add new project" required="" type="new-project">
- </input>
- </div>
- <div class="form-group">
- <label for="Add new Project">
- Client
- </label>
- <select name="client_id" id="" class="form-control">
- <option>Select client</option>
- @foreach($client_list as $client)
- <option value="{{ $client->id }}">{{ $client->name }}</option>
- @endforeach
- </select>
- </div>
- <div class="form-group">
- <label for="Add new Project">
- Description
- </label>
- <textarea name="description" rows="5" class="form-control" id="new-project" placeholder="Add new project" ></textarea>
- </div>
- <div class="form-group">
- <button class="btn btn-info" type="submit">
- Submit
- </button>
- </div>
- </form>
- <p>
- </p>
-
- </div>
-
- </div>
- </div>
- </div>
- </section>
- <!-- row end -->
- <!-- /.content -->
- <!-- MODAL ATTATCHMENTSSS -->
- <div class="modal fade" tabindex="-1" id="att_modal" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title">Attachment</h4>
- </div>
- <div class="modal-body">
- <form action="{{url('admin/add_file')}}" class="dropzone" id="my-awesome-dropzone">
- {!! csrf_field() !!}
-
- <input type="hidden" name="proj_id" class="cls-proj-id" value="">
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
-
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
- @endsection
- @section('script')
- <script src="{{URL::asset('assets/dropzone.js')}}" type="text/javascript"></script>
- <script type="text/javascript">
-
- $('.upload-cls').click(function(event) {
-
- var id = $(this).prev('input').val();
- $('.cls-proj-id').val(id);
- });
- </script>
- @endsection
|