@extends('layouts.admin')
@section('pageTitle')
<title>Best Insurance | Completed Leads</title>
@stop
@section('pageCss')
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/datepicker/datepicker3.css') }}">
<script src="https://cdn.ckeditor.com/4.11.4/standard-all/ckeditor.js"></script>
@stop
@section('content')
<section class="content">

  <div class="">
   <div class="box-body no-padding">
    <div class="form-group col-md-12" style="border-right: 2px solid #ccc;">
     <form action="{{url('/account/notes/post')}}" method="post">
     {!!csrf_field()!!}
     <input type="hidden" name="lead_id" value="{{$information->id}}"/>
     <textarea cols="80" id="notes" name="notes" rows="10" data-sample-short></textarea>
     <input type="submit" name="Add notes" value="Add notes"/>
     </form>
    </div>
  </div>

  <div class="notes">
  	@if(@count($information->notes)>0)
  	<h3 class="pull-right">Total Notes :: {{@count($information->notes)}}</h3><br/>
  		@foreach($information->notes as $note)
  			<h3>{!!$note->notes!!}</h3><hr>
  			<p class="pull-right">
  				<b>{!!$note->added_user->profile->first_name!!}</b> Added note on 
  				<b>{!!$note->created_at->format('d/m/Y H:m:i')!!}</b>
  			</p>
  		@endforeach
  	@else
  		<h1>No Notes till now</h1>
  	@endif
  </div>


</div>

<!-- </div> -->
</section>
@stop
@section('pageBottomJs')
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/iCheck/all.css') }}">
<!-- iCheck 1.0.1 -->
<script type="text/javascript">
	CKEDITOR.replace('notes', {
	  uiColor: '#3c8dbc'
	});
</script>
@stop