From cf776631b028241405a5b2c41d0c03da456880f7 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 22 Dec 2015 10:41:23 +0100 Subject: [PATCH] Improvements to dashboard. All titles are outside the tables/graphics for better layout. A final touch on canvas theme. --- includes/dashboard.inc | 40 +++++++++++++++------------------- themes/canvas/default.css | 46 ++++++++++++++++++++++----------------- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/includes/dashboard.inc b/includes/dashboard.inc index f78a4cb3..69654c88 100644 --- a/includes/dashboard.inc +++ b/includes/dashboard.inc @@ -53,9 +53,12 @@ function dashboard($sel_app) display_all(); } -function display_title($title, $colspan=2) +function display_title($title) { - echo "$title\n"; + br(); + display_heading($title); + br(); + //echo "$title\n"; } function table_one() @@ -179,9 +182,9 @@ function customer_top($today, $limit=10, $width="33", &$pg=null) LIMIT $limit"; $result = db_query($sql); $title = _("Top $limit customers in fiscal year"); + display_title($title); $th = array(_("Customer"), _("Amount")); start_table(TABLESTYLE, "width='$width%'"); - display_title($title, count($th)); table_header($th); check_page_security('SA_SALESTRANSVIEW'); $k = 0; //row colour counter @@ -216,9 +219,9 @@ function supplier_top($today, $limit=10, $width="33", &$pg=null) LIMIT $limit"; $result = db_query($sql); $title = _("Top $limit suppliers in fiscal year"); + display_title($title); $th = array(_("Supplier"), _("Amount")); start_table(TABLESTYLE, "width='$width%'"); - display_title($title, count($th)); table_header($th); check_page_security('SA_SUPPTRANSVIEW'); $k = 0; //row colour counter @@ -279,12 +282,12 @@ function stock_top($today, $limit=10, $width="33", $type=0, &$pg=null) $title = _("Top $limit Fixed Assets in fiscal year"); else $title = _("Top $limit Sold Items in fiscal year"); + display_title($title); if ($type == 0) $th = array(_("Item"), _("Sales"), _("Costs"), _("Quantity")); else $th = array(_("Item"), _("Amount"), _("Quantity")); start_table(TABLESTYLE, "width='$width%'"); - display_title($title, count($th)); table_header($th); check_page_security($sec); $k = 0; //row colour counter @@ -324,9 +327,9 @@ function dimension_top($today, $limit=10, $width="33", &$pg=null) t.tran_date >= '$begin1' AND t.tran_date <= '$today1' GROUP BY d.id ORDER BY total DESC LIMIT $limit"; $result = db_query($sql, "Transactions could not be calculated"); $title = _("Top $limit Dimensions in fiscal year"); + display_title($title); $th = array(_("Dimension"), _("Amount")); start_table(TABLESTYLE, "width='$width%'"); - display_title($title, count($th)); table_header($th); check_page_security('SA_DIMTRANSVIEW'); $k = 0; //row colour counter @@ -362,8 +365,8 @@ function gl_top($today, $width="33", &$pg=null) AND tran_date <= '$today1' GROUP BY c.cid ORDER BY c.cid"; $result = db_query($sql, "Transactions could not be calculated"); $title = _("Class Balances"); - start_table(TABLESTYLE2, "width='$width%'"); display_title($title); + start_table(TABLESTYLE2, "width='$width%'"); check_page_security('SA_GLANALYTIC'); $i = 0; $total = 0; @@ -436,7 +439,8 @@ function source_graphic($today, $title, $x_axis, $pg, $graphic1, $graphic2=null, { if (count($pg->y) ==0 || (count($pg->y) == 1 && $pg->y[0] == 0)) return; - $pg->title = $title . " - " . $today; + display_title("$title ($today)"); + //$pg->title = $title . " - " . $today; $pg->axis_x = $x_axis; $pg->axis_y = _("Amount"); $pg->graphic_1 = $graphic1; @@ -475,14 +479,12 @@ function customer_trans($today) AND DATEDIFF('$today', trans.due_date) > 0 ORDER BY days DESC"; $result = db_query($sql); $title = db_num_rows($result) . _(" overdue Sales Invoices"); - br(1); - display_heading($title); - br(); + display_title($title); $th = array("#", _("Ref."), _("Date"), _("Due Date"), _("Customer"), _("Branch"), _("Currency"), _("Total"), _("Remainder"), _("Days")); start_table(TABLESTYLE); table_header($th); - $k = 0; //row colour counter + $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); @@ -517,12 +519,10 @@ function customer_recurrent_invoices($today) { $result = get_recurrent_invoices($today); $title = _("Overdue Recurrent Invoices"); - br(1); - display_heading($title); - br(); + display_title($title); $th = array(_("Description"), _("Template No"),_("Customer"),_("Branch")."/"._("Group"),_("Next invoice")); start_table(TABLESTYLE, "width=70%"); - table_header($th); + table_header($th); $k = 0; while ($myrow = db_fetch($result)) { @@ -564,9 +564,7 @@ function supplier_trans($today) AND DATEDIFF('$today', trans.due_date) > 0 ORDER BY days DESC"; $result = db_query($sql); $title = db_num_rows($result) . _(" overdue Purchase Invoices"); - br(1); - display_heading($title); - br(); + display_title($title); $th = array("#", _("Ref."), _("Date"), _("Due Date"), _("Supplier"), _("Currency"), _("Total"), _("Remainder"), _("Days")); start_table(TABLESTYLE); @@ -601,9 +599,7 @@ function bank_balance($today, $width) ORDER BY bank_account_name"; $result = db_query($sql); $title = _("Bank Account Balances"); - br(1); - display_heading($title); - br(); + display_title($title); $th = array(_("Account"), _("Balance")); start_table(TABLESTYLE, "width='$width%'"); table_header($th); diff --git a/themes/canvas/default.css b/themes/canvas/default.css index 88e66a72..490ce94c 100644 --- a/themes/canvas/default.css +++ b/themes/canvas/default.css @@ -18,6 +18,13 @@ body { background-color: #eee; + + background: -moz-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%); + background: -webkit-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%); + background: -o-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%); + background: -ms-linear-gradient(bottom, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%); + background: linear-gradient(to top, #e3eaea 0%, #e3eaea 50%, #e3eaea 51%, #d7dddd 78%, #d7dddd 100%); + margin: 0; padding: 0; text-align: center; @@ -191,7 +198,7 @@ a:visited { /* Body */ .fa-body { width: 100%; - background-color: #fff; + background-color: #f9f9f9; float: left; margin: 0; padding: 3px 0 0 0; @@ -226,7 +233,6 @@ text-decoration: none; margin: 0 1px 0 0; /*Margin between each menu item*/ border-right: 1px solid #ececec; padding: 5px 10px; -/*background-color: #045c97;*/ /*blue color theme*/ background-color: #1275ae; } @@ -271,7 +277,7 @@ h2, .titletext { padding: 5px; } .titletext { - border-bottom: 1px solid #8cacbb; + border-bottom: 1px solid #8899aa; } h3 { @@ -316,7 +322,7 @@ hr { font-weight: normal; line-height: 19px; padding: 9px; - border: 1px solid #8cacbb; + border: 1px solid #8899aa; } .menu_group_items a { @@ -431,11 +437,11 @@ hr { table.tablestyle { border-collapse: collapse; - border: 1px solid #e1e1e1; + border: 1px solid #8899aa; } table.tablestyle td { border-collapse: collapse; - border: 1px solid #e1e1e1; + border: 1px solid #8899aa; } table.tablestyle2 { border-collapse: collapse; @@ -458,7 +464,7 @@ table.tablestyle_inner td { } .label { - background-color: #ebf0f3; + background-color: #d7dbdd; color: black; } @@ -522,7 +528,7 @@ button.navibutton { .navibar { padding: 0 3px; color: #fff; - border: 1px solid #e1e1e1; + border: 1px solid #8899aa; border-collapse: collapse; background-color: #1275ae; } @@ -563,42 +569,42 @@ ul.ajaxtabs li button{ background-color: #dee7ec; padding: 3px 8px; margin: 0px; - border-top: 1px solid #8cacbb; - border-right: 1px solid #8cacbb; + border-top: 1px solid #8899aa; + border-right: 1px solid #8899aa; border-bottom: none; border-left: none; font-weight: bold; } ul.ajaxtabs li button:hover{ - border-top: 1px solid #8cacbb; + border-top: 1px solid #8899aa; color:#fff; } div.spaceBox{ - background-color: #8cacbb; + background-color: #8899aa; height:8px; - border-bottom: 1px solid #8cacbb; - border-left: 1px solid #8cacbb; - border-right:1px solid #8cacbb; + border-bottom: 1px solid #8899aa; + border-left: 1px solid #8899aa; + border-right:1px solid #8899aa; margin: 0 3px 0px 3px } div.contentBox{ - border: 1px solid #8cacbb; + border: 1px solid #8899aa; margin: 0 3px 3px 3px } ul.ajaxtabs li button.current, ul.ajaxtabs li button.current:hover{ - border-left: 1px solid #8cacbb; - background-color: #8cacbb; + border-left: 1px solid #8899aa; + background-color: #8899aa; color:#fff; } #hints { font-size: 12px; padding: 5px; - border-bottom: 1px solid #8cacbb; + border-bottom: 1px solid #8899aa; margin: -4px -2px -2px; - border: 1px solid #8cacbb; + border: 1px solid #8899aa; background-color: #ffffea; white-space: nowrap; } -- 2.30.2