From d8476f244dd0ee1bccaab53f123fa12f2a9c9501 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 24 Nov 2017 10:02:52 +0100 Subject: complete feature contact info for angeltypes, fixes #275 --- includes/sys_template.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'includes/sys_template.php') diff --git a/includes/sys_template.php b/includes/sys_template.php index a659a7f3..662283b1 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -211,6 +211,20 @@ function page_with_title($title, $elements) return '

' . $title . '

' . join($elements) . '
'; } +/** + * Renders a description based on the data arrays key and values as label an description. + * @param array $data + */ +function description($data) { + $elements = []; + foreach($data as $label => $description) { + if(!empty($label) && !empty($description)) { + $elements[] = '
' . $label . '
' . $description . '
'; + } + } + return '
' . join($elements) . '
'; +} + /** * Rendert eine Datentabelle * -- cgit v1.2.3-54-g00ecf