From df4b4534f795bd1b05b5dea30f45d329e5fa1f58 Mon Sep 17 00:00:00 2001 From: marko Date: Sun, 30 Jan 2022 18:48:44 +0100 Subject: [PATCH] added attendence overview --- homepage/participo/attendance.php | 6 +++--- homepage/participo/index.php | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/homepage/participo/attendance.php b/homepage/participo/attendance.php index 95b1817..fa7f477 100644 --- a/homepage/participo/attendance.php +++ b/homepage/participo/attendance.php @@ -174,7 +174,7 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); $attendanceCountH1 = 0; $attendanceCountH2 = 0; foreach($months as $month=>$days){ - if(1<=$month and $month<=7){ + if(1<=$month and $month<=6){ $attendanceCountH1 += count($days); } if(7<=$month and $month <= 12){ @@ -185,7 +185,7 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); $htmlTableString .= "
Gesamt zweites Halbjahr:
".$attendanceCountH2."
"; krsort($months); foreach($months as $month=>$days){ - $htmlTableString .= "
".Attendance::$NameOfMonth[$month-1]."
"; + $htmlTableString .= "
".Attendance::$NameOfMonth[$month]."
"; $htmlTableString .= "
".join(", ", $days)."
"; } $htmlTableString .= ""; @@ -273,7 +273,7 @@ foreach($usersKids as $k){ if($_SESSION['login']){ ?>
- UserAttribute::InTraining]));?> + UserAttribute::InTraining]));?> [ AppCardAction::fromArray(['caption'=>"Info", 'link'=>"infoZettel"]), ], + ])->htmlCode(). + AppCard::fromArray([ + 'link' => "attendance", + 'title' => "Teilnahme", + 'description'=> "Eine kleine Übersicht, wie wie oft man beim Training war", + 'imgUrl' => "http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/calendarIcon.svg", + 'actions' => [ + AppCardAction::fromArray(['caption'=>"Anwesenheit", 'link'=>"attendance"]), + ], ])->htmlCode() ); // @todo attendanceApp