Fix style and align when no permission on widget

This commit is contained in:
Laurent Destailleur 2017-06-10 00:05:47 +02:00
parent 884c6c674d
commit 58a407d9f1
39 changed files with 182 additions and 156 deletions

View File

@ -182,29 +182,29 @@ $formadmin = new FormAdmin($db);
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp);
print load_fiche_titre($langs->trans("DefaultValues"),'','title_setup');
$param='&mode='.$mode;
print $langs->trans("DefaultValuesDesc")."<br>\n";
print "<br>\n";
print $langs->trans("EnableDefaultValues").' ';
$enabledisablehtml.= $langs->trans("EnableDefaultValues").' ';
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
{
// Button off, click to enable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&amp;value=1">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>';
$enabledisablehtml.= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&value=1'.$param.'">';
$enabledisablehtml.= img_picto($langs->trans("Disabled"),'switch_off');
$enabledisablehtml.= '</a>';
}
else
{
// Button on, click to disable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&amp;value=0">';
print img_picto($langs->trans("Activated"),'switch_on');
print '</a>';
$enabledisablehtml.= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_DEFAULT_VALUES&value=0'.$param.'">';
$enabledisablehtml.= img_picto($langs->trans("Activated"),'switch_on');
$enabledisablehtml.= '</a>';
}
print "<br><br>\n";
$param='&mode='.$mode;
print load_fiche_titre($langs->trans("DefaultValues"), $enabledisablehtml, 'title_setup');
print $langs->trans("DefaultValuesDesc")."<br>\n";
print "<br>\n";
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss;

View File

