From 6108dfad55e19b436279e2f7c56c0c820ca41251 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 22 May 2015 00:46:53 +0200 Subject: [PATCH] Minor enhancement --- htdocs/admin/ihm.php | 4 +- htdocs/langs/en_US/admin.lang | 2 +- htdocs/product/composition/card.php | 186 +++++++++++++++------------- htdocs/theme/eldy/style.css.php | 66 +++++----- 4 files changed, 141 insertions(+), 117 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 41c4fe6956c..7f1d17183d2 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -283,7 +283,7 @@ if ($action == 'edit') // Edit { // Show bugtrack link $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; + print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); print ''; print ' '; @@ -469,7 +469,7 @@ else // Show { // Show bugtrack link $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; + print ''.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; print yn($conf->global->MAIN_BUGTRACK_ENABLELINK).""; print ' '; print ""; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b1d0f284501..65412df87d0 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -946,7 +946,7 @@ DoNotSuggestPaymentMode=Do not suggest NoActiveBankAccountDefined=No active bank account defined OwnerOfBankAccount=Owner of bank account %s BankModuleNotActive=Bank accounts module not enabled -ShowBugTrackLink=Show link "Report a bug" +ShowBugTrackLink=Show link "%s" ShowWorkBoard=Show "workbench" on homepage Alerts=Alerts Delays=Delays diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index f1c740523f3..cdb20e28dbf 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -326,106 +326,120 @@ if ($id > 0 || ! empty($ref)) $class='pair'; - foreach($prods_arbo as $value) + if (count($prods_arbo)) { - $productstatic->id=$value['id']; - $productstatic->type=$value['type']; - $productstatic->label=$value['label']; - - if ($value['level'] <= 1) + foreach($prods_arbo as $value) { - $class=($class=='impair')?'pair':'impair'; - print ''; + $productstatic->id=$value['id']; + $productstatic->type=$value['type']; + $productstatic->label=$value['label']; - $notdefined=0; - $productstatic->ref=$value['ref']; - $nb_of_subproduct = $value['nb']; - - print ''.$productstatic->getNomUrl(1,'composition').''; - print ''.$productstatic->label.''; - - // Best buying price - print ''; - if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0) + if ($value['level'] <= 1) { - print '   '.$langs->trans("BuyingPriceMinShort").': '; - if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0); - else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; } + $class=($class=='impair')?'pair':'impair'; + print ''; + + $notdefined=0; + $productstatic->ref=$value['ref']; + $nb_of_subproduct = $value['nb']; + + print ''.$productstatic->getNomUrl(1,'composition').''; + print ''.$productstatic->label.''; + + // Best buying price + print ''; + if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0) + { + print '   '.$langs->trans("BuyingPriceMinShort").': '; + if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0); + else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; } + } + print ''; + + $totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT'); + $total+=$totalline; + print ''; + print ($notdefined?'':($value['nb']> 1 ? $value['nb'].'x' : '').price($product_fourn->fourn_unitprice,'','',0,0,-1,$conf->currency)); + print ''; + + // Stock + if (! empty($conf->stock->enabled)) print ''.$value['stock'].''; // Real stock + + // Qty + IncDec + if ($user->rights->produit->creer || $user->rights->service->creer) + { + print ''; + print ''; + + } + else{ + print ''.$nb_of_subproduct.''; + print ''.($value['incdec']==1?'x':'' ).''; + } + + print ''."\n"; } - print ''; - - $totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT'); - $total+=$totalline; - print ''; - print ($notdefined?'':($value['nb']> 1 ? $value['nb'].'x' : '').price($product_fourn->fourn_unitprice,'','',0,0,-1,$conf->currency)); - print ''; - - // Stock - if (! empty($conf->stock->enabled)) print ''.$value['stock'].''; // Real stock - - // Qty + IncDec - if ($user->rights->produit->creer || $user->rights->service->creer) + else // By default, we do not show this. It makes screen very difficult to understand { - print ''; - print ''; + $hide=''; + if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide=' hideobject'; - } - else{ - print ''.$nb_of_subproduct.''; - print ''.($value['incdec']==1?'x':'' ).''; - } + $class=($class=='impair')?'pair':'impair'; + print ''; - print ''."\n"; + //$productstatic->ref=$value['label']; + $productstatic->ref=$value['ref']; + print ''; + for ($i=0; $i < $value['level']; $i++) print '     '; // Add indentation + print $productstatic->getNomUrl(1,'composition').''; + print ''.$productstatic->label.''; + + print ' '; + print ' '; + + if (! empty($conf->stock->enabled)) print ''; // Real stock + print ''.$value['nb'].''; + print ' '; + + print ''."\n"; + } } - else // By default, we do not show this. It makes screen very difficult to understand + + print ''; + print ''; + print ''; + + // Minimum buying price + print ''; + print $langs->trans("TotalBuyingPriceMin"); + print ''; + + print ''; + if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; + print ($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)); + print ''; + + // Stock + if (! empty($conf->stock->enabled)) print ' '; + + print ''; + if ($user->rights->produit->creer || $user->rights->service->creer) { - $hide=''; - if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide=' hideobject'; - - $class=($class=='impair')?'pair':'impair'; - print ''; - - //$productstatic->ref=$value['label']; - $productstatic->ref=$value['ref']; - print ''; - for ($i=0; $i < $value['level']; $i++) print '     '; // Add indentation - print $productstatic->getNomUrl(1,'composition').''; - print ''.$productstatic->label.''; - - print ' '; - print ' '; - - if (! empty($conf->stock->enabled)) print ''; // Real stock - print ''.$value['nb'].''; - print ' '; - - print ''."\n"; + print ''; } + print ''; + print ''."\n"; } - print ''; - print ''; - print ''; - - // Minimum buying price - print ''; - print $langs->trans("TotalBuyingPriceMin"); - print ''; - - print ''; - if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; - print ($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)); - print ''; - - // Stock - if (! empty($conf->stock->enabled)) print ' '; - - print ''; - if ($user->rights->produit->creer || $user->rights->service->creer) + else { - print ''; + $colspan=6; + if (! empty($conf->stock->enabled)) $colspan++; + + print ''; + print ''.$langs->trans("None").''; + print ''; } - print ''; - print ''."\n"; + print ''; /*if($user->rights->produit->creer || $user->rights->service->creer) { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index fc905b056e4..da118d8d7cd 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1037,8 +1037,8 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks border-right: 1px solid #BBB; border-bottom: 1px solid #BBB; border-top: 1px solid #BBB; - border-radius: 5px; - -moz-border-radius: 5px; + border-radius: 4px; + -moz-border-radius: 4px; -moz-box-shadow: 3px 3px 4px #DDD; -webkit-box-shadow: 3px 3px 4px #DDD; box-shadow: 3px 3px 4px #DDD; @@ -1061,8 +1061,8 @@ div.blockvmenusearch border-right: 1px solid #CCC; border-bottom: 1px solid #CCC; border-top: 1px solid #CCC; - border-radius: 5px; - -moz-border-radius: 5px; + border-radius: 4px; + -moz-border-radius: 4px; -moz-box-shadow: 3px 3px 4px #DDD; -webkit-box-shadow: 3px 3px 4px #DDD; box-shadow: 3px 3px 4px #DDD; @@ -1142,9 +1142,9 @@ td.photo { background-repeat: repeat-x !important; border: 1px solid #CCC !important; - -moz-border-radius: 5px 5px 5px 5px !important; - -webkit-border-radius: 5px 5px 5px 5px !important; - border-radius: 5px 5px 5px 5px !important; + -moz-border-radius: 4px 4px 4px 4px !important; + -webkit-border-radius: 4px 4px 4px 4px !important; + border-radius: 4px 4px 4px 4px !important; -moz-box-shadow: 2px 2px 4px #DDD; -webkit-box-shadow: 2px 2px 4px #DDD; box-shadow: 2px 2px 4px #DDD; @@ -1377,9 +1377,9 @@ div.tabBar { padding-right: px; padding-bottom: px; margin: 0px 0px 14px 0px; - -moz-border-radius:6px; - -webkit-border-radius: 6px; - border-radius: 6px; + -moz-border-radius:4px; + -webkit-border-radius: 4px; + border-radius: 4px; border-right: 1px solid #AAA; border-bottom: 1px solid #AAA; border-left: 1px solid #AAA; @@ -1433,7 +1433,14 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { border-left: 1px solid #BBB; border-top: 1px solid #CCC; */ - + + border-right: 1px solid transparent; + border-left: 1px solid transparent; + border-top: 1px solid transparent; + -moz-border-radius:4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; + background-image: none !important; } @@ -1447,6 +1454,9 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { border-right: 1px solid #AAA !important; border-left: 1px solid #AAA !important; border-top: 1px solid #BBB !important; + -moz-border-radius:4px 4px 0 0; + -webkit-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; } a.tab:hover { @@ -1475,9 +1485,9 @@ span.tabspan { margin: 0em 0.2em; text-decoration: none; white-space: nowrap; - -moz-border-radius:6px 6px 0px 0px; - -webkit-border-radius:6px 6px 0px 0px; - border-radius:6px 6px 0px 0px; + -moz-border-radius:4px 4px 0px 0px; + -webkit-border-radius:4px 4px 0px 0px; + border-radius:4px 4px 0px 0px; border-: 1px solid #555555; border-: 1px solid #D8D8D8; @@ -1517,7 +1527,7 @@ div.divButAction { margin-bottom: 1.4em; } border: 1px solid transparent; border-radius: 4px; */ - + font-weight: normal; border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); @@ -2220,7 +2230,7 @@ div.tabBar .noborder { margin-bottom: 8px !important;*/ border: 1px solid #AAA; text-align: center; - border-radius: 5px; + border-radius: 4px; } .boxtable { @@ -2317,9 +2327,9 @@ div.warning { padding: 0.3em 0.3em 0.3em 0.3em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #e0d0b0; - -moz-border-radius:6px; - -webkit-border-radius: 6px; - border-radius: 6px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; background: #EFDF9A; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } @@ -2329,9 +2339,9 @@ div.error { padding: 0.3em 0.3em 0.3em 0.3em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #DC9CAB; - -moz-border-radius:6px; - -webkit-border-radius: 6px; - border-radius: 6px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; background: #EFCFCF; } @@ -2341,9 +2351,9 @@ div.info { padding: 0.4em 0.4em 0.4em 0.4em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #DFBF9A; - -moz-border-radius:6px; - -webkit-border-radius: 6px; - border-radius:6px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; background: #EFCFAA; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } @@ -2506,9 +2516,9 @@ table.valid { z-index: 3000; background-color: #FFF; opacity: 1; - -moz-border-radius:6px; - -webkit-border-radius: 6px; - border-radius: 6px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; } #tiptip_content { background-color: rgb(255,255,255);