From 73cf4d41106b68aa3dc7e10ec6af8dd9652abe4d Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 12 Nov 2012 16:04:51 +0100 Subject: [PATCH] Adding display header functions --- main/inc/lib/display.lib.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 7f46105f6a..1da0d4b3df 100644 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -1286,13 +1286,13 @@ class Display { return 'data_table'; } - public static function page_header($title, $second_title = null) { + public static function page_header($title, $second_title = null, $size = 'h1') { $title = Security::remove_XSS($title); if (!empty($second_title)) { $second_title = Security::remove_XSS($second_title); $title .= " $second_title"; } - return ''; + return ''; } public static function page_header_and_translate($title, $second_title = null) { @@ -1306,11 +1306,15 @@ class Display { } public static function page_subheader($title, $second_title = null) { - if (!empty($second_title)) { - $second_title = Security::remove_XSS($second_title); - $title .= " $second_title"; - } - return ''; + return self::page_header($title, $second_title, 'h2'); + } + + public static function page_subheader2($title, $second_title = null) { + return self::page_header($title, $second_title, 'h3'); + } + + public static function page_subheader3($title, $second_title = null) { + return self::page_header($title, $second_title, 'h4'); } public static function description($list) { @@ -1377,7 +1381,7 @@ class Display { return $html; } - public static function label($content, $type = null) { + public static function label($content, $type = null, $full_content = null) { $class = ''; switch ($type) { case 'success': @@ -1398,8 +1402,8 @@ class Display { } $html = ''; - if (!empty($content)) { - $html = ''; + if (!empty($content)) { + $html = ''; $html .= $content; $html .=''; }