| Zeile 336... |
Zeile 336... |
| 336 |
$dirs = Directory::with( 'medium.medium' )->where( "directory_id", $dirId )->whereIn( 'status', [
|
336 |
$dirs = Directory::with( 'medium.medium' )->where( "directory_id", $dirId )->whereIn( 'status', [
|
| 337 |
0,
|
337 |
0,
|
| 338 |
99
|
338 |
99
|
| 339 |
] )->orderBy( 'kennung' )->orderBy( 'name' )->get();
|
339 |
] )->orderBy( 'kennung' )->orderBy( 'name' )->get();
|
| 340 |
$items = Item::with( 'price', 'medium.medium', 'manufacturer' )->where( "directory_id", $dirId )->where( 'status', '=', 0 )->get();
|
340 |
$items = Item::with( 'price', 'medium.medium', 'manufacturer' )->where( "directory_id", $dirId )->where( 'status', '=', 0 )->get();
|
| 341 |
$subdir = Directory::with( 'medium.medium', 'template.template' )->find( $dirId );
|
341 |
$subdir = Directory::with( 'medium.medium', 'template.template', 'manufacturer' )->find( $dirId );
|
| 342 |
$subdir["subdirs"] = $dirs->reject( function ( $value, $key )
|
342 |
$subdir["subdirs"] = $dirs->reject( function ( $value, $key )
|
| 343 |
{
|
343 |
{
|
| 344 |
return $value->articlemaster == 1;
|
344 |
return $value->articlemaster == 1;
|
| 345 |
} );
|
345 |
} );
|
| 346 |
$subdir["items"] = $items;
|
346 |
$subdir["items"] = $items;
|
| 347 |
$template = 'subdir';
|
347 |
$template = 'subdir';
|
| - |
|
348 |
if( $subdir->articlemaster == 1 )
|
| - |
|
349 |
{
|
| - |
|
350 |
$template = 'artstamm';
|
| - |
|
351 |
}
|
| 348 |
$artstaemmeItems = array();
|
352 |
$artstaemmeItems = array();
|
| 349 |
if ( is_countable( $subdir->template ) && isset( $subdir->template[0] ) )
|
353 |
if ( is_countable( $subdir->template ) && isset( $subdir->template[0] ) )
|
| 350 |
{
|
354 |
{
|
| 351 |
$template = substr( $subdir->template[0]->template->template_value, strpos( $subdir->template[0]->template->template_value, "=" ) + 1 );
|
355 |
$template = substr( $subdir->template[0]->template->template_value, strpos( $subdir->template[0]->template->template_value, "=" ) + 1 );
|
| 352 |
}
|
356 |
}
|