From e031f29633d8f98df6e47c159fce0e9477540e3a Mon Sep 17 00:00:00 2001 From: Tim Krehan Date: Sun, 26 May 2019 18:02:06 +0200 Subject: [PATCH] formatting added id to icon for dropdown referencing --- cont/list.php | 70 ++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/cont/list.php b/cont/list.php index b12f13c..62d8246 100644 --- a/cont/list.php +++ b/cont/list.php @@ -6,36 +6,38 @@
list as $index => $item) { - if($index%2==0){$color_theme = "bg-primary";} - else{$color_theme = "bg-secondary";} - if($item->Erledigt){ - $div_item_row_color_classes = "bg-success"; - $checked = "checked"; - } - else{ - $div_item_row_color_classes = $color_theme; - $checked = ""; - } - - print_r("
"); - print_r("
"); - print_r("
$item->Anzahl $item->Einheit
"); - print_r("
$item->Name
"); - print_r("
"); - print_r("
"); + foreach ($shopping->list as $index => $item) { + if ($index % 2 == 0) { + $color_theme = "bg-primary"; + } else { + $color_theme = "bg-secondary"; } + if ($item->Erledigt) { + $div_item_row_color_classes = "bg-success"; + $checked = "checked"; + } else { + $div_item_row_color_classes = $color_theme; + $checked = ""; + } + + print_r("
"); + print_r("
"); + print_r("
$item->Anzahl $item->Einheit
"); + print_r("
$item->Name
"); + print_r("
"); + print_r("
"); + } ?>
@@ -43,18 +45,22 @@
- +
- + \ No newline at end of file