diff --git a/langs/en/actions.json b/langs/en/actions.json index d340a19..8ccd842 100644 --- a/langs/en/actions.json +++ b/langs/en/actions.json @@ -1,4 +1,6 @@ { + "New": "New", + "Add Person": "Add Person", "Add Camper": "Add Camper", "Add Adult": "Add Adult", "Add Youth": "Add Youth", @@ -15,5 +17,6 @@ "View Payments": "View Payments", "Manual Entry": "Manual Entry", "View Expiring": "View Expiring", + "Filter": "Filter", "Remove Filter": "Remove Filter" } diff --git a/langs/en/labels.json b/langs/en/labels.json index 26f9989..29225c0 100644 --- a/langs/en/labels.json +++ b/langs/en/labels.json @@ -7,6 +7,7 @@ "Adult": "Adult", "Adults": "Adults", "Youth": "Youth", + "All": "All", "Days": "Days", "Position": "Position", "Parent Phone": "Parent Phone", diff --git a/pages.php b/pages.php index de0a66a..81b55e2 100644 --- a/pages.php +++ b/pages.php @@ -17,7 +17,8 @@ define("PAGES", [ "icon" => "fas fa-user", "styles" => [ "static/css/datatables.min.css", - "static/css/tables.css" + "static/css/tables.css", + "static/css/people.css" ], "scripts" => [ "static/js/datatables.min.js", diff --git a/pages/people.php b/pages/people.php index 08707c2..c58bd45 100644 --- a/pages/people.php +++ b/pages/people.php @@ -7,23 +7,43 @@ redirectIfNotLoggedIn(); $user = new User($_SESSION['uid']); + +$where = []; +$filter = $Strings->get("Filter", false); +if (!empty($VARS['filter']) && preg_match("/(camper|adult|youth)/", $VARS['filter'])) { + $where = [ + $VARS['filter'] . 'id[!]' => null + ]; + $filter = $Strings->get(ucfirst($VARS['filter'] . ($VARS['filter'] == "youth" ? "" : "s")), false); +} ?> -
- get("Add Camper"); ?> - get("Add Adult"); ?> - get("Add Youth"); ?> - null - ]; - ?> -
build("Only showing {x}s.", ["x" => $VARS['filter']]); ?>   get("Remove Filter"); ?>
- +
+
+ +
+
diff --git a/static/css/people.css b/static/css/people.css new file mode 100644 index 0000000..a79f0ed --- /dev/null +++ b/static/css/people.css @@ -0,0 +1,9 @@ +/* +This Source Code Form is subject to the terms of the Mozilla Public +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/. +*/ + +.btn.dropdown-toggle:before { + display: none; +} \ No newline at end of file