2025-08-10 09:35:25 +00:00
< ? php
/**
* @ var \App\View\AppView $this
* @ var iterable < \Cake\Datasource\EntityInterface > $productPhotos
*/
?>
< div class = " productPhotos index content " >
< ? = $this -> Html -> link ( __ ( 'New Product Photo' ), [ 'action' => 'add' ], [ 'class' => 'button float-right' ]) ?>
< h3 >< ? = __ ( 'Product Photos' ) ?> </h3>
< div class = " table-responsive " id = " table-container " >
< table >
< thead >
< tr >
< th >< ? = $this -> Paginator -> sort ( 'id' ) ?> </th>
2025-11-04 07:15:31 +00:00
< th >< ? = $this -> Paginator -> sort ( 'product_category_id' ) ?> </th>
2025-08-10 09:35:25 +00:00
< th >< ? = $this -> Paginator -> sort ( 'product_id' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'product_sku_id' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'photo_filename' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'primary_photo' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'photo_position' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'enabled' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'created' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'modified' ) ?> </th>
< th >< ? = $this -> Paginator -> sort ( 'deleted' ) ?> </th>
< th class = " actions " >< ? = __ ( 'Actions' ) ?> </th>
</ tr >
</ thead >
< tbody >
< ? php foreach ( $productPhotos as $productPhoto ) : ?>
< tr >
< td >< ? = h ( $productPhoto -> id ) ?> </td>
2025-11-04 07:15:31 +00:00
< td >< ? = $productPhoto -> hasValue ( 'product_category' ) ? $this -> Html -> link ( $productPhoto -> product_category -> name , [ 'controller' => 'ProductCategories' , 'action' => 'view' , $productPhoto -> product_category -> internal_id ]) : '' ?> </td>
2025-08-10 09:35:25 +00:00
< td >< ? = $productPhoto -> hasValue ( 'product' ) ? $this -> Html -> link ( $productPhoto -> product -> name , [ 'controller' => 'Products' , 'action' => 'view' , $productPhoto -> product -> id ]) : '' ?> </td>
2025-11-04 07:15:31 +00:00
< td >< ? = $productPhoto -> hasValue ( 'product_sku' ) ? $this -> Html -> link ( $productPhoto -> product_sku -> sku , [ 'controller' => 'ProductSkus' , 'action' => 'view' , $productPhoto -> product_sku -> id ]) : '' ?> </td>
2025-08-10 09:35:25 +00:00
< td >< ? = h ( $productPhoto -> photo_filename ) ?> </td>
< td >< ? = h ( $productPhoto -> primary_photo ) ?> </td>
< td >< ? = $this -> Number -> format ( $productPhoto -> photo_position ) ?> </td>
< td >< ? = h ( $productPhoto -> enabled ) ?> </td>
< td >< ? = h ( $productPhoto -> created ) ?> </td>
< td >< ? = h ( $productPhoto -> modified ) ?> </td>
< td >< ? = h ( $productPhoto -> deleted ) ?> </td>
< td class = " actions " >
< ? = $this -> Html -> link ( __ ( 'View' ), [ 'action' => 'view' , $productPhoto -> id ]) ?>
< ? = $this -> Html -> link ( __ ( 'Edit' ), [ 'action' => 'edit' , $productPhoto -> id ]) ?>
< ? = $this -> Form -> postLink ( __ ( 'Delete' ), [ 'action' => 'delete' , $productPhoto -> id ], [ 'confirm' => __ ( 'Are you sure you want to delete # {0}?' , $productPhoto -> id )]) ?>
</ td >
</ tr >
< ? php endforeach ; ?>
</ tbody >
</ table >
</ div >
< div class = " paginator " >
< ul class = " pagination " >
< ? = $this -> Paginator -> first ( '<< ' . __ ( 'first' )) ?>
< ? = $this -> Paginator -> prev ( '< ' . __ ( 'previous' )) ?>
< ? = $this -> Paginator -> numbers () ?>
< ? = $this -> Paginator -> next ( __ ( 'next' ) . ' >' ) ?>
< ? = $this -> Paginator -> last ( __ ( 'last' ) . ' >>' ) ?>
</ ul >
< p >< ? = $this -> Paginator -> counter ( __ ( 'Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total' )) ?> </p>
</ div >
</ div >