diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 52d0868ae5c..889a9f7f65f 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -18,9 +18,9 @@ */ /** - * \file htdocs/accountancy/admin/card.php - * \ingroup Accounting Expert - * \brief Card accounting account + * \file htdocs/accountancy/admin/card.php + * \ingroup Advanced accountancy + * \brief Card of accounting account */ require '../../main.inc.php'; @@ -56,11 +56,14 @@ if ($action == 'add') { dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); $result = $db->query($sql); $obj = $db->fetch_object($result); + + // Clean code + $account_number = clean_account(GETPOST('account_number')); // Accounting account without zero on the right $object->fk_pcg_version = $obj->pcg_version; $object->pcg_type = GETPOST('pcg_type'); $object->pcg_subtype = GETPOST('pcg_subtype'); - $object->account_number = GETPOST('account_number'); + $object->account_number = $account_number'; $object->account_parent = GETPOST('account_parent', 'int'); $object->account_category = GETPOST('account_category'); $object->label = GETPOST('label', 'alpha'); @@ -90,11 +93,14 @@ if ($action == 'add') { dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); $result2 = $db->query($sql); $obj = $db->fetch_object($result2); + + // Clean code + $account_number = clean_account(GETPOST('account_number')); // Accounting account without zero on the right $object->fk_pcg_version = $obj->pcg_version; $object->pcg_type = GETPOST('pcg_type'); $object->pcg_subtype = GETPOST('pcg_subtype'); - $object->account_number = GETPOST('account_number'); + $object->account_number = $account_number; $object->account_parent = GETPOST('account_parent', 'int'); $object->account_category = GETPOST('account_category'); $object->label = GETPOST('label', 'alpha'); diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index cb4890f77f1..45b20588121 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -40,8 +40,8 @@ if (GETPOST('msg','alpha')) { $urldolibarr='http://www.dolibarr.org/downloads/'; -$urldolibarrmodules='http://www.dolistore.com/'; -$urldolibarrthemes='http://www.dolistore.com/'; +$urldolibarrmodules='https://www.dolistore.com/'; +$urldolibarrthemes='https://www.dolistore.com/'; $dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT); $dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot); $dolibarrdataroot=preg_replace('/([\\/]+)$/i','',DOL_DATA_ROOT); diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 19633aa13d7..991e0c4a148 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -656,7 +656,7 @@ if ($action == 'create') } // Title - print 'global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").''; + print 'global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").''; // Full day print ''.$langs->trans("EventOnFullDay").''; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index fca007bfd1f..cc67393d679 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -797,7 +797,7 @@ else { print ''; print ''; - print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1); + print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1), 'socid', '', $langs->trans("SelectThirdParty")); print ''; print ''; } diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 89b8be57e35..dc5db9445bb 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -59,7 +59,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact $object->old_name=''; $object->old_firstname=''; // Logo/Photo save - $dir= $conf->societe->dir_output.'/contact/' . get_exdir($object->id,2,0,1,$object,'contact').'/photos'; + $dir= $conf->societe->dir_output.'/contact/' . get_exdir($object->id,0,0,1,$object,'contact').'/photos'; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); if ($file_OK) @@ -68,8 +68,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact if (GETPOST('deletephoto')) { require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - $fileimg=$conf->societe->dir_output.'/contact/'.get_exdir($object->id,2,0,1,$object,'contact').'/photos/'.$object->photo; - $dirthumbs=$conf->societe->dir_output.'/contact/'.get_exdir($object->id,2,0,1,$object,'contact').'/photos/thumbs'; + $fileimg=$conf->societe->dir_output.'/contact/'.get_exdir($object->id,0,0,1,$object,'contact').'/photos/'.$object->photo; + $dirthumbs=$conf->societe->dir_output.'/contact/'.get_exdir($object->id,0,0,1,$object,'contact').'/photos/thumbs'; dol_delete_file($fileimg); dol_delete_dir_recursive($dirthumbs); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 25775c36a77..6181f6eb6bf 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5501,8 +5501,8 @@ class Form //$previous_ref = $object->ref_previous?''.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Previous"),'previous.png'):' ').'':''; //$next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Next"),'next.png'):' ').'':''; - $previous_ref = $object->ref_previous?''.(empty($conf->dol_use_jmobile)?'<':' ').'':''; - $next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?'>':' ').'':''; + $previous_ref = $object->ref_previous?''.(empty($conf->dol_use_jmobile)?'<':' ').'':''.(empty($conf->dol_use_jmobile)?'<':' ').''; + $next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?'>':' ').'':''.(empty($conf->dol_use_jmobile)?'>':' ').''; //print "xx".$previous_ref."x".$next_ref; $ret.='
'; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 92229a72d23..479e46258be 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -93,11 +93,17 @@ function project_prepare_head($object) // Then tab for sub level of projet, i mean tasks $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id; $head[$h][1] = $langs->trans("Tasks"); + + require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; + $taskstatic=new Task($db); + $nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0)); + if ($nbTasks > 0) $head[$h][1].= ' '.($nbTasks).''; $head[$h][2] = 'tasks'; $h++; $head[$h][0] = DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id; $head[$h][1] = $langs->trans("Gantt"); + if ($nbTasks > 0) $head[$h][1].= ' '.($nbTasks).''; $head[$h][2] = 'gantt'; $h++; } @@ -116,7 +122,7 @@ function project_prepare_head($object) */ function task_prepare_head($object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $h = 0; $head = array(); @@ -156,8 +162,10 @@ function task_prepare_head($object) $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->project->ref) . '/' .dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $listoffiles=dol_dir_list($filesdir,'files',1,'','thumbs'); - $head[$h][1] = (count($listoffiles)?$langs->trans('DocumentsNb',count($listoffiles)):$langs->trans('Documents')); + $nbFiles = count(dol_dir_list($filesdir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; $head[$h][2] = 'task_document'; $h++; diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 976e0013431..29c3cd85bad 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -299,25 +299,28 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) /* * Actions */ - print '
'; - - if ($user->rights->projet->all->creer || $user->rights->projet->creer) + if (empty($id)) { - if ($object->public || $userWrite > 0) - { - print ''.$langs->trans('AddTask').''; - } - else - { - print ''.$langs->trans('AddTask').''; - } + print '
'; + + if ($user->rights->projet->all->creer || $user->rights->projet->creer) + { + if ($object->public || $userWrite > 0) + { + print ''.$langs->trans('AddTask').''; + } + else + { + print ''.$langs->trans('AddTask').''; + } + } + else + { + print ''.$langs->trans('AddTask').''; + } + + print '
'; } - else - { - print ''.$langs->trans('AddTask').''; - } - - print '
'; } } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 17187fba7fc..1601302c046 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -438,6 +438,9 @@ th .button { .quatrevingtpercent, .inputsearch { width: 80%; } +.soixantepercent { + width: 60%; +} textarea.centpercent { width: 96%; } @@ -2292,6 +2295,16 @@ div.pagination li.pagination span { } div.pagination li.pagination span.inactive { cursor: default; + color: #ccc; +} +div.pagination li a.inactive:hover, +div.pagination li span.inactive:hover { + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); } /*div.pagination li.litext { padding-top: 8px; @@ -3822,7 +3835,7 @@ dl.dropdown { position:absolute; top:2px; list-style:none; - max-height: 200px; + max-height: 300px; overflow: auto; } .dropdown span.value { diff --git a/htdocs/theme/md/img/object_category.png b/htdocs/theme/md/img/object_category.png index b0292d92aae..389277f4004 100644 Binary files a/htdocs/theme/md/img/object_category.png and b/htdocs/theme/md/img/object_category.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 15f763ef901..55f4e72cb85 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -425,6 +425,9 @@ th .button { .quatrevingtpercent, .inputsearch { width: 80%; } +.soixantepercent { + width: 60%; +} textarea.centpercent { width: 96%; } @@ -2134,7 +2137,9 @@ div.pagination li.pagination span { } div.pagination li.pagination span.inactive { cursor: default; + color: #ccc; } + div.pagination li.litext a { border: none; padding-right: 10px; @@ -3611,7 +3616,7 @@ span.noborderoncategories a, li.noborderoncategories a { line-height: normal; } span.noborderoncategories { - padding: 5px 5px 0px 5px; + padding: 3px 5px 0px 5px; } .categtextwhite, .treeview .categtextwhite.hover { color: #fff !important; @@ -3662,7 +3667,7 @@ dl.dropdown { position:absolute; top:2px; list-style:none; - max-height: 200px; + max-height: 300px; overflow: auto; } .dropdown span.value { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 602d70d540d..dc1cb5ebf34 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -162,7 +162,7 @@ class User extends CommonObject */ function fetch($id='', $login='',$sid='',$loadpersonalconf=1, $entity=-1) { - global $langs, $conf, $user; + global $conf, $user; // Clean parameters $login=trim($login); @@ -256,7 +256,7 @@ class User extends CommonObject $this->country_id = $obj->country_id; $this->country_code = $obj->country_id?$obj->country_code:''; - $this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):''; + //$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):''; $this->state_id = $obj->state_id; $this->state_code = $obj->state_code;