Jeremy Newman : html_note now is formatted with bootstrap panel
Jeremy Newman
jnewman at winehq.org
Mon Nov 21 08:38:09 CST 2016
Module: appdb
Branch: master
Commit: 9cdeb34124e8ef6d30fc19b6a15c42bb02331b55
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=9cdeb34124e8ef6d30fc19b6a15c42bb02331b55
Author: Jeremy Newman <jnewman at codeweavers.com>
Date: Thu Nov 17 14:08:54 2016 -0600
html_note now is formatted with bootstrap panel
---
include/html.php | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/include/html.php b/include/html.php
index fe46455..3af125c 100644
--- a/include/html.php
+++ b/include/html.php
@@ -198,18 +198,15 @@ function make_inx_option_list($varname, $inx = null)
}
-/* Displays a note box */
-function html_note($shTitle, $shBody)
+/* Displays a note box using bootstrap panel */
+/* mode: default, primary, success, info, warning, danger */
+function html_note($heading = '', $body = '', $footer = '', $mode = 'default')
{
- $shRet = '<div class="note_container">';
- $shRet .= '<div class="note_title">';
- $shRet .= $shTitle;
- $shRet .= '</div>';
- $shRet .= '<div class="note_body">';
- $shRet .= $shBody;
- $shRet .= '</div></div>';
-
- return $shRet;
+ return "<div class=\"panel panel-{$mode}\">\n".
+ ($heading ? "<div class=\"panel-heading\">{$heading}</div>\n" : '').
+ ($body ? "<div class=\"panel-body\">{$body}</div>\n" : '').
+ ($footer ? "<div class=\"panel-heading\">{$footer}</div>\n" : '').
+ "</div>\n";
}
function html_radiobuttons($aIds, $aOptions, $sName, $sDefault = '', $bLineBreaks = true)
More information about the wine-cvs
mailing list