@ -100,7 +100,7 @@ $form=new Form($db);
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"));
dol_fiche_head($head, 'ldap', $langs->trans("LDAPSetup"), -1);
print '<table class="noborder" width="100%">';
@ -127,7 +127,7 @@ print '</td></tr>';
// Synchro contact active
if (! empty($conf->societe->enabled))
{
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
$arraylist=array();
$arraylist['0']=$langs->trans("No");
@ -139,7 +139,7 @@ if (! empty($conf->societe->enabled))
// Synchro member active
if (! empty($conf->adherent->enabled))
{
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberActive").'</td><td>';
$arraylist=array();
$arraylist['0']=$langs->trans("No");

View File

@ -39,7 +39,7 @@ if (!$user->admin)
accessforbidden();
$action = GETPOST('action','aZ09');
/*
* Actions
*/
@ -49,7 +49,7 @@ if ($action == 'setvalue' && $user->admin)
$error=0;
$db->begin();
if (! dolibarr_set_const($db, 'LDAP_CONTACT_DN',GETPOST("contactdn"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_CONTACT_OBJECT_CLASS',GETPOST("objectclass"),'chaine',0,'',$conf->entity)) $error++;
@ -73,7 +73,7 @@ if ($action == 'setvalue' && $user->admin)
$key=GETPOST("key");
if ($key) $valkey=$conf->global->$key;
if (! dolibarr_set_const($db, 'LDAP_KEY_CONTACTS',$valkey,'chaine',0,'',$conf->entity)) $error++;
if (! $error)
{
$db->commit();
@ -107,7 +107,7 @@ if (! function_exists("ldap_connect"))
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
}
dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"));
dol_fiche_head($head, 'contacts', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescContact").'<br>';

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@ -38,7 +38,7 @@ $langs->load("errors");
if (!$user->admin)
accessforbidden();
$action = GETPOST('action','aZ09');
@ -50,7 +50,7 @@ if ($action == 'setvalue' && $user->admin)
{
$error=0;
$db->begin();
if (! dolibarr_set_const($db, 'LDAP_GROUP_DN',GETPOST("group"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_GROUP_OBJECT_CLASS',GETPOST("objectclass"),'chaine',0,'',$conf->entity)) $error++;
@ -64,7 +64,7 @@ if ($action == 'setvalue' && $user->admin)
$key=GETPOST("key");
if ($key) $valkey=$conf->global->$key;
if (! dolibarr_set_const($db, 'LDAP_KEY_GROUPS',$valkey,'chaine',0,'',$conf->entity)) $error++;
if (! $error)
{
$db->commit();
@ -96,7 +96,7 @@ if (! function_exists("ldap_connect"))
setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors');
}
dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup"));
dol_fiche_head($head, 'groups', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescGroups").'<br>';

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@ -50,7 +50,7 @@ if ($action == 'setvalue' && $user->admin)
$error=0;
$db->begin();
if (! dolibarr_set_const($db, 'LDAP_MEMBER_DN',GETPOST("user"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_MEMBER_OBJECT_CLASS',GETPOST("objectclass"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FILTER',GETPOST("filterconnection"),'chaine',0,'',$conf->entity)) $error++;
@ -126,7 +126,7 @@ if (! function_exists("ldap_connect"))
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'members', $langs->trans("LDAPSetup"));
dol_fiche_head($head, 'members', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescMembers").'<br>';

View File

@ -113,7 +113,7 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?action=setvalue">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'users', $langs->trans("LDAPSetup"));
dol_fiche_head($head, 'users', $langs->trans("LDAPSetup"), -1);
print $langs->trans("LDAPDescUsers").'<br>';
print '<br>';

View File

@ -187,11 +187,11 @@ if ($result)
print '<tr class="oddeven">';
print '<td>'
print '<td>';
print img_object('',$picto,'class="pictoobjectwidth"').' '.$objMod->getName();
print '<a name="'.$objMod->getName().'">&nbsp;</a>';
print '</td>';
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle));
print '<td>'.$perm_libelle. '</td>';

View File

@ -107,7 +107,7 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update'))
if (! $error)
{
$db->begin();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".$db->escape($conf->entity).")";
$result = $db->query($sql);
if ($result > 0)
@ -126,7 +126,7 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update'))
{
setEventMessages($langs->trans("WarningAnEntryAlreadyExistForTransKey"), null, 'warnings');
}
else
else
{
setEventMessages($db->lasterror(), null, 'errors');
}
@ -164,7 +164,25 @@ $formadmin = new FormAdmin($db);
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp);
print load_fiche_titre($langs->trans("Translation"),'','title_setup');
$param='&mode='.$mode;
$enabledisablehtml = $langs->trans("EnableOverwriteTranslation").' ';
if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Button off, click to enable
$enabledisablehtml.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=1'.$param.'">';
$enabledisablehtml.=img_picto($langs->trans("Disabled"),'switch_off');
$enabledisablehtml.='</a>';
}
else
{
// Button on, click to disable
$enabledisablehtml.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&value=0'.$param.'">';
$enabledisablehtml.=img_picto($langs->trans("Activated"),'switch_on');
$enabledisablehtml.='</a>';
}
print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup');
print $langs->trans("TranslationDesc")."<br>\n";
print "<br>\n";
@ -175,25 +193,6 @@ print $langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language
print '<br>';
print $langs->trans("EnableOverwriteTranslation").' ';
if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Button off, click to enable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&amp;value=1">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>';
}
else
{
// Button on, click to disable
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setMAIN_ENABLE_OVERWRITE_TRANSLATION&amp;value=0">';
print img_picto($langs->trans("Activated"),'switch_on');
print '</a>';
}
print '<br><br>';
$param='&mode='.$mode;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
@ -225,12 +224,12 @@ if ($mode == 'overwrite')
print $langs->trans("TranslationOverwriteDesc",$langs->transnoentitiesnoconv("Language"),$langs->transnoentitiesnoconv("Key"),$langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n";
print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."<br>\n";
print '<br>';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="">';
print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)',$_SERVER["PHP_SELF"],'lang,transkey','',$param,'',$sortfield,$sortorder);
@ -239,11 +238,11 @@ if ($mode == 'overwrite')
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
print '<td align="center"></td>';
print "</tr>\n";
// Line to add new record
print "\n";
print '<tr class="oddeven"><td>';
print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, 0, 'maxwidthonsmartphone', 1);
print '</td>'."\n";
@ -270,33 +269,33 @@ if ($mode == 'overwrite')
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
print "</td>\n";
print '</tr>';
// Show constants
$sql = "SELECT rowid, entity, lang, transkey, transvalue";
$sql.= " FROM ".MAIN_DB_PREFIX."overwrite_trans";
$sql.= " WHERE 1 = 1";
//$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")";
$sql.= $db->order($sortfield, $sortorder);
dol_syslog("translation::select from table", LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($result);
print "\n";
print '<tr class="oddeven">';
print '<td>'.$obj->lang.'</td>'."\n";
print '<td>'.$obj->transkey.'</td>'."\n";
// Value
print '<td>';
/*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
@ -306,18 +305,18 @@ if ($mode == 'overwrite')
*/
print $obj->transvalue;
print '</td>';
print '<td align="center">';
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=delete'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_delete().'</a>';
print '</td>';
print "</tr>\n";
print "\n";
$i++;
}
}
print '</table>';
}
@ -325,15 +324,15 @@ if ($mode == 'overwrite')
if ($mode == 'searchkey')
{
$langcode=GETPOST('langcode')?GETPOST('langcode'):$langs->defaultlang;
$newlang=new Translate('',$conf);
$newlang->setDefaultLang($langcode);
$newlangfileonly=new Translate('',$conf);
$newlangfileonly->setDefaultLang($langcode);
$recordtoshow=array();
$nbempty=0;
/*var_dump($langcode);
var_dump($transkey);
@ -353,9 +352,9 @@ if ($mode == 'searchkey')
// Directory of translation files
$dir_lang = $searchdir."/langs/".$langcode;
$dir_lang_osencoded=dol_osencode($dir_lang);
$filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
foreach($filearray as $file)
{
$tmpfile=preg_replace('/.lang/i', '', basename($file['name']));
@ -364,7 +363,7 @@ if ($mode == 'searchkey')
//print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records<br>'."\n";
}
}
// Now search into translation array
foreach($newlang->tab_translate as $key => $val)
{
@ -373,13 +372,13 @@ if ($mode == 'searchkey')
$recordtoshow[$key]=$val;
}
}
//print '<br>';
$nbtotalofrecordswithoutfilters = count($newlang->tab_translate);
$nbtotalofrecords = count($recordtoshow);
$num = $limit + 1;
if (($offset + $num) > $nbtotalofrecords) $num = $limit;
//print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder;
$title = $langs->trans("TranslationKeySearch");
if ($nbtotalofrecords > 0) $title.=' ('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.')';
@ -419,19 +418,19 @@ if ($mode == 'searchkey')
{*/
print '<input type="hidden" name="entitysearch" value="'.$conf->entity.'">';
//}
print '</td>';
print '</td>';
// Action column
print '<td class="liste_titre nowrap" align="right">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print '</td>';
print '</tr>';
if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') ksort($recordtoshow);
if ($sortfield == 'transkey' && strtolower($sortorder) == 'desc') krsort($recordtoshow);
if ($sortfield == 'transvalue' && strtolower($sortorder) == 'asc') asort($recordtoshow);
if ($sortfield == 'transvalue' && strtolower($sortorder) == 'desc') arsort($recordtoshow);
// Show result
$i=0;
foreach($recordtoshow as $key => $val)
@ -444,7 +443,7 @@ if ($mode == 'searchkey')
print '</td><td align="right">';
if (! empty($newlangfileonly->tab_translate[$key]))
{
if ($val != $newlangfileonly->tab_translate[$key])
if ($val != $newlangfileonly->tab_translate[$key])
{
$htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]);
print $form->textwithpicto('', $htmltext, 1, 'info');

View File

@ -156,8 +156,8 @@ class box_actions extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}
@ -191,7 +191,7 @@ class box_actions extends ModeleBoxes
// on affiche que les évènement du jours ou passé
// qui ne sont pas à 100%
$actioncejour=true;
// TR
$logo=$contents[$line][0]['logo'];
$label=$contents[$line][1]['text'];

View File

@ -124,8 +124,8 @@ class box_bookmarks extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -146,8 +146,10 @@ class box_clients extends ModeleBoxes
}
}
else {
$this->info_box_contents[0][0] = array('align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -165,8 +165,8 @@ class box_commandes extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -158,8 +158,8 @@ class box_comptes extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}

View File

@ -151,8 +151,8 @@ class box_contacts extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}

View File

@ -134,7 +134,7 @@ class box_contracts extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
'td' => 'align="center"',
'td' => 'align="center opacitymedium"',
'text'=>$langs->trans("NoRecordedContracts"),
);
@ -148,8 +148,8 @@ class box_contracts extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -169,8 +169,8 @@ class box_factures extends ModeleBoxes
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -178,8 +178,8 @@ class box_factures_fourn extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->transnoentities("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->transnoentities("ReadPermissionNotAllowed")
);
}
}

View File

@ -168,8 +168,8 @@ class box_factures_fourn_imp extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}

View File

@ -172,8 +172,8 @@ class box_factures_imp extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -134,8 +134,10 @@ class box_ficheinter extends ModeleBoxes
}
else
{
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -127,8 +127,8 @@ class box_fournisseurs extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}

View File

@ -59,7 +59,7 @@ class box_goodcustomers extends ModeleBoxes
// disable box for such cases
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option
if (empty($conf->global->MAIN_BOX_ENABLE_BEST_CUSTOMERS)) $this->enabled=0; // not enabled by default. Very slow on large database
if (empty($conf->global->MAIN_BOX_ENABLE_BEST_CUSTOMERS)) $this->enabled=0; // not enabled by default. Very slow on large database
}
/**
@ -148,8 +148,10 @@ class box_goodcustomers extends ModeleBoxes
}
}
else {
$this->info_box_contents[0][0] = array('align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -133,7 +133,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
if (! $mesg)
{
$langs->load("bills");
$px1->SetData($data1);
unset($data1);
$px1->SetPrecisionY(0);
@ -255,8 +255,10 @@ class box_graph_invoices_permonth extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -132,7 +132,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
if (! $mesg)
{
$langs->load("bills");
$px1->SetData($data1);
unset($data1);
$px1->SetPrecisionY(0);
@ -254,8 +254,10 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -253,8 +253,10 @@ class box_graph_orders_permonth extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -252,8 +252,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -99,6 +99,10 @@ class box_graph_product_distribution extends ModeleBoxes
$nowarray=dol_getdate(dol_now(),true);
if (empty($year)) $year=$nowarray['year'];
$nbofgraph=0;
if ($showinvoicenb) $nbofgraph++;
if ($showpropalnb) $nbofgraph++;
if ($showordernb) $nbofgraph++;
$text = $langs->trans("BoxProductDistribution",$max).' - '.$langs->trans("Year").': '.$year;
$this->info_box_head = array(
@ -113,11 +117,6 @@ class box_graph_product_distribution extends ModeleBoxes
);
$nbofgraph=0;
if ($showinvoicenb) $nbofgraph++;
if ($showpropalnb) $nbofgraph++;
if ($showordernb) $nbofgraph++;
$paramtitle=$langs->transnoentitiesnoconv("Products").'/'.$langs->transnoentitiesnoconv("Services");
if (empty($conf->produit->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Services");
if (empty($conf->service->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Products");
@ -250,7 +249,7 @@ class box_graph_product_distribution extends ModeleBoxes
if (! empty($conf->commande->enabled) && ! empty($user->rights->commande->lire))
{
$langs->load("orders");
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($showordernb)
{
@ -309,6 +308,11 @@ class box_graph_product_distribution extends ModeleBoxes
}
}
if (empty($nbofgraph))
{
$langs->load("errors");
$mesg=$langs->trans("ReadPermissionNotAllowed");
}
if (empty($conf->use_javascript_ajax))
{
$langs->load("errors");
@ -380,9 +384,11 @@ class box_graph_product_distribution extends ModeleBoxes
}
else
{
$this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover"',
'maxlength'=>500,
'text' => $mesg);
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'maxlength'=>500,
'text' => $mesg
);
}
}

View File

@ -254,8 +254,10 @@ class box_graph_propales_permonth extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -157,8 +157,8 @@ class box_members extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'align' => 'left',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}

View File

@ -188,8 +188,8 @@ class box_produits extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -195,8 +195,8 @@ class box_produits_alerte_stock extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -155,8 +155,8 @@ class box_propales extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -156,8 +156,8 @@ class box_prospect extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -161,8 +161,10 @@ class box_services_contracts extends ModeleBoxes
}
}
else {
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -84,7 +84,7 @@ class box_services_expired extends ModeleBoxes
$i = 0;
$thirdpartytmp = new Societe($this->db);
while ($i < $num)
{
$late='';
@ -140,8 +140,10 @@ class box_services_expired extends ModeleBoxes
}
else
{
$this->info_box_contents[0][0] = array('td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"));
$this->info_box_contents[0][0] = array(
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -160,8 +160,8 @@ class box_supplier_orders extends ModeleBoxes
else
{
$this->info_box_contents[0][0] = array(
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
'td' => 'align="left" class="nohover opacitymedium"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
}

View File

@ -191,7 +191,7 @@ FeatureAvailableOnlyOnStable=Feature only available on official stable versions
Rights=Permissions
BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the dustbin to disable it.
OnlyActiveElementsAreShown=Only elements from <a href="%s">enabled modules</a> are shown.
ModulesDesc=Dolibarr modules define which functionality is enabled in software. Some modules require permissions you must grant to users, after enabling module. Click on button on/off to enable a module/feature.
ModulesDesc=Dolibarr modules define which application/feature is enabled in software. Some application/modules require permissions you must grant to users, after enabling module. Click on button on/off to enable an application/module.
ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet...
ModulesDeployDesc=If permissions on your file system allows it, you can use this tool to deploy an external module. The module wil then be visible on the tab <strong>%s</strong>.
ModulesMarketPlaces=Find external modules...
@ -1107,7 +1107,7 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo
NewTranslationStringToShow=New translation string to show
OriginalValueWas=The original translation is overwritten. Original value was:<br><br>%s
TransKeyWithoutOriginalValue=You forced a new translation for the translation key '<strong>%s</strong>' that does not exists in any language files
TotalNumberOfActivatedModules=Activated feature/modules: <b>%s</b> / <b>%s</b>
TotalNumberOfActivatedModules=Activated application/modules: <b>%s</b> / <b>%s</b>
YouMustEnableOneModule=You must at least enable 1 module
ClassNotFoundIntoPathWarning=Class %s not found into PHP path
YesInSummer=Yes in summer

View File

@ -2245,7 +2245,8 @@ div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border
}
div .tdtop {
vertical-align: top !important;
padding-top: 5px !important;
padding-top: 8px !important;
padding-bottom: 2px !important;
padding-bottom: 0px;
}

View File

@ -2820,7 +2820,7 @@ div.tabBar .noborder {
div .tdtop {
vertical-align: top !important;
padding-top: 5px !important;
padding-bottom: 0px;
padding-bottom: 0px !important;
}
#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td {