From 6dba88ab6e9d85b0bd183eaa83c6c56667b89063 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jun 2018 14:23:07 +0200 Subject: [PATCH] Several fixes in look and feel --- htdocs/contrat/card.php | 19 +++++++++-- htdocs/core/tpl/extrafields_view.tpl.php | 4 +-- htdocs/exports/index.php | 4 +-- htdocs/imports/import.php | 41 +++++++++++++----------- htdocs/imports/index.php | 2 +- htdocs/theme/eldy/style.css.php | 24 ++++++++------ htdocs/theme/md/style.css.php | 2 +- 7 files changed, 59 insertions(+), 37 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 83b8e75a8fd..d0120d130df 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2147,13 +2147,28 @@ else if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) { - print '
'.$langs->trans("ActivateAllContracts").'
'; + if ($user->rights->contrat->activer) + { + print '
'.$langs->trans("ActivateAllContracts").'
'; + } + else + { + print '
'.$langs->trans("ActivateAllContracts").'
'; + } } if ($object->nbofservicesclosed < $nbofservices) { + if ($user->rights->contrat->desactiver) + { + print '
'.$langs->trans("CloseAllContracts").'
'; + } + else + { + print '
'.$langs->trans("CloseAllContracts").'
'; + } + //if (! $numactive) //{ - print '
'.$langs->trans("CloseAllContracts").'
'; //} //else //{ diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index dca4578e4a8..52586490a43 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -90,11 +90,11 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] else { print ''; - print ''; + print ''; print ''; print ''; print 'attributes[$object->table_element]['required'][$key])) print ' fieldrequired'; print '">'; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index b23d1ff6ab7..bccf25f1be8 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -93,11 +93,11 @@ if (count($export->array_export_code)) { if ($user->rights->export->creer) { - print ''.$langs->trans("NewExport").''; + print ''.$langs->trans("NewExport").''; } else { - print ''.$langs->trans("NewExport").''; + print ''.$langs->trans("NewExport").''; } /* print '
'; print ''; - print $langs->trans("ChooseFormatOfFileToImport",img_picto('','filenew')).'
'; + print ''.$langs->trans("ChooseFormatOfFileToImport",img_picto('','filenew')).'

'; print '
'; $filetoimport=''; @@ -552,12 +552,12 @@ if ($step == 3 && $datatoimport) print ''; print ''; + print ''.$langs->trans("ChooseFileToImport",img_picto('','filenew')).'

'; + print '
'; $filetoimport=''; - print ''; - //print ''; // Input file name box @@ -835,8 +835,8 @@ if ($step == 4 && $datatoimport) print ''; print ''; print ''; - print '
'.$langs->trans("ChooseFileToImport",img_picto('','filenew')).'
'.$langs->trans("FileWithDataToImport").'
'; - print $langs->trans("SelectImportFields",img_picto('','uparrow','')).' '; + print '
'; + print $langs->trans("SelectImportFields",img_picto('','grip_title','')).' '; $htmlother->select_import_model($importmodelid,'importmodelid',$datatoimport,1); print ''; print '
'; @@ -869,7 +869,7 @@ if ($step == 4 && $datatoimport) $lefti=1; foreach ($array_match_file_to_database as $key => $val) { - + $var=!$var; show_elem($fieldssource,$key,$val,$var); // key is field number in source file //print '> '.$lefti.'-'.$key.'-'.$val; $listofkeys[$key]=1; @@ -886,7 +886,7 @@ if ($step == 4 && $datatoimport) $num=count($fieldssource); while ($lefti <= $num) { - + $var=!$var; $newkey=getnewkey($fieldssource,$listofkeys); show_elem($fieldssource,$newkey,'',$var); // key start after field number in source file //print '> '.$lefti.'-'.$newkey; @@ -905,11 +905,12 @@ if ($step == 4 && $datatoimport) $height=24; $i = 0; $mandatoryfieldshavesource=true; + $var=true; print ''; foreach($fieldstarget as $code=>$label) { - - print ''; + $var = !$var; + print ''; $i++; $entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]); @@ -1124,7 +1125,7 @@ if ($step == 4 && $datatoimport) print ''; print ''; print ''; - + print ''; print ''; + // Keys for update print ''; print ''; print ''; print ''; print '
'.$langs->trans("ImportModelName").' 
'; print ''; @@ -1314,6 +1315,7 @@ if ($step == 5 && $datatoimport) if ($action == 'launchsimu') print '   '.$langs->trans("Modify").''; print '
'; print $langs->trans("KeysToUseForUpdates"); print ''; @@ -1331,15 +1333,15 @@ if ($step == 5 && $datatoimport) } print '   '.$langs->trans("Modify").''; } else { - if (count($objimport->array_import_updatekeys[0])) - { - print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%'); - } + if (count($objimport->array_import_updatekeys[0])) + { + print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%'); + print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt")); + } else { - print ''.$langs->trans("UpdateNotYetSupportedForThisImport").''; + print ''.$langs->trans("UpdateNotYetSupportedForThisImport").''; } - print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt")); } /*echo '
';
 	print_r($objimport->array_import_updatekeys);
@@ -1427,7 +1429,8 @@ if ($step == 5 && $datatoimport)
     if ($action != 'launchsimu')
     {
         // Show import id
-        print $langs->trans("NowClickToTestTheImport",$langs->transnoentitiesnoconv("RunSimulateImportFile")).'
'; + print '
'; + print $langs->trans("NowClickToTestTheImport",$langs->transnoentitiesnoconv("RunSimulateImportFile")).'
'; print '
'; // Actions @@ -1943,7 +1946,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='') { print '
'; - print img_picto(($pos>0?$langs->trans("MoveField",$pos):''),'uparrow','class="boxhandle" style="cursor:move;"'); + print img_picto(($pos>0?$langs->trans("MoveField",$pos):''),'grip_title','class="boxhandle" style="cursor:move;"'); print ''; print $langs->trans("NoFields"); @@ -1966,7 +1969,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='') print '
'; // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object - print img_picto($langs->trans("MoveField",$pos),'uparrow','class="boxhandle" style="cursor:move;"'); + print img_picto($langs->trans("MoveField",$pos),'grip_title','class="boxhandle" style="cursor:move;"'); print ''; print $langs->trans("Field").' '.$pos; diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index ed391d65292..cd67a90e4dd 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -92,7 +92,7 @@ if (count($import->array_import_code)) { //if ($user->rights->import->run) //{ - print ''.$langs->trans("NewImport").''; + print ''.$langs->trans("NewImport").''; //} //else //{ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 1287bf6d234..51108766369 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1440,9 +1440,9 @@ div.statusrefbis { vertical-align: text-bottom; } img.photoref, div.photoref { - border: 1px solid #CCC; - -webkit-box-shadow: 2px 2px 4px #ccc; - box-shadow: 2px 2px 4px #ccc; + border: 1px solid #DDD; + -webkit-box-shadow: 1px 1px 4px #DDD; + box-shadow: 1px 1px 4px #DDD; padding: 4px; height: 80px; width: 80px; @@ -2402,6 +2402,10 @@ span.butAction, span.butActionDelete { cursor: pointer; } +.butAction { + background: rgb(230, 238, 230) + /* background: rgb(230, 232, 239); */ +} .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { text-decoration: none; text-transform: uppercase; @@ -2410,14 +2414,14 @@ span.butAction, span.butActionDelete { margin: 0em em !important; padding: 0.6em em; font-family: ; - border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; text-align: center; cursor: pointer; /* color: #fff; */ /* background: rgb(); */ - color: #000; - border: 1px solid #aaa; + color: #444; + /* border: 1px solid #aaa; */ + /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */ border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; @@ -2432,13 +2436,13 @@ span.butAction, span.butActionDelete { margin: 0em 0.3em 0 0.3em !important; padding: 0.2em em 0.3em; font-family: ; - border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; /* text-align: center; New button are on right of screen */ cursor: pointer; /*color: #fff !important; background: rgb(); border: 1px solid rgb();*/ + border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; @@ -2454,8 +2458,8 @@ a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-ci } .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete { - /* background: #633; */ - border: 1px solid #633; + background: rgb(239, 232, 230); + /* border: 1px solid #633; */ color: #633; } @@ -2749,7 +2753,7 @@ div.refidpadding { } div.refid { font-weight: bold; - color: #625; + color: rgb(); font-size: 1.2em; } div.refidno { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a3675177388..fce36df5b2b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2731,7 +2731,7 @@ div.refidpadding { } div.refid { font-weight: bold; - color: #766; + color: rgb(); font-size: 160%; } div.refidno {