diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 66c7000d853..c8dfa078cff 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -225,7 +225,7 @@ if ($resql) print ''; print ''; - $newcardbutton = '' . $langs->trans("Addanaccount") . ''; + $newcardbutton = '' . $langs->trans("Addanaccount") . ''; print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 64c4c3e09fc..7a39f6c5502 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -151,7 +151,7 @@ if ($object->id > 0) $newcardbutton = ''; if (! empty($conf->agenda->enabled)) { - $newcardbutton.=''.$langs->trans("AddAction").''; + $newcardbutton.=''.$langs->trans("AddAction").''; } if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index c92b66e8bc2..21ce7c9801c 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -348,7 +348,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->adherent->creer) { - $newcardbutton=''.$langs->trans('NewMember').''; + $newcardbutton=''.$langs->trans('NewMember').''; } print '
'; diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 2a6c4fe2d71..a5fb8934503 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -181,7 +181,11 @@ if ($result) if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); - $newcardbutton=''.$langs->trans('NewSubscription').''; + $newcardbutton=''; + if ($user->rights->adherent->cotisation->creer) + { + $newcardbutton=''.$langs->trans('NewSubscription').''; + } print ''; if ($optioncss != '') print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index d942038b0bc..5962ec470b0 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -231,7 +231,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') $newcardbutton=''; if ($user->rights->adherent->configurer) { - $newcardbutton=''.$langs->trans('NewMemberType').''; + $newcardbutton=''.$langs->trans('NewMemberType').''; } print ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index b1262b7a554..4774d4c82c2 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -81,7 +81,11 @@ $userstatic=new User($db); llxHeader('', $langs->trans("ListOfBookmarks")); -$newcardbutton=''.$langs->trans('NewBookmark').''; +$newcardbutton=''; +if ($user->rights->bookmark->creer) +{ + $newcardbutton=''.$langs->trans('NewBookmark').''; +} print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index f9fad78a1f0..37a5b200d8a 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -104,7 +104,11 @@ if ($result) $title=$langs->trans("ListOfEMailings"); if ($filteremail) $title.=' ('.$langs->trans("SentTo",$filteremail).')'; - $newcardbutton=''.$langs->trans('NewMailing').''; + $newcardbutton=''; + if ($user->rights->mailing->creer) + { + $newcardbutton=''.$langs->trans('NewMailing').''; + } $i = 0; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 3259654ebcc..72751ff637c 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -397,7 +397,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->propal->creer) { - $newcardbutton=''.$langs->trans('NewPropal').''; + $newcardbutton=''.$langs->trans('NewPropal').''; } // Lignes des champs de filtre diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 8048d5a618f..2d07ab95ffe 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -422,7 +422,7 @@ if ($resql) $newcardbutton=''; if ($contextpage == 'orderlist' && $user->rights->commande->creer) { - $newcardbutton=''.$langs->trans('NewOrder').''; + $newcardbutton=''.$langs->trans('NewOrder').''; } // Lines of title fields diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index e3c2a5b94a9..6cb345745c5 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -230,7 +230,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->banque->configurer) { - $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; + $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; } diff --git a/htdocs/compta/bank/various_payment/index.php b/htdocs/compta/bank/various_payment/index.php index aa47d714bd9..0e16faef1a3 100644 --- a/htdocs/compta/bank/various_payment/index.php +++ b/htdocs/compta/bank/various_payment/index.php @@ -153,7 +153,11 @@ if ($result) if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); - $newcardbutton=''.$langs->trans('MenuNewVariousPayment').''; + $newcardbutton=''; + if ($user->rights->banque->modifier) + { + $newcardbutton=''.$langs->trans('MenuNewVariousPayment').''; + } print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index aefd80a4412..e245008ffc3 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -592,7 +592,7 @@ if ($resql) $newcardbutton=''; if($user->rights->facture->creer) { - $newcardbutton=''.$langs->trans('NewBill').''; + $newcardbutton=''.$langs->trans('NewBill').''; } $i = 0; diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 50bc87d4d27..af305c295f2 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -44,7 +44,7 @@ $localtax_static = new Localtax($db); $newcardbutton=''; if ($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('NewVATPayment').''; + $newcardbutton=''.$langs->trans('NewVATPayment').''; } print load_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments",$mysoc->country_code), $newcardbutton); diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 532d2e4c9b8..4969736071d 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -134,7 +134,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->banque->cheque) { - $newcardbutton = ''.$langs->trans('NewCheckDeposit').''; + $newcardbutton = ''.$langs->trans('NewCheckDeposit').''; } print ''; diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 31dfbd5b610..1d911f24c4c 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -101,7 +101,11 @@ if ($result) $selectedfields=''; - $newcardbutton = ''.$langs->trans('NewStandingOrder').''; + $newcardbutton=''; + if ($user->rights->prelevement->bons->creer) + { + $newcardbutton = ''.$langs->trans('NewStandingOrder').''; + } // Lines of title fields print ''; diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index f9b9adf616c..45213851a64 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -150,9 +150,13 @@ if ($result) if ($typeid) $param.='&typeid='.$typeid; if ($optioncss != '') $param.='&optioncss='.$optioncss; - $newcardbutton=''.$langs->trans('NewSalaryPayment').''; + $newcardbutton=''; + if ($user->rights->salaries->payment->write) + { + $newcardbutton=''.$langs->trans('NewSalaryPayment').''; + } - print ''; + print ''; if ($optioncss != '') print ''; print ''; print ''; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 3850ddfe5c5..d33b2cb0bdd 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -149,7 +149,7 @@ if ($resql) $newcardbutton=''; if($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('MenuNewSocialContribution').''; + $newcardbutton=''.$langs->trans('MenuNewSocialContribution').''; } print ''; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index e796ddacac7..1cb623bb75e 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -151,7 +151,7 @@ if ($result) $newcardbutton=''; if ($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('NewVATPayment').''; + $newcardbutton=''.$langs->trans('NewVATPayment').''; } print ''; diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 5c101401dac..7414cb43b1c 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -415,7 +415,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->societe->contact->creer) { - $newcardbutton=''.$langs->trans('NewContactAddress').''; + $newcardbutton=''.$langs->trans('NewContactAddress').''; } print ''; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index b1755b7f7ec..9fb4412d024 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -372,7 +372,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->contrat->creer) { - $newcardbutton=''.$langs->trans('NewContractSubscription').''; + $newcardbutton=''.$langs->trans('NewContractSubscription').''; } print ''; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 320b8cc1b63..3fa17ba4312 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -724,17 +724,17 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin { $langs->load("projects"); - $buttoncreate=''; + $newcardbutton=''; if (! empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { - //$buttoncreate=''.$langs->trans("AddProject").''; - $buttoncreate=''.$langs->trans("AddProject"); - if (empty($conf->dol_optimize_smallscreen)) $buttoncreate.=' '.img_picto($langs->trans("AddProject"),'filenew'); - $buttoncreate.=''."\n"; + //$newcardbutton=''.$langs->trans("AddProject").''; + $newcardbutton=''.$langs->trans("AddProject"); + if (empty($conf->dol_optimize_smallscreen)) $newcardbutton.=' '.img_picto($langs->trans("AddProject"),'filenew'); + $newcardbutton.=''."\n"; } print "\n"; - print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"), $buttoncreate.$morehtmlright, ''); + print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"), $newcardbutton.$morehtmlright, ''); print '
'; print "\n".''; @@ -921,18 +921,18 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $contactstatic->fields = dol_sort_array($contactstatic->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); - $buttoncreate=''; + $newcardbutton=''; if ($user->rights->societe->contact->creer) { $addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); - $buttoncreate=''.$addcontact; - $buttoncreate.=''."\n"; + $newcardbutton=''.$addcontact; + $newcardbutton.=''."\n"; } print "\n"; $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany")); - print load_fiche_titre($title, $buttoncreate,''); + print load_fiche_titre($title, $newcardbutton,''); print ''; print ''; @@ -1171,14 +1171,14 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='') $addressstatic = new Address($db); $num = $addressstatic->fetch_lines($object->id); - $buttoncreate=''; + $newcardbutton=''; if ($user->rights->societe->creer) { - $buttoncreate=''.$langs->trans("AddAddress").' '.img_picto($langs->trans("AddAddress"),'filenew').''."\n"; + $newcardbutton=''.$langs->trans("AddAddress").' '.img_picto($langs->trans("AddAddress"),'filenew').''."\n"; } print "\n"; - print load_fiche_titre($langs->trans("AddressesForCompany"),$buttoncreate,''); + print load_fiche_titre($langs->trans("AddressesForCompany"),$newcardbutton,''); print "\n".'
'."\n"; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 803337dcb6c..de0fd543572 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -332,13 +332,14 @@ print ''; print ''; // Line with explanation and button new job -if (! $user->rights->cron->create) +$newcardbutton=''; +if ($user->rights->cron->create) { - $newcardbutton.=''.$langs->trans("CronCreateJob").''; + $newcardbutton.=''.$langs->trans("CronCreateJob").''; } else { - $newcardbutton.=''.$langs->trans("CronCreateJob").''; + $newcardbutton.=''.$langs->trans("CronCreateJob").''; } print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_setup', 0, $newcardbutton, '', $limit); diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 4d7db533e12..12cfa6a0757 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -131,7 +131,11 @@ if ($resql) //if ($page > 0) $param.= '&page='.$page; if ($optioncss != '') $param.='&optioncss='.$optioncss; - $newcardbutton=''.$langs->trans('NewDonation').''; + $newcardbutton=''; + if ($user->rights->don->create) + { + $newcardbutton=''.$langs->trans('NewDonation').''; + } print ''."\n"; if ($optioncss != '') print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 88050097d3f..3f754d6b5f9 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -268,7 +268,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->expedition->creer) { - $newcardbutton=''.$langs->trans('NewSending').''; + $newcardbutton=''.$langs->trans('NewSending').''; } $i = 0; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 2944220458d..23873d533d7 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -465,7 +465,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->expensereport->creer) { - $newcardbutton=''.$langs->trans('NewTrip').''; + $newcardbutton=''.$langs->trans('NewTrip').''; } print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index f7082770970..f38ba21cb96 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -274,7 +274,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->ficheinter->creer) { - $newcardbutton=''.$langs->trans('NewIntervention').''; + $newcardbutton=''.$langs->trans('NewIntervention').''; } // Lines of title fields diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 6f0b4899d6e..cbfbac36b41 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -642,11 +642,11 @@ if ($resql) if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); - + $newcardbutton=''; if($user->rights->fournisseur->commande->creer) { - $newcardbutton=''.$langs->trans('NewOrder').''; + $newcardbutton=''.$langs->trans('NewOrder').''; } // Lignes des champs de filtre diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index d3fdcdcba01..6d1b3bc48b6 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -474,7 +474,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->fournisseur->facture->creer) { - $newcardbutton=''.$langs->trans('NewBill').''; + $newcardbutton=''.$langs->trans('NewBill').''; } $i = 0; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 7335bfcf243..aa06459983a 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -378,7 +378,11 @@ else //print $num; //print count($holiday->holiday); - $newcardbutton=''.$langs->trans('MenuAddCP').''; + $newcardbutton=''; + if ($user->rights->holiday->write) + { + $newcardbutton=''.$langs->trans('MenuAddCP').''; + } print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm.png', 0, $newcardbutton, '', $limit); diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php index 24ea1ab72f9..3b07b7503d7 100644 --- a/htdocs/loan/index.php +++ b/htdocs/loan/index.php @@ -114,7 +114,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->loan->write) { - $newcardbutton=''.$langs->trans('NewLoan').''; + $newcardbutton=''.$langs->trans('NewLoan').''; } print ''."\n"; diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 5c3e5f2ae96..f8ce7a0ce24 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -350,7 +350,13 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit); +$newcardbutton=''; +//if ($user->rights->mymodule->creer) +//{ + $newcardbutton=''.$langs->trans('New').''; +//} + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail="SendMyObjectRef"; diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index d2232019592..0b0fa5c818c 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -97,9 +97,13 @@ $fieldtosortuser=empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?'firstname': $newcardbutton=''; -if ($user->rights->opensurvey->read) +if (!$user->rights->opensurvey->read) { - $newcardbutton=''.$langs->trans('NewSurvey').''; + $newcardbutton=''.$langs->trans('NewSurvey').''; +} +else +{ + $newcardbutton=''.$langs->trans('NewSurvey').''; } @@ -213,7 +217,7 @@ while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); if (empty($obj)) break; // Should not happen - + $sql2='select COUNT(*) as nb from '.MAIN_DB_PREFIX."opensurvey_user_studs where id_sondage='".$db->escape($obj->id_sondage)."'"; $resql2=$db->query($sql2); if ($resql2) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 04f0bca71f9..511a15ec1fc 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -427,7 +427,7 @@ else { $label='NewProduct'; if($type == Product::TYPE_SERVICE) $label='NewService'; - $newcardbutton=''.$langs->trans($label).''; + $newcardbutton=''.$langs->trans($label).''; } print ''; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 29e5439b8e8..faf30ba066a 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -133,7 +133,7 @@ if ($result) $newcardbutton=''; if ($user->rights->stock->creer) { - $newcardbutton=''.$langs->trans('MenuNewWarehouse').''; + $newcardbutton=''.$langs->trans('MenuNewWarehouse').''; } print ''; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index e57eab2d109..83d18f3e3b6 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -441,7 +441,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->projet->creer) { - $newcardbutton = ''.$langs->trans('NewProject').''; + $newcardbutton = ''.$langs->trans('NewProject').''; } print ''; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 9e14c462bef..cc77e89ab77 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -393,7 +393,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->projet->creer) { - $newcardbutton = ''.$langs->trans('NewTask').''; + $newcardbutton = ''.$langs->trans('NewTask').''; } print ''; diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 927975e9c26..10ec58e9371 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -199,7 +199,7 @@ if($ret == -1) { $newcardbutton=''; if ($user->rights->resource->write) { - $newcardbutton=''.$langs->trans('MenuResourceAdd').''; + $newcardbutton=''.$langs->trans('MenuResourceAdd').''; } print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $ret+1, $nbtotalofrecords,'title_generic.png', 0, $newcardbutton, '', $limit); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index dd1cb616c4d..f1996140cd2 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -594,7 +594,7 @@ if ($user->rights->societe->creer) if($type == 'f') $label='NewSupplier'; } - $newcardbutton = ''.$langs->trans($label).''; + $newcardbutton = ''.$langs->trans($label).''; } print ''; diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 4b2e02a303e..41a4990d7bd 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -223,9 +223,9 @@ dol_fiche_end(); $newcardbutton = ''; if (! empty($conf->website->enabled)) { if (! empty($user->rights->societe->lire)) { - $newcardbutton .= '' . $langs->trans("AddWebsiteAccount") . ''; + $newcardbutton .= '' . $langs->trans("AddWebsiteAccount") . ''; } else { - $newcardbutton .= '' . $langs->trans("AddAction") . ''; + $newcardbutton .= '' . $langs->trans("AddAction") . ''; } } diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 09cbd063e64..3863f06d7c3 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -389,7 +389,7 @@ if ($resql) $newcardbutton=''; if($user->rights->supplier_proposal->creer) { - $newcardbutton=''.$langs->trans('NewAskPrice').''; + $newcardbutton=''.$langs->trans('NewAskPrice').''; } // Lignes des champs de filtre diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 83e0f5ed7ea..53ea560d92a 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2445,6 +2445,23 @@ span.butAction, span.butActionDelete { color: #999 !important; border: 1px solid #bbb; } +.butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active { + text-decoration: none !important; + white-space: nowrap !important; + cursor: not-allowed !important; + margin: 0em em; + padding: 0.2em em; + font-family: !important; + font-weight: normal !important; + display: inline-block; + text-align: center; + cursor: pointer; + color: #999 !important; + border: 1px solid #bbb; + padding-top: 0.2em; + box-shadow: none !important; + -webkit-box-shadow: none !important; +} .butActionTransparent { color: #222 ! important; @@ -2452,7 +2469,7 @@ span.butAction, span.butActionDelete { } global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (! $user->admin)) { ?> -.butActionRefused { +.butActionRefused, .butActionNewRefused { display: none; } @@ -2803,7 +2820,6 @@ div.pagination li a:focus, div.pagination li span:focus { -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); - padding-top: 8px; } div.pagination li .active a, div.pagination li .active span, diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 221c2c9a705..3e728114254 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1580,9 +1580,12 @@ li.tmenu, li.tmenusel { margin: 0px 0px 0px 0px; font-weight: normal; } -li.tmenusel, li.tmenu:hover { +li.tmenu:hover { opacity: .50; /* show only a slight shadow */ } +li.tmenusel { + text-decoration: underline; +} .tmenuend .tmenuleft { width: 0px; } .tmenuend { display: none; } @@ -2344,7 +2347,7 @@ span.butAction, span.butActionDelete { } -.button, .butAction, .butActionDelete, .butActionRefused { +.button, .butAction, .butActionDelete, .butActionRefused, .butActionNewRefused { border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; @@ -2386,6 +2389,10 @@ span.butAction, span.butActionDelete { cursor: pointer; color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + -webkit-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); @@ -2393,10 +2400,6 @@ span.butAction, span.butActionDelete { background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(to bottom, #0088cc, #0044cc); background-repeat: repeat-x; - -webkit-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .button, .butAction { @@ -2444,7 +2447,7 @@ a.butAction:link, a.butAction:visited, a.butAction:hover, a.butAction:active { color: #FFFFFF; } -.butActionRefused { +.butActionRefused, .butActionNewRefused { color: #AAAAAA !important; cursor: not-allowed !important; } @@ -2452,6 +2455,10 @@ a.butAction:link, a.butAction:visited, a.butAction:hover, a.butAction:active { a.butAction:hover, a.butActionDelete:hover, a.butActionRefused:hover { text-decoration: none; } +a.butActionNewRefused:hover { + border-color: unset !important; + border: 1px solid #bbbbbb; +} a.butAction:hover, a.butActionNew:hover, a.butActionDelete:hover { opacity: 0.9; } @@ -2462,7 +2469,7 @@ a.butAction:hover, a.butActionNew:hover, a.butActionDelete:hover { } global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?> -.butActionRefused { +.butActionRefused, .butActionNewRefused { display: none; } diff --git a/htdocs/ticketsup/list.php b/htdocs/ticketsup/list.php index 871bd010a81..b29e6dfc5a9 100644 --- a/htdocs/ticketsup/list.php +++ b/htdocs/ticketsup/list.php @@ -437,7 +437,11 @@ print ''; if ($socid) print ''; if ($projectid) print ''; -$newcardbutton = '' . $langs->trans('NewTicket') . ''; +$newcardbutton=''; +if ($user->rights->ticketsup->write) +{ + $newcardbutton = '' . $langs->trans('NewTicket') . ''; +} print_barre_liste($langs->trans('TicketList'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_ticketsup', 0, $newcardbutton, '', $limit); diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index cf0c23f9fec..ae79b3cb220 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -141,7 +141,7 @@ if ($resql) $newcardbutton=''; if ($caneditperms) { - $newcardbutton=''.$langs->trans('NewGroup').''; + $newcardbutton=''.$langs->trans('NewGroup').''; } print ''."\n"; diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 3521b4bbde0..0c648d6ddeb 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -277,7 +277,7 @@ $text = $langs->trans("ListOfUsers"); $newcardbutton=''; if ($canadduser) { - $newcardbutton=''.$langs->trans('NewUser').''; + $newcardbutton=''.$langs->trans('NewUser').''; } print ''."\n";