Add info cards to home page
This commit is contained in:
parent
f65a9d33ff
commit
a76b3907a3
@ -5,5 +5,7 @@
|
||||
"Save": "Save",
|
||||
"Delete": "Delete",
|
||||
"Cancel": "Cancel",
|
||||
"Edit Family": "Edit Family"
|
||||
"Edit Family": "Edit Family",
|
||||
"View Families": "View Families",
|
||||
"View Payments": "View Payments"
|
||||
}
|
||||
|
@ -21,5 +21,6 @@
|
||||
"Graduated": "Graduated",
|
||||
"Okay to use photos?": "Okay to use photos?",
|
||||
"Adding Family": "Adding Family",
|
||||
"Editing Family": "Editing {family} Family"
|
||||
"Editing Family": "Editing {family} Family",
|
||||
"Recent Payments": "Recent Payments"
|
||||
}
|
||||
|
@ -3,4 +3,30 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
?>
|
||||
<h1>Hello World</h1>
|
||||
<div class="card-deck">
|
||||
<div class="card bg-indigo text-light">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><?php $Strings->get("Families") ?></h4>
|
||||
<h1><i class="fas fa-fw fa-users"></i> <?php echo $database->count('families'); ?></h1>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="app.php?page=families" class="text-light"><i class="fas fa-arrow-right"></i> <?php $Strings->get("View Families"); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-green text-light">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title"><?php $Strings->get("Recent Payments") ?></h4>
|
||||
<h1><i class="fas fa-fw fa-dollar-sign"></i> <?php
|
||||
$amounts = $database->select("payments", "amount", ["AND" => ["paid" => 1, "date[>]" => date("Y-m-d H:i:s", strtotime("-30 days"))]]);
|
||||
$total = 0.0;
|
||||
foreach ($amounts as $amt) {
|
||||
$total += $amt;
|
||||
}
|
||||
echo number_format($total, 2);
|
||||
?></h1>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="app.php?page=payments" class="text-light"><i class="fas fa-arrow-right"></i> <?php $Strings->get("View Payments"); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user