From b7fd908d538ed19fe41f03c0a3f93351d8da64e9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:15:40 +0200 Subject: Adding upstream version 2.5.0. Signed-off-by: Daniel Baumann --- application/views/helpers/FormSimpleNote.php | 15 +++++++++++ application/views/helpers/RenderStateBadges.php | 33 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 application/views/helpers/FormSimpleNote.php create mode 100644 application/views/helpers/RenderStateBadges.php (limited to 'application/views/helpers') diff --git a/application/views/helpers/FormSimpleNote.php b/application/views/helpers/FormSimpleNote.php new file mode 100644 index 0000000..d8315f4 --- /dev/null +++ b/application/views/helpers/FormSimpleNote.php @@ -0,0 +1,15 @@ +_getInfo($name, $value); + extract($info); // name, value, attribs, options, listsep, disable + return $value; + } +} diff --git a/application/views/helpers/RenderStateBadges.php b/application/views/helpers/RenderStateBadges.php new file mode 100644 index 0000000..70633aa --- /dev/null +++ b/application/views/helpers/RenderStateBadges.php @@ -0,0 +1,33 @@ + $cnt) { + if ($cnt === 0 + || $state === 'OK' + || $state === 'UP' + ) { + continue; + } + + $html .= '' + . $cnt . ''; + } + + if ($html !== '') { + $html = '
' . $html . '
'; + } + + return $html; + } +} -- cgit v1.2.3