c3lf-system-3/templates/found_item_table.php
2019-03-02 02:17:53 +01:00

82 lines
No EOL
2.8 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: jedi
* Date: 2/22/19
* Time: 9:34 PM
*/
?>
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>UID</th>
<th>was</th>
<!--th>wann</th>
<th>wo</th-->
<th>kiste</th>
<th>foto</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>UID</th>
<th>was</th>
<!--th>wann</th>
<th>wo</th-->
<th>kiste</th>
<th>foto</th>
<th></th>
</tr>
</tfoot>
<tbody>
<?php
foreach( get_founditems() as $item){
?>
<tr>
<td><?php echo $item["uid"]; ?> </td>
<td><?php echo $item["was"]; ?></td>
<!--td><?php echo $item["wann"]; ?></td>
<td><?php echo $item["wo"]; ?></td-->
<td><?php echo $item["container"];?></td>
<td>
<?php
if(isset($item["files"])){
?>
<button class="btn btn-link" data-toggle="modal" data-target="#exampleModal_picture" onclick="show_picture('<?php echo $item["files"][0]["hash"]; ?>')">
<img style="height: 48px;" src="/thumb/<?php echo $item["files"][0]["hash"]; ?>">
</button>
<?php
}
?>
</td>
<td>
<div class="btn-group" role="group">
<button type="button" class="btn btn-outline-secondary"><i class="fas fa-fw fa-check-circle"></i></button>
<!--<a href="/found_item_edit/<?php echo $item["id"]; ?>/" type="button" class="btn btn-outline-secondary"><i class="fas fa-fw fa-edit"></i></a>-->
<button type="button" class="btn btn-outline-secondary" data-toggle="modal" data-target="#exampleModal"
onclick='fill_edit_form(<?php echo json_encode($item); ?>);' title="edit">
<i class="fas fa-fw fa-edit"></i>
</button>
<button type="button" class="btn btn-outline-danger" onclick="delete_item(<?php echo $item["id"]; ?>)" title="delete"><i class="fas fa-fw fa-trash-alt"></i></button>
</div>
</td>
<!--td>
<?php
foreach(explode(",",$item["tags"]) as $tag){
?>
<span class="label label-default"><?php echo $tag; ?></span>
<?php
}
?>
</td>
<td><?php echo $item["id"]; ?></td-->
</tr>
<?php
}
?>
</tbody>
</table>