Commit cdee249b authored by Kevin Yumang's avatar Kevin Yumang

SERV-2286 - created table body element to be used for documentation

parent 3a4f430c
......@@ -45,33 +45,20 @@
['name' => 'Three']
])
<tbody>
<tr>
<td>1</td>
<td>Eugene</td>
<td>Kopyov</td>
<td>@Kopyov</td>
</tr>
<tr>
<td>2</td>
<td>Victoria</td>
<td>Baker</td>
<td>@Vicky</td>
</tr>
<tr>
<td>3</td>
<td>James</td>
<td>Alexander</td>
<td>@Alex</td>
</tr>
<tr>
<td>4</td>
<td>Franklin</td>
<td>Morrison</td>
<td>@Frank</td>
</tr>
</tbody>
@Limitless::TableAutofillBody([
[
['value' => 'data 1 row 1'],
['value' => 'data 2 row 1'],
['value' => 'data 3 row 1'],
['value' => 'data 4 row 1']
],
[
['value' => 'data 1 row 2'],
['value' => 'data 2 row 2'],
['value' => 'data 3 row 2'],
['value' => 'data 4 row 2']
]
])
@Limitless::TableStop
......
......@@ -35,6 +35,7 @@
'Limitless::TableStart' => 'tableStart',
'Limitless::TableStop' => 'tableStop',
'Limitless::TableAutofillHeader' => 'tableAutofillHeader',
'Limitless::TableAutofillBody' => 'tableAutofillBody'
];
......@@ -51,6 +52,19 @@
}
/*
|--------------------------------------------------------------------------------------------
| Method "tableAutofillBody"
|--------------------------------------------------------------------------------------------
*/
public function tableAutofillBody($parameters)
{
return View('Limitless::Table.TableAutofillBody')
->withData( (!empty($parameters)) ? $parameters : [] );
}
/*
|--------------------------------------------------------------------------------------------
| Method "tableStart"
......
@if( !empty($data) )
<tbody>
@foreach($data as $tr)
<tr>
@foreach($tr as $td)
@if( @$td['secure'] === false)
<td> {!! $td['value'] !!} </td>
@else
<td> {{ $td['value'] }} </td>
@endif
@endforeach
</tr>
@endforeach
</tbody>
@endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment