<?php

$tpl['masterdetailmodel'] = str_replace("/","","\$this->modelview = new  \App\Models\/".$module."();");
$tpl['masterdetaildelete'] = '\DB::table(\''.$info['table'].'\')->whereIn(\''.$info['key'].'\',$request->input(\'ids\'))->delete();';
$tpl['masterdetailview'] ='	<hr />
	
	<h5> '.$info['title'].' </h5>
	
	<div class="table-responsive">
    <table class="table table-striped ">
        <thead>
			<tr>
				<th class="number"> No </th>
					@foreach ($subgrid[\'tableGrid\'] as $t)
					@if($t[\'view\'] ==\'1\')
						<th>{{ $t[\'label\'] }}</th>
					@endif
				@endforeach
				
			  </tr>
        </thead>

        <tbody>
            @foreach ($subgrid[\'rowData\'] as $row)
            <tr>
				<td width="30">  </td>		
			 @foreach ($subgrid[\'tableGrid\'] as $field)
				 @if($field[\'view\'] ==\'1\' )		
				 	<td> {!! SiteHelpers::formatRows($row->$field[\'field\'],$field) !!}</td>				 
				 @endif					 
			 
			 @endforeach
			@endforeach
			</tr> 


        </tbody>	

     </table>   
     </div>';     

$tpl['masterdetailjs'] = '

jQuery(document).ready(function($){  moveCopySrc();  });

$(\'.addC\').relCopyForm({moveParent:"#addChildRows"});';     
