Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
fec3a89aa5
@ -22,6 +22,7 @@ Mobiledetect 2.8.17 MIT License Yes
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
|
||||
@ -157,8 +157,7 @@ if ($action == 'edit') // Edit
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
clearstatcache();
|
||||
$var=true;
|
||||
|
||||
|
||||
print '<br>';
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
@ -166,16 +165,14 @@ if ($action == 'edit') // Edit
|
||||
print '</tr>';
|
||||
|
||||
// Default language
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'main_lang_default', 1, 0, 0, 0, 0, 'minwidth300');
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multilingual GUI
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
@ -192,11 +189,9 @@ if ($action == 'edit') // Edit
|
||||
{
|
||||
print '<table summary="search" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
|
||||
$var=True;
|
||||
foreach ($searchform as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">';
|
||||
print '<tr><td width="35%">'.$searchformtitle[$key].'</td><td colspan="2">';
|
||||
print $form->selectyesno($searchform[$key],$searchformconst[$key],1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -210,29 +205,18 @@ if ($action == 'edit') // Edit
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Show logo
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableShowLogo").'</td><td>';
|
||||
print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of lists
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||
print '<tr><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of short lists on customer card
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
|
||||
print '<tr><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Disable javascript and ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print $form->selectyesno('main_disable_javascript',isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
@ -241,8 +225,7 @@ if ($action == 'edit') // Edit
|
||||
// Activate preview tab on element card
|
||||
if (class_exists("Imagick"))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
||||
print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
@ -250,32 +233,28 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
|
||||
// First day for weeks
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'),'MAIN_START_WEEK',0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingDays
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5').'">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingHours
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18').'">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname/Name
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
||||
$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"),1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
|
||||
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION',$array,(isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0));
|
||||
print '</td>';
|
||||
@ -283,40 +262,52 @@ if ($action == 'edit') // Edit
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||
print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide helpcenter link on login page
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||
print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
||||
print '</td>';
|
||||
// Show logo
|
||||
print '<tr><td width="35%">'.$langs->trans("EnableShowLogo").'</td><td>';
|
||||
print $form->selectyesno('MAIN_SHOW_LOGO',$conf->global->MAIN_SHOW_LOGO,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide wiki link on login page
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
|
||||
print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||
print '</td>';
|
||||
|
||||
// Hide version link
|
||||
/*
|
||||
|
||||
print '<tr><td width="35%">'.$langs->trans("HideVersionLink").'</td><td>';
|
||||
print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
*/
|
||||
|
||||
// Show bugtrack link
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message on login page
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
// Hide wiki link on login page
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
|
||||
print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide helpcenter link on login page
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||
print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK',isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message on login page
|
||||
print '<tr><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
|
||||
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
@ -324,8 +315,7 @@ if ($action == 'edit') // Edit
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Message of the day on home page
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
print '<tr><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
|
||||
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
@ -345,14 +335,11 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
else // Show
|
||||
{
|
||||
$var=true;
|
||||
|
||||
// Language
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
$s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
|
||||
print ($s?$s.' ':'');
|
||||
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
@ -361,9 +348,8 @@ else // Show
|
||||
if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation".($conf->global->MAIN_LANG_DEFAULT=='en_US'?'ENUS':''),$conf->global->MAIN_LANG_DEFAULT),1);
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>' . yn($conf->global->MAIN_MULTILANGS) . '</td>';
|
||||
|
||||
print '<tr><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>' . yn($conf->global->MAIN_MULTILANGS) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
@ -380,11 +366,10 @@ else // Show
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td><td> </td></tr>';
|
||||
$var=true;
|
||||
foreach ($searchform as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$searchformtitle[$key].'</td><td>'.yn($searchformconst[$key]).'</td>';
|
||||
|
||||
print '<tr><td width="35%">'.$searchformtitle[$key].'</td><td>'.yn($searchformconst[$key]).'</td>';
|
||||
print '<td align="left">';
|
||||
if (! empty($searchformmodule[$key])) print $langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key]));
|
||||
print '</td></tr>';
|
||||
@ -394,28 +379,20 @@ else // Show
|
||||
}
|
||||
|
||||
// Other
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||
print '<tr><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '</td>';
|
||||
print '<tr><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
// Disable javascript/ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
@ -423,40 +400,36 @@ else // Show
|
||||
// Activate preview tab on element card
|
||||
if (class_exists("Imagick"))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
||||
|
||||
print '<tr><td width="35%">'.$langs->trans("UsePreviewTabs").'</td><td>';
|
||||
print yn(isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0)."</td>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// First day for weeks
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'));
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingDays
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
||||
print isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingHours
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
||||
print isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname / Name position
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
||||
print '<tr><td width="35%">'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
||||
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print $langs->trans("Firstname").' '.$langs->trans("Lastname"); }
|
||||
else { print $langs->trans("Lastname").' '.$langs->trans("Firstname"); }
|
||||
print '</td>';
|
||||
@ -464,40 +437,48 @@ else // Show
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td colspan="2">';
|
||||
print '<tr><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td colspan="2">';
|
||||
print yn((isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to help center
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td colspan="2">';
|
||||
print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
|
||||
print '</td></tr>';
|
||||
// Show logo
|
||||
print '<tr><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
// Link to wiki help
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
|
||||
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show bugtrack link
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
// Hide version link
|
||||
/*
|
||||
print '<tr><td width="35%">'.$langs->trans("HideVersionLink").'</td><td>';
|
||||
print yn($conf->global->MAIN_HIDE_VERSION);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Show bugtrack link
|
||||
print '<tr"><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
// Message login
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
// Link to wiki help
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
|
||||
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to help center
|
||||
print '<tr><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td colspan="2">';
|
||||
print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Message login
|
||||
print '<tr><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
|
||||
else print ' ';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Message of the day
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
print '<tr><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
if (isset($conf->global->MAIN_MOTD)) print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
|
||||
else print ' ';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@ -239,7 +239,7 @@ $head[$h][2] = 'desc';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/modulehelp.php?id=".$id.'&mode=feature';
|
||||
$head[$h][1] = $langs->trans("Features");
|
||||
$head[$h][1] = $langs->trans("TechnicalServicesProvided");
|
||||
$head[$h][2] = 'feature';
|
||||
$h++;
|
||||
|
||||
@ -251,45 +251,38 @@ foreach($orders as $tmpkey => $tmpvalue)
|
||||
if ($objMod->numero == $id)
|
||||
{
|
||||
$key = $i;
|
||||
$modName = $filename[$tmpkey];
|
||||
$dirofmodule = $dirmod[$tmpkey];
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$value = $orders[$key];
|
||||
$special = $objMod->special;
|
||||
$tab=explode('_',$value);
|
||||
$familyposition=$tab[0]; $familykey=$tab[1]; $module_position=$tab[2]; $numero=$tab[3];
|
||||
|
||||
// Check filters
|
||||
$modulename=$objMod->getName();
|
||||
$moduledesc=$objMod->getDesc();
|
||||
$moduleauthor=$objMod->getPublisher();
|
||||
|
||||
|
||||
|
||||
print '<div class="centpercent">';
|
||||
|
||||
|
||||
print load_fiche_titre($objMod->getDesc(),$moreinfo,'object_'.$objMod->picto);
|
||||
print load_fiche_titre(($modulename?$modulename:$moduledesc), $moreinfo, 'object_'.$objMod->picto);
|
||||
print '<br>';
|
||||
|
||||
dol_fiche_head($head, $mode, $title);
|
||||
dol_fiche_head($head, $mode, $title, -1);
|
||||
|
||||
|
||||
|
||||
$tab=explode('_',$value);
|
||||
$familyposition=$tab[0]; $familykey=$tab[1]; $module_position=$tab[2]; $numero=$tab[3];
|
||||
|
||||
$modName = $filename[$key];
|
||||
$objMod = $modules[$key];
|
||||
$dirofmodule = $dirmod[$key];
|
||||
|
||||
$special = $objMod->special;
|
||||
|
||||
if (! $objMod->getName())
|
||||
if (! $modulename)
|
||||
{
|
||||
dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
|
||||
}
|
||||
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
||||
|
||||
// Check filters
|
||||
$modulename=$objMod->getName();
|
||||
$moduledesc=$objMod->getDesc();
|
||||
$moduledesclong=$objMod->getDescLong();
|
||||
$moduleauthor=$objMod->getPublisher();
|
||||
|
||||
// Load all lang files of module
|
||||
if (isset($objMod->langfiles) && is_array($objMod->langfiles))
|
||||
{
|
||||
@ -322,6 +315,8 @@ $text='';
|
||||
|
||||
if ($mode == 'desc')
|
||||
{
|
||||
if ($moduledesc) $text.=$moduledesc.'<br><br>';
|
||||
|
||||
$text.='<strong>'.$langs->trans("Version").':</strong> '.$version;
|
||||
|
||||
$textexternal='';
|
||||
@ -329,7 +324,7 @@ if ($mode == 'desc')
|
||||
{
|
||||
$textexternal.='<br><strong>'.$langs->trans("Origin").':</strong> '.$langs->trans("ExternalModule",$dirofmodule);
|
||||
if ($objMod->editor_name != 'dolibarr') $textexternal.='<br><strong>'.$langs->trans("Publisher").':</strong> '.(empty($objMod->editor_name)?$langs->trans("Unknown"):$objMod->editor_name);
|
||||
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i',$objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> '.$objMod->editor_url;
|
||||
if (! empty($objMod->editor_url) && ! preg_match('/dolibarr\.org/i',$objMod->editor_url)) $textexternal.='<br><strong>'.$langs->trans("Url").':</strong> <a href="'.$objMod->editor_url.'" target="_blank">'.$objMod->editor_url.'</a>';
|
||||
$text.=$textexternal;
|
||||
$text.='<br>';
|
||||
}
|
||||
@ -342,7 +337,8 @@ if ($mode == 'desc')
|
||||
else $text.=$langs->trans("Disabled");
|
||||
$text.='<br>';
|
||||
|
||||
if ($objMod->getDescLong()) $text.=$objMod->getDesc().'<br>';
|
||||
$moduledesclong=$objMod->getDescLong();
|
||||
if ($moduledesclong) $text.='<br><hr><div class="moduledesclong">'.$moduledesclong.'<div>';
|
||||
}
|
||||
|
||||
if ($mode == 'feature')
|
||||
@ -360,6 +356,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddDictionaries").':</strong> ';
|
||||
if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib']))
|
||||
{
|
||||
@ -372,6 +370,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddBoxes").':</strong> ';
|
||||
if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes))
|
||||
{
|
||||
@ -384,6 +384,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddModels").':</strong> ';
|
||||
if (isset($objMod->module_parts) && isset($objMod->module_parts['models']) && $objMod->module_parts['models'])
|
||||
{
|
||||
@ -391,6 +393,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddSubstitutions").':</strong> ';
|
||||
if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions'])
|
||||
{
|
||||
@ -398,6 +402,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddSheduledJobs").':</strong> ';
|
||||
if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs))
|
||||
{
|
||||
@ -410,6 +416,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddTriggers").':</strong> ';
|
||||
if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers'])
|
||||
{
|
||||
@ -417,6 +425,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddHooks").':</strong> ';
|
||||
if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks']))
|
||||
{
|
||||
@ -429,6 +439,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddPermissions").':</strong> ';
|
||||
if (isset($objMod->rights) && is_array($objMod->rights) && count($objMod->rights))
|
||||
{
|
||||
@ -441,6 +453,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddMenus").':</strong> ';
|
||||
if (isset($objMod->menu) && ! empty($objMod->menu)) // objMod can be an array or just an int 1
|
||||
{
|
||||
@ -448,6 +462,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddExportProfiles").':</strong> ';
|
||||
if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label))
|
||||
{
|
||||
@ -460,6 +476,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddImportProfiles").':</strong> ';
|
||||
if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label))
|
||||
{
|
||||
@ -472,6 +490,8 @@ if ($mode == 'feature')
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
$text.='<br>';
|
||||
|
||||
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
||||
$text.=$langs->trans("DetectionNotPossible");
|
||||
}
|
||||
|
||||
@ -440,7 +440,7 @@ if ($mode == 'common')
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
dol_fiche_head($head, $mode, '');
|
||||
dol_fiche_head($head, $mode, '', -1);
|
||||
|
||||
$moreforfilter = '';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
@ -773,7 +773,7 @@ if ($mode == 'common')
|
||||
|
||||
if ($mode == 'marketplace')
|
||||
{
|
||||
dol_fiche_head($head, $mode, '');
|
||||
dol_fiche_head($head, $mode, '', -1);
|
||||
|
||||
// Marketplace
|
||||
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
||||
@ -809,7 +809,7 @@ if ($mode == 'marketplace')
|
||||
|
||||
if ($mode == 'deploy')
|
||||
{
|
||||
dol_fiche_head($head, $mode, '');
|
||||
dol_fiche_head($head, $mode, '', -1);
|
||||
|
||||
|
||||
$allowonlineinstall=true;
|
||||
|
||||
@ -72,33 +72,46 @@ class box_project extends ModeleBoxes
|
||||
$totalnb = 0;
|
||||
$totalnbTask=0;
|
||||
|
||||
$textHead = $langs->trans("Projects");
|
||||
$textHead = $langs->trans("OpenedProjects");
|
||||
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
|
||||
|
||||
// list the summary of the orders
|
||||
if ($user->rights->projet->lire) {
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT.'/projet/class/project.class.php');
|
||||
$projectstatic = new Project($this->db);
|
||||
|
||||
$socid=$user->societe_id;
|
||||
|
||||
// Get list of project id allowed to user (in a string list separated by coma)
|
||||
$projectsListId='';
|
||||
if (! $user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1,$socid);
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.public";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if($user->socid) $sql.= " AND s.rowid = ".$user->socid;
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
|
||||
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
|
||||
if ($user->socid) $sql.= " AND s.rowid = ".$user->socid;
|
||||
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
|
||||
$sql.= " ORDER BY p.datec DESC";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||
|
||||
$sql.= " ORDER BY p.datec DESC";
|
||||
//$sql.= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
while ($i < min($num, $max)) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$tooltip = $langs->trans('Project') . ': ' . $objp->ref;
|
||||
$this->info_box_contents[$i][0] = array(
|
||||
'td' => 'align="left" width="16"',
|
||||
'logo' => 'object_project',
|
||||
'logo' => 'object_project'.($objp->public?'pub':''),
|
||||
'tooltip' => $tooltip,
|
||||
'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid,
|
||||
);
|
||||
@ -117,30 +130,35 @@ class box_project extends ModeleBoxes
|
||||
|
||||
$sql ="SELECT count(*) as nb, sum(progress) as totprogress";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."projet_task as pt on pt.fk_projet = p.rowid";
|
||||
$sql.=" WHERE p.entity = ".$conf->entity;
|
||||
$sql.=" AND p.rowid = ".$objp->rowid;
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
|
||||
$sql.=" AND p.rowid = ".$objp->rowid;
|
||||
$resultTask = $db->query($sql);
|
||||
if ($resultTask) {
|
||||
$objTask = $db->fetch_object($resultTask);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
||||
'text' => $objTask->nb." ".$langs->trans("Tasks"),
|
||||
);
|
||||
if ($objTask->nb > 0 )
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%",
|
||||
'text' => round($objTask->totprogress/$objTask->nb, 0)."%",
|
||||
);
|
||||
else
|
||||
$this->info_box_contents[$i][4] = array('td' => 'class="right"', 'text' => "N/A ");
|
||||
$totalnbTask += $objTask->nb;
|
||||
} else {
|
||||
$this->info_box_contents[$i][3] = array('td' => 'class="right"', 'text' => number_format(0, 0, ',', ' '));
|
||||
$this->info_box_contents[$i][3] = array('td' => 'class="right"', 'text' => round(0));
|
||||
$this->info_box_contents[$i][4] = array('td' => 'class="right"', 'text' => "N/A ");
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
if ($max < $num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('td' => 'colspan="5"', 'text' => '...');
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,11 +176,11 @@ class box_project extends ModeleBoxes
|
||||
);
|
||||
$this->info_box_contents[$i][2] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects"),
|
||||
'text' => round($num, 0)." ".$langs->trans("Projects"),
|
||||
);
|
||||
$this->info_box_contents[$i][3] = array(
|
||||
'td' => 'align="right" ',
|
||||
'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
||||
'text' => (($max < $num) ? '' : (round($totalnbTask, 0)." ".$langs->trans("Tasks"))),
|
||||
);
|
||||
$this->info_box_contents[$i][4] = array(
|
||||
'td' => '',
|
||||
|
||||
@ -1070,11 +1070,10 @@ class Form
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement =ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
||||
$out.= $comboenhancement;
|
||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
||||
}
|
||||
|
||||
// Construct $out and $outarray
|
||||
$out.= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'"'.($moreparam?' '.$moreparam:'').' name="'.$htmlname.'"'.$nodatarole.'>'."\n";
|
||||
$out.= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'"'.($moreparam?' '.$moreparam:'').' name="'.$htmlname.'">'."\n";
|
||||
|
||||
$textifempty='';
|
||||
// Do not use textifempty = ' ' or ' ' here, or search on key will search on ' key'.
|
||||
@ -1286,10 +1285,9 @@ class Form
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
|
||||
$out.= $comboenhancement;
|
||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
||||
}
|
||||
|
||||
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
||||
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
if ($showempty == 1) $out.= '<option value="0"'.($selected=='0'?' selected':'').'></option>';
|
||||
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>';
|
||||
$num = $this->db->num_rows($resql);
|
||||
@ -1481,17 +1479,15 @@ class Form
|
||||
if ($num)
|
||||
{
|
||||
// Enhance with select2
|
||||
$nodatarole='';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname);
|
||||
$out.=$comboenhancement;
|
||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
||||
}
|
||||
|
||||
// do not use maxwidthonsmartphone by default. Set it by caller so auto size to 100% will work when not defined
|
||||
$out.= '<select class="flat'.($morecss?' minwidth100 '.$morecss:' minwidth200').'" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$nodatarole.'>';
|
||||
$out.= '<select class="flat'.($morecss?' minwidth100 '.$morecss:' minwidth200').'" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').'>';
|
||||
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected':'').'> </option>'."\n";
|
||||
if ($show_every) $out.= '<option value="-2"'.(($selected==-2)?' selected':'').'>-- '.$langs->trans("Everybody").' --</option>'."\n";
|
||||
|
||||
@ -1964,10 +1960,9 @@ class Form
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement =ajax_combobox($htmlname, $events, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
|
||||
$out.= $comboenhancement;
|
||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
||||
}
|
||||
|
||||
$out.='<select class="flat'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'" id="'.$htmlname.'"'.$nodatarole.'>';
|
||||
$out.='<select class="flat'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||
|
||||
$textifempty='';
|
||||
// Do not use textifempty = ' ' or ' ' here, or search on key will search on ' key'.
|
||||
@ -4533,7 +4528,7 @@ class Form
|
||||
$disabled=true;
|
||||
}
|
||||
|
||||
if (! $options_only) $return.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$title.'>';
|
||||
if (! $options_only) $return.= '<select class="flat minwidth75imp" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$title.'>';
|
||||
|
||||
$selectedfound=false;
|
||||
foreach ($this->cache_vatrates as $rate)
|
||||
@ -4722,7 +4717,7 @@ class Form
|
||||
|
||||
$retstring.="</select>";
|
||||
|
||||
$retstring.='<select'.($disabled?' disabled':'').' class="flat valignmiddle maxwidth50onsmartphone" id="'.$prefix.'month" name="'.$prefix.'month">';
|
||||
$retstring.='<select'.($disabled?' disabled':'').' class="flat valignmiddle maxwidth75imp" id="'.$prefix.'month" name="'.$prefix.'month">';
|
||||
if ($emptydate || $set_time == -1)
|
||||
{
|
||||
$retstring.='<option value="0" selected> </option>';
|
||||
@ -4740,11 +4735,11 @@ class Form
|
||||
// Year
|
||||
if ($emptydate || $set_time == -1)
|
||||
{
|
||||
$retstring.='<input'.($disabled?' disabled':'').' placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" class="flat maxwidth50imp valignmiddle" type="text" maxlength="4" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">';
|
||||
$retstring.='<input'.($disabled?' disabled':'').' placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" class="flat maxwidth50imp valignmiddle" type="number" min="0" max="3000" maxlength="4" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$retstring.='<select'.($disabled?' disabled':'').' class="flat valignmiddle maxwidth75" id="'.$prefix.'year" name="'.$prefix.'year">';
|
||||
$retstring.='<select'.($disabled?' disabled':'').' class="flat valignmiddle maxwidth75imp" id="'.$prefix.'year" name="'.$prefix.'year">';
|
||||
|
||||
for ($year = $syear - 5; $year < $syear + 10 ; $year++)
|
||||
{
|
||||
@ -4923,7 +4918,7 @@ class Form
|
||||
}
|
||||
elseif ($typehour=='text')
|
||||
{
|
||||
$retstring.='<input placeholder="'.$langs->trans('HourShort').'" type="text" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
|
||||
$retstring.='<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
|
||||
}
|
||||
else return 'BadValueForParameterTypeHour';
|
||||
|
||||
@ -4947,7 +4942,7 @@ class Form
|
||||
}
|
||||
elseif ($typehour=='text')
|
||||
{
|
||||
$retstring.='<input placeholder="'.$langs->trans('MinuteShort').'" type="text" size="1" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">';
|
||||
$retstring.='<input placeholder="'.$langs->trans('MinuteShort').'" type="number" min="0" size="1" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat" value="'.($minSelected?((int) $minSelected):'').'">';
|
||||
}
|
||||
|
||||
if ($typehour!='text') $retstring.=' '.$langs->trans('MinuteShort');
|
||||
@ -4966,24 +4961,25 @@ class Form
|
||||
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
|
||||
*
|
||||
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
|
||||
* @param array $array Array with key+value
|
||||
* @param array $array Array (key => value)
|
||||
* @param string|string[] $id Preselected key or preselected keys for multiselect
|
||||
* @param int $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (value is '' or ' ' if 1), <0 to add an empty value with key that is this value.
|
||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||
* @param int $key_in_label 1 to show key into label with format "[key] value"
|
||||
* @param int $value_as_key 1 to use value as key
|
||||
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
|
||||
* @param int $translate Translate and encode value
|
||||
* @param int $translate 1=Translate and encode value
|
||||
* @param int $maxlen Length maximum for labels
|
||||
* @param int $disabled Html select box is disabled
|
||||
* @param string $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' or 'POS' = Do not sort, we keep original order
|
||||
* @param string $morecss Add more class to css styles
|
||||
* @param int $addjscombo Add js combo
|
||||
* @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set.
|
||||
* @param int $disablebademail Check if an email is found into value and if not disable and colorize entry.
|
||||
* @return string HTML select string.
|
||||
* @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set
|
||||
* @param int $disablebademail Check if an email is found into value and if not disable and colorize entry
|
||||
* @param int $nohtmlescape No html escaping.
|
||||
* @return string HTML select string
|
||||
* @see multiselectarray
|
||||
*/
|
||||
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='',$disablebademail=0)
|
||||
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0, $moreparamonempty='',$disablebademail=0, $nohtmlescape=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@ -5003,13 +4999,11 @@ class Form
|
||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?(constant('REQUIRE_JQUERY_MULTISELECT')?constant('REQUIRE_JQUERY_MULTISELECT'):'select2'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||
|
||||
// Enhance with select2
|
||||
$nodatarole='';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname);
|
||||
$out.=$comboenhancement;
|
||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
||||
}
|
||||
}
|
||||
|
||||
@ -5057,11 +5051,13 @@ class Form
|
||||
|
||||
if ($key_in_label)
|
||||
{
|
||||
$selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen?dol_trunc($value,$maxlen):$value));
|
||||
if (empty($nohtmlescape)) $selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen?dol_trunc($value,$maxlen):$value));
|
||||
else $selectOptionValue = $key.' - '.($maxlen?dol_trunc($value,$maxlen):$value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$selectOptionValue = dol_escape_htmltag($maxlen?dol_trunc($value,$maxlen):$value);
|
||||
if (empty($nohtmlescape)) $selectOptionValue = dol_escape_htmltag($maxlen?dol_trunc($value,$maxlen):$value);
|
||||
else $selectOptionValue = $maxlen?dol_trunc($value,$maxlen):$value;
|
||||
if ($value == '' || $value == '-') $selectOptionValue=' ';
|
||||
}
|
||||
//var_dump($selectOptionValue);
|
||||
@ -5976,6 +5972,7 @@ class Form
|
||||
}
|
||||
else
|
||||
{
|
||||
// Generic case to show photos
|
||||
$dir=$conf->$modulepart->dir_output;
|
||||
if (! empty($object->photo))
|
||||
{
|
||||
@ -6045,7 +6042,6 @@ class Form
|
||||
if ($object->photo) $ret.="<br>\n";
|
||||
$ret.='<table class="nobordernopadding centpercent">';
|
||||
if ($object->photo) $ret.='<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
||||
//$ret.='<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||
$ret.='<tr><td class="tdoverflow"><input type="file" class="flat maxwidth200onsmartphone" name="photo" id="photoinput"></td></tr>';
|
||||
$ret.='</table>';
|
||||
}
|
||||
@ -6112,10 +6108,9 @@ class Form
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname);
|
||||
$out.= $comboenhancement;
|
||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
||||
}
|
||||
|
||||
$out.= '<select class="flat minwidth200" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').$nodatarole.'>';
|
||||
$out.= '<select class="flat minwidth200" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled':'').'>';
|
||||
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
@ -1011,6 +1011,7 @@ class FormOther
|
||||
if (! empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user
|
||||
$label=$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')';
|
||||
//$label = '<span class="fa fa-home fa-fw" aria-hidden="true"></span>'.$label; KO with select2. No html rendering.
|
||||
$arrayboxtoactivatelabel[$box->id]=$label; // We keep only boxes not shown for user, to show into combo list
|
||||
}
|
||||
foreach($boxidactivatedforuser as $boxid)
|
||||
@ -1027,7 +1028,7 @@ class FormOther
|
||||
$selectboxlist.='<input type="hidden" name="userid" value="'.$user->id.'">';
|
||||
$selectboxlist.='<input type="hidden" name="areacode" value="'.$areacode.'">';
|
||||
$selectboxlist.='<input type="hidden" name="boxorder" value="'.$boxorder.'">';
|
||||
$selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone', 0, 'hidden selected');
|
||||
$selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone', 0, 'hidden selected', 0, 1);
|
||||
if (empty($conf->use_javascript_ajax)) $selectboxlist.=' <input type="submit" class="button" value="'.$langs->trans("AddBox").'">';
|
||||
$selectboxlist.='</form>';
|
||||
$selectboxlist.=ajax_combobox("boxcombo");
|
||||
|
||||
@ -396,7 +396,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
$(\''.(preg_match('/^\./',$htmlname)?$htmlname:'#'.$htmlname).'\').'.$tmpplugin.'({
|
||||
dir: \'ltr\',
|
||||
width: \''.$widthTypeOfAutocomplete.'\', /* off or resolve */
|
||||
minimumInputLength: '.$minLengthToAutocomplete.'
|
||||
minimumInputLength: '.$minLengthToAutocomplete.'
|
||||
})';
|
||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||
$msg.= ';'."\n";
|
||||
|
||||
@ -1045,7 +1045,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$morehtmlleft.='</div>';
|
||||
}
|
||||
}
|
||||
elseif ($conf->browser->layout != 'phone') // Show no photo link
|
||||
elseif ($conf->browser->layout != 'phone') // Show No photo link (picto of pbject)
|
||||
{
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||
if ($object->element == 'action')
|
||||
@ -1057,7 +1057,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
else
|
||||
{
|
||||
$width=14; $cssclass='photorefcenter';
|
||||
$nophoto=img_picto('', 'object_'.$object->picto, '', false, 1);
|
||||
$picto = $object->picto;
|
||||
if ($object->element == 'project' && ! $object->public) $picto = 'project'; // instead of projectpub
|
||||
$nophoto=img_picto('', 'object_'.$picto, '', false, 1);
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
|
||||
}
|
||||
$morehtmlleft.='</div>';
|
||||
|
||||
56
htdocs/core/lib/parsemd.lib.php
Normal file
56
htdocs/core/lib/parsemd.lib.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/parsemd.lib.php
|
||||
* \brief This file contains functions dedicated to MD parsind.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function to parse MD content into HTML
|
||||
*
|
||||
* @param string $content MD content
|
||||
* @param string $parser 'parsedown' or 'nl2br'
|
||||
* @param string $replaceimagepath Replace path to image with another path. Exemple: ('doc/'=>'xxx/aaa/')
|
||||
* @return string Parsed content
|
||||
*/
|
||||
function dolMd2Html($content, $parser='parsedown',$replaceimagepath=null)
|
||||
{
|
||||
if (is_array($replaceimagepath))
|
||||
{
|
||||
foreach($replaceimagepath as $key => $val)
|
||||
{
|
||||
$keytoreplace = ']('.$key;
|
||||
$valafter = ']('.$val;
|
||||
$content = preg_replace('/'.preg_quote($keytoreplace,'/').'/m', $valafter, $content);
|
||||
}
|
||||
}
|
||||
if ($parser == 'parsedown')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/includes/parsedown/Parsedown.php';
|
||||
$Parsedown = new Parsedown();
|
||||
$content = $Parsedown->text($content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$content = nl2br($content);
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
@ -582,26 +582,68 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the translated module description if translation exists in admin.lang or the default module description
|
||||
* Gives the long description of a module. First check README-la_LA.md then README.md
|
||||
* If not markdown files found, it return translated value of the key ->descriptionlong.
|
||||
*
|
||||
* @return string Translated module description
|
||||
* @return string Long description of a module
|
||||
*/
|
||||
function getDescLong()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if (empty($this->descriptionlong)) return '';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
||||
$filefound= false;
|
||||
|
||||
// If module description translation does not exist using its unique id, we can use its name to find translation
|
||||
if (is_array($this->langfiles))
|
||||
// Define path to file README.md.
|
||||
// First check README-la_LA.md then README.md
|
||||
$pathoffile = dol_buildpath(strtolower($this->name).'/README-'.$langs->defaultlang.'.md', 0);
|
||||
if (dol_is_file($pathoffile))
|
||||
{
|
||||
foreach($this->langfiles as $val)
|
||||
$filefound = true;
|
||||
}
|
||||
if (! $filefound)
|
||||
{
|
||||
$pathoffile = dol_buildpath(strtolower($this->name).'/README.md', 0);
|
||||
if (dol_is_file($pathoffile))
|
||||
{
|
||||
if ($val) $langs->load($val);
|
||||
$filefound = true;
|
||||
}
|
||||
}
|
||||
return $langs->trans($this->descriptionlong);
|
||||
|
||||
if ($filefound) // Mostly for external modules
|
||||
{
|
||||
$content = file_get_contents($pathoffile);
|
||||
|
||||
if ((float) DOL_VERSION >= 6.0)
|
||||
{
|
||||
@include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
|
||||
$content = dolMd2Html($content, 'parsedown', array('doc/'=>dol_buildpath('cabinetmed/doc/', 1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
$content = nl2br($content);
|
||||
}
|
||||
}
|
||||
else // Mostly for internal modules
|
||||
{
|
||||
if (! empty($this->descriptionlong))
|
||||
{
|
||||
if (is_array($this->langfiles))
|
||||
{
|
||||
foreach($this->langfiles as $val)
|
||||
{
|
||||
if ($val) $langs->load($val);
|
||||
}
|
||||
}
|
||||
|
||||
$content = $langs->trans($this->descriptionlong);
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -69,7 +69,7 @@ class modFacture extends DolibarrModules
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("bills","companies","compta","products");
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation_ext = array('CA'=>'WarningInstallationMayBecomeNotCompliantWithLaw'); // Warning to show when we activate an external module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation_ext = array('FR'=>'WarningInstallationMayBecomeNotCompliantWithLaw'); // Warning to show when we activate an external module. array('always'='text') or array('FR'='text')
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("facture.php");
|
||||
|
||||
@ -1217,53 +1217,10 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Generate or regenerate the PDF document
|
||||
*/
|
||||
if ($action == 'builddoc') // GET or POST
|
||||
{
|
||||
$depl = new ExpenseReport($db, 0, $_GET['id']);
|
||||
$depl->fetch($id);
|
||||
|
||||
if ($_REQUEST['model'])
|
||||
{
|
||||
$depl->setDocModel($user, $_REQUEST['model']);
|
||||
}
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (! empty($_REQUEST['lang_id']))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
$result=expensereport_pdf_create($db, $depl, '', $depl->modelpdf, $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
// Remove file in doc form
|
||||
else if ($action == 'remove_file')
|
||||
{
|
||||
$object = new ExpenseReport($db, 0, $_GET['id']);
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$langs->load("other");
|
||||
$upload_dir = $conf->expensereport->dir_output;
|
||||
$file = $upload_dir . '/' . GETPOST('file');
|
||||
$ret=dol_delete_file($file,0,0,0,$object);
|
||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->expensereport->dir_output;
|
||||
$permissioncreate = $user->rights->expensereport->creer;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
}
|
||||
|
||||
|
||||
@ -1315,8 +1272,8 @@ if ($action == 'create')
|
||||
print '<td>';
|
||||
$defaultselectuser=$user->id;
|
||||
if (GETPOST('fk_user_author') > 0) $defaultselectuser=GETPOST('fk_user_author');
|
||||
$include_users = 'hierarchyme';
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expensereport->writeall_advance)) $include_users=array();
|
||||
$include_users = 'hierarchyme';
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->expensereport->writeall_advance)) $include_users=array();
|
||||
$s=$form->select_dolusers($defaultselectuser, "fk_user_author", 0, "", 0, $include_users);
|
||||
print $s;
|
||||
print '</td>';
|
||||
@ -1352,8 +1309,8 @@ if ($action == 'create')
|
||||
|
||||
// Public note
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
|
||||
print '<td class="tdtop">';
|
||||
print '<td class="tdtop">' . $langs->trans('NotePublic') . '</td>';
|
||||
print '<td>';
|
||||
|
||||
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
@ -1362,8 +1319,8 @@ if ($action == 'create')
|
||||
// Private note
|
||||
if (empty($user->societe_id)) {
|
||||
print '<tr>';
|
||||
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
|
||||
print '<td class="tdtop">';
|
||||
print '<td class="tdtop">' . $langs->trans('NotePrivate') . '</td>';
|
||||
print '<td>';
|
||||
|
||||
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
@ -1528,7 +1485,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_fiche_head($head, 'card', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||
dol_fiche_head($head, 'card', $langs->trans("ExpenseReport"), -1, 'trip');
|
||||
|
||||
// Clone confirmation
|
||||
if ($action == 'clone') {
|
||||
@ -2002,7 +1959,7 @@ else
|
||||
print '<td></td>';
|
||||
|
||||
// Select date
|
||||
print '<td style="text-align:center;">';
|
||||
print '<td class="center">';
|
||||
$form->select_date($objp->date,'date');
|
||||
print '</td>';
|
||||
|
||||
@ -2015,13 +1972,13 @@ else
|
||||
}
|
||||
|
||||
// Select type
|
||||
print '<td style="text-align:center;">';
|
||||
print '<td class="center">';
|
||||
select_type_fees_id($objp->type_fees_code,'fk_c_type_fees');
|
||||
print '</td>';
|
||||
|
||||
// Add comments
|
||||
print '<td>';
|
||||
print '<textarea class="flat_ndf" name="comments" class="centpercent">'.$objp->comments.'</textarea>';
|
||||
print '<textarea name="comments" class="flat_ndf centpercent">'.$objp->comments.'</textarea>';
|
||||
print '</td>';
|
||||
|
||||
// VAT
|
||||
@ -2031,12 +1988,12 @@ else
|
||||
|
||||
// Unit price
|
||||
print '<td style="text-align:right;">';
|
||||
print '<input type="text" size="6" name="value_unit" value="'.$objp->value_unit.'" />';
|
||||
print '<input type="text" min="0" class="maxwidth100" name="value_unit" value="'.$objp->value_unit.'" />';
|
||||
print '</td>';
|
||||
|
||||
// Quantity
|
||||
print '<td style="text-align:right;">';
|
||||
print '<input type="text" size="4" name="qty" value="'.$objp->qty.'" />';
|
||||
print '<input type="number" min="0" class="maxwidth100" name="qty" value="'.$objp->qty.'" />';
|
||||
print '</td>';
|
||||
|
||||
if ($action != 'editline')
|
||||
@ -2117,12 +2074,12 @@ else
|
||||
|
||||
// Unit price
|
||||
print '<td align="right">';
|
||||
print '<input type="text" size="5" name="value_unit" value="'.$value_unit.'">';
|
||||
print '<input type="text" class="right maxwidth50" name="value_unit" value="'.$value_unit.'">';
|
||||
print '</td>';
|
||||
|
||||
// Quantity
|
||||
print '<td align="right">';
|
||||
print '<input type="text" size="2" name="qty" value="'.($qty?$qty:1).'">';
|
||||
print '<input type="number" min="0" class="right maxwidth50" name="qty" value="'.($qty?$qty:1).'">';
|
||||
print '</td>';
|
||||
|
||||
if ($action != 'editline')
|
||||
|
||||
@ -91,7 +91,7 @@ if ($object->id)
|
||||
|
||||
$head=expensereport_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'documents', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||
dol_fiche_head($head, 'documents', $langs->trans("ExpenseReport"), -1, 'trip');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
@ -39,6 +39,9 @@ $result = restrictedArea($user, 'expensereport', $id, 'expensereport');
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Info");
|
||||
$helpurl="EN:Module_Expense_Reports";
|
||||
llxHeader("",$title,$helpurl);
|
||||
@ -51,7 +54,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$head = expensereport_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||
dol_fiche_head($head, 'info', $langs->trans("ExpenseReport"), -1, 'trip');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$head = expensereport_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'note', $langs->trans("ExpenseReport"), 0, 'trip');
|
||||
dol_fiche_head($head, 'note', $langs->trans("ExpenseReport"), -1, 'trip');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/expensereport/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@ -87,20 +87,6 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
|
||||
/*
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
*/
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
@ -111,7 +97,6 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
16
htdocs/includes/parsedown/.travis.yml
Normal file
16
htdocs/includes/parsedown/.travis.yml
Normal file
@ -0,0 +1,16 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.1
|
||||
- 7.0
|
||||
- 5.6
|
||||
- 5.5
|
||||
- 5.4
|
||||
- 5.3
|
||||
- hhvm
|
||||
- hhvm-nightly
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: hhvm-nightly
|
||||
20
htdocs/includes/parsedown/LICENSE.txt
Normal file
20
htdocs/includes/parsedown/LICENSE.txt
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Emanuil Rusev, erusev.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
1548
htdocs/includes/parsedown/Parsedown.php
Normal file
1548
htdocs/includes/parsedown/Parsedown.php
Normal file
File diff suppressed because it is too large
Load Diff
56
htdocs/includes/parsedown/README.md
Normal file
56
htdocs/includes/parsedown/README.md
Normal file
@ -0,0 +1,56 @@
|
||||
> You might also like [Caret](http://caret.io?ref=parsedown) - our Markdown editor for Mac / Windows / Linux.
|
||||
|
||||
## Parsedown
|
||||
|
||||
[](https://travis-ci.org/erusev/parsedown)
|
||||
<!--[](https://packagist.org/packages/erusev/parsedown)-->
|
||||
|
||||
Better Markdown Parser in PHP
|
||||
|
||||
[Demo](http://parsedown.org/demo) |
|
||||
[Benchmarks](http://parsedown.org/speed) |
|
||||
[Tests](http://parsedown.org/tests/) |
|
||||
[Documentation](https://github.com/erusev/parsedown/wiki/)
|
||||
|
||||
### Features
|
||||
|
||||
* One File
|
||||
* Super Fast
|
||||
* Extensible
|
||||
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
|
||||
* Tested in 5.3 to 7.1 and in HHVM
|
||||
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
|
||||
|
||||
### Installation
|
||||
|
||||
Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown).
|
||||
|
||||
### Example
|
||||
|
||||
``` php
|
||||
$Parsedown = new Parsedown();
|
||||
|
||||
echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
|
||||
```
|
||||
|
||||
More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI).
|
||||
|
||||
### Questions
|
||||
|
||||
**How does Parsedown work?**
|
||||
|
||||
It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines).
|
||||
|
||||
We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages.
|
||||
|
||||
**Is it compliant with CommonMark?**
|
||||
|
||||
It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
|
||||
|
||||
**Who uses it?**
|
||||
|
||||
[phpDocumentor](http://www.phpdoc.org/), [October CMS](http://octobercms.com/), [Bolt CMS](http://bolt.cm/), [Kirby CMS](http://getkirby.com/), [Grav CMS](http://getgrav.org/), [Statamic CMS](http://www.statamic.com/), [Herbie CMS](http://www.getherbie.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony demo](https://github.com/symfony/symfony-demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents).
|
||||
|
||||
**How can I help?**
|
||||
|
||||
Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).
|
||||
21
htdocs/includes/parsedown/composer.json
Normal file
21
htdocs/includes/parsedown/composer.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"description": "Parser for Markdown.",
|
||||
"keywords": ["markdown", "parser"],
|
||||
"homepage": "http://parsedown.org",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Emanuil Rusev",
|
||||
"email": "hello@erusev.com",
|
||||
"homepage": "http://erusev.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {"Parsedown": ""}
|
||||
}
|
||||
}
|
||||
8
htdocs/includes/parsedown/phpunit.xml.dist
Normal file
8
htdocs/includes/parsedown/phpunit.xml.dist
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="test/bootstrap.php" colors="true">
|
||||
<testsuites>
|
||||
<testsuite>
|
||||
<file>test/ParsedownTest.php</file>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
@ -77,7 +77,7 @@ if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeAr
|
||||
|
||||
llxHeader('',$title);
|
||||
|
||||
|
||||
|
||||
$resultboxes=FormOther::getBoxesArea($user,"0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
|
||||
|
||||
|
||||
@ -242,7 +242,7 @@ if (empty($user->societe_id))
|
||||
'order',
|
||||
'bill',
|
||||
'propal',
|
||||
'project',
|
||||
'projectpub',
|
||||
'trip',
|
||||
'generic'
|
||||
);
|
||||
@ -388,7 +388,6 @@ if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
$board=new Project($db);
|
||||
|
||||
$dashboardlines[] = $board->load_board($user);
|
||||
}
|
||||
|
||||
|
||||
@ -1131,6 +1131,7 @@ CompanyIdProfChecker=Rules on Professional Ids
|
||||
MustBeUnique=Must be unique?
|
||||
MustBeMandatory=Mandatory to create third parties?
|
||||
MustBeInvoiceMandatory=Mandatory to validate invoices?
|
||||
TechnicalServicesProvided=Technical services provided
|
||||
##### Webcal setup #####
|
||||
WebCalUrlForVCalExport=An export link to <b>%s</b> format is available at following link: %s
|
||||
##### Invoices #####
|
||||
|
||||
@ -1080,7 +1080,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! defined('DISABLE_FONT_AWSOME'))
|
||||
{
|
||||
print '<!-- Includes CSS for font awesome -->'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/fontawesome/css/font-awesome.min.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}
|
||||
|
||||
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
|
||||
// Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||
@ -1100,7 +1106,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
}
|
||||
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
|
||||
print '<link rel="stylesheet" type="text/css" href="'.$themepath.$themeparam.'">'."\n";
|
||||
if (! empty($conf->global->MAIN_FIX_FLASH_ON_CHROME)) print '<!-- Includes CSS that does not exists as workaround of flash bug of chrome -->'."\n".'<link rel="stylesheet" type="text/css" href="filethatdoesnotexiststosolvechromeflashbug">'."\n";
|
||||
if (! empty($conf->global->MAIN_FIX_FLASH_ON_CHROME)) print '<!-- Includes CSS that does not exists as a workaround of flash bug of chrome -->'."\n".'<link rel="stylesheet" type="text/css" href="filethatdoesnotexiststosolvechromeflashbug">'."\n";
|
||||
|
||||
// CSS forced by modules (relative url starting with /)
|
||||
if (! empty($conf->modules_parts['css']))
|
||||
@ -1390,7 +1396,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
$logouttext='';
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$logouthtmltext=$appli.'<br>';
|
||||
//$logouthtmltext=$appli.'<br>';
|
||||
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
|
||||
{
|
||||
$logouthtmltext.=$langs->trans("Logout").'<br>';
|
||||
@ -1467,8 +1473,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
if ($helpbaseurl && $helppage)
|
||||
{
|
||||
$text='';
|
||||
$title='';
|
||||
//$text.='<div id="blockvmenuhelpwiki" class="blockvmenuhelp">';
|
||||
$title=$appli.'<br>';
|
||||
$title.=$langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage': 'GoToHelpPage');
|
||||
if ($mode == 'wiki') $title.=' - '.$langs->trans("PageWiki").' "'.dol_escape_htmltag(strtr($helppage,'_',' ')).'"';
|
||||
$text.='<a class="help" target="_blank" href="';
|
||||
@ -1631,32 +1636,35 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
|
||||
print '<div id="blockvmenuhelp" class="blockvmenuhelp">'."\n";
|
||||
|
||||
// Version
|
||||
$doliurl='http://www.dolibarr.org';
|
||||
//local communities
|
||||
if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
|
||||
if (preg_match('/es/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.es';
|
||||
if (preg_match('/de/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.de';
|
||||
if (preg_match('/it/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.it';
|
||||
if (preg_match('/gr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.gr';
|
||||
|
||||
$appli=constant('DOL_APPLICATION_TITLE');
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE))
|
||||
{
|
||||
$appli=$conf->global->MAIN_APPLICATION_TITLE; $doliurl='';
|
||||
if (preg_match('/\d\.\d/', $appli))
|
||||
{
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli.=" (".DOL_VERSION.")"; // If new title contains a version that is different than core
|
||||
}
|
||||
else $appli.=" ".DOL_VERSION;
|
||||
}
|
||||
else $appli.=" ".DOL_VERSION;
|
||||
print '<div id="blockvmenuhelpapp" class="blockvmenuhelp">';
|
||||
if ($doliurl) print '<a class="help" target="_blank" href="'.$doliurl.'">';
|
||||
else print '<span class="help">';
|
||||
print $appli;
|
||||
if ($doliurl) print '</a>';
|
||||
else print '</span>';
|
||||
print '</div>'."\n";
|
||||
if (empty($conf->global->MAIN_HIDE_VERSION)) // Version is already on help picto and on login page.
|
||||
{
|
||||
$doliurl='https://www.dolibarr.org';
|
||||
//local communities
|
||||
if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
|
||||
if (preg_match('/es/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.es';
|
||||
if (preg_match('/de/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.de';
|
||||
if (preg_match('/it/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.it';
|
||||
if (preg_match('/gr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.gr';
|
||||
|
||||
$appli=constant('DOL_APPLICATION_TITLE');
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE))
|
||||
{
|
||||
$appli=$conf->global->MAIN_APPLICATION_TITLE; $doliurl='';
|
||||
if (preg_match('/\d\.\d/', $appli))
|
||||
{
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli.=" (".DOL_VERSION.")"; // If new title contains a version that is different than core
|
||||
}
|
||||
else $appli.=" ".DOL_VERSION;
|
||||
}
|
||||
else $appli.=" ".DOL_VERSION;
|
||||
print '<div id="blockvmenuhelpapp" class="blockvmenuhelp">';
|
||||
if ($doliurl) print '<a class="help" target="_blank" href="'.$doliurl.'">';
|
||||
else print '<span class="help">';
|
||||
print $appli;
|
||||
if ($doliurl) print '</a>';
|
||||
else print '</span>';
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
// Link to bugtrack
|
||||
if (! empty($conf->global->MAIN_BUGTRACK_ENABLELINK))
|
||||
|
||||
@ -1692,8 +1692,8 @@ class Project extends CommonObject
|
||||
$response->warning_delay = $conf->projet->warning_delay/60/60/24;
|
||||
$response->label = $langs->trans("OpenedProjects");
|
||||
if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project';
|
||||
else $response->url = DOL_URL_ROOT.'/projet/list.php?mode=mine&search_status=1&mainmenu=project';
|
||||
$response->img = img_object($langs->trans("Projects"),"project");
|
||||
else $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project';
|
||||
$response->img = img_object($langs->trans("Projects"),"projectpub");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
|
||||
@ -197,6 +197,7 @@ $title=$langs->trans("Projects");
|
||||
|
||||
|
||||
// Get list of project id allowed to user (in a string list separated by coma)
|
||||
$projectsListId='';
|
||||
if (! $user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1,$socid);
|
||||
|
||||
// Get id of types of contacts for projects (This list never contains a lot of elements)
|
||||
@ -246,7 +247,7 @@ if ($search_project_user > 0)
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
|
||||
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
|
||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$db->escape($search_categ);
|
||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
||||
|
||||
@ -1283,7 +1283,7 @@ if ($action == 'create')
|
||||
$soc->fetch($object->socid);
|
||||
|
||||
$head = supplier_proposal_prepare_head($object);
|
||||
dol_fiche_head($head, 'comm', $langs->trans('CommRequest'), 0, 'supplier_proposal');
|
||||
dol_fiche_head($head, 'comm', $langs->trans('CommRequest'), -1, 'supplier_proposal');
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ if ($object->id > 0)
|
||||
$upload_dir = $conf->supplier_proposal->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
|
||||
$head = supplier_proposal_prepare_head($object);
|
||||
dol_fiche_head($head, 'document', $langs->trans('CommRequest'), 0, 'supplier_proposal');
|
||||
dol_fiche_head($head, 'document', $langs->trans('CommRequest'), -1, 'supplier_proposal');
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
|
||||
@ -53,7 +53,7 @@ $object->info($object->id);
|
||||
|
||||
|
||||
$head = supplier_proposal_prepare_head($object);
|
||||
dol_fiche_head($head, 'info', $langs->trans('CommRequest'), 0, 'supplier_proposal');
|
||||
dol_fiche_head($head, 'info', $langs->trans('CommRequest'), -1, 'supplier_proposal');
|
||||
|
||||
// Supplier proposal card
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/supplier_proposal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
@ -76,7 +76,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ( $societe->fetch($object->socid) )
|
||||
{
|
||||
$head = supplier_proposal_prepare_head($object);
|
||||
dol_fiche_head($head, 'note', $langs->trans('CommRequest'), 0, 'supplier_proposal');
|
||||
dol_fiche_head($head, 'note', $langs->trans('CommRequest'), -1, 'supplier_proposal');
|
||||
|
||||
|
||||
// Supplier proposal card
|
||||
|
||||
@ -638,6 +638,13 @@ div.myavailability {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* For the long description of module */
|
||||
.moduledesclong p img, .moduledesclong p a img {
|
||||
max-width: 90% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
|
||||
/* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */
|
||||
/*.table-responsive {
|
||||
width: calc(100% - 330px);
|
||||
@ -692,6 +699,7 @@ div.fiche>form>div.div-table-responsive {
|
||||
.minwidth400 { min-width: 400px; }
|
||||
.minwidth500 { min-width: 500px; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 75px !important; }
|
||||
.minwidth100imp { min-width: 100px !important; }
|
||||
.minwidth200imp { min-width: 200px !important; }
|
||||
.minwidth300imp { min-width: 300px !important; }
|
||||
@ -708,6 +716,7 @@ div.fiche>form>div.div-table-responsive {
|
||||
.maxwidth400 { max-width: 400px; }
|
||||
.maxwidth500 { max-width: 500px; }
|
||||
.maxwidth50imp { max-width: 50px !important; }
|
||||
.maxwidth75imp { max-width: 75px !important; }
|
||||
.minheight20 { min-height: 20px; }
|
||||
.minheight40 { min-height: 40px; }
|
||||
.titlefieldcreate { width: 20%; }
|
||||
@ -721,6 +730,7 @@ div.fiche>form>div.div-table-responsive {
|
||||
.titlefield { width: 30% !important; }
|
||||
.titlefieldcreate { width: 30% !important; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 75px !important; }
|
||||
.minwidth100imp { min-width: 100px !important; }
|
||||
.minwidth200imp { min-width: 200px !important; }
|
||||
.minwidth300imp { min-width: 300px !important; }
|
||||
@ -733,7 +743,8 @@ div.fiche>form>div.div-table-responsive {
|
||||
{
|
||||
.maxwidthonsmartphone { max-width: 100px; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth100imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 70px !important; }
|
||||
.minwidth100imp { min-width: 80px !important; }
|
||||
.minwidth200imp { min-width: 100px !important; }
|
||||
.minwidth300imp { min-width: 100px !important; }
|
||||
.minwidth400imp { min-width: 100px !important; }
|
||||
@ -784,11 +795,12 @@ div.fiche>form>div.div-table-responsive {
|
||||
.maxwidth300onsmartphone { max-width: 300px; }
|
||||
.maxwidth400onsmartphone { max-width: 400px; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth100imp { min-width: 50px !important; }
|
||||
.minwidth200imp { min-width: 50px !important; }
|
||||
.minwidth300imp { min-width: 50px !important; }
|
||||
.minwidth400imp { min-width: 50px !important; }
|
||||
.minwidth500imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 60px !important; }
|
||||
.minwidth100imp { min-width: 60px !important; }
|
||||
.minwidth200imp { min-width: 60px !important; }
|
||||
.minwidth300imp { min-width: 60px !important; }
|
||||
.minwidth400imp { min-width: 60px !important; }
|
||||
.minwidth500imp { min-width: 60px !important; }
|
||||
.titlefield { width: auto; }
|
||||
.titlefieldcreate { width: auto; }
|
||||
|
||||
|
||||
@ -646,6 +646,13 @@ div.myavailability {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* For the long description of module */
|
||||
.moduledesclong p img,.moduledesclong p a img {
|
||||
max-width: 90% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
|
||||
/* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */
|
||||
/*.table-responsive {
|
||||
width: calc(100% - 330px);
|
||||
@ -701,6 +708,7 @@ div.fiche>form>div.div-table-responsive {
|
||||
.minwidth400 { min-width: 400px; }
|
||||
.minwidth500 { min-width: 500px; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 75px !important; }
|
||||
.minwidth100imp { min-width: 100px !important; }
|
||||
.minwidth200imp { min-width: 200px !important; }
|
||||
.minwidth300imp { min-width: 300px !important; }
|
||||
@ -717,6 +725,7 @@ div.fiche>form>div.div-table-responsive {
|
||||
.maxwidth400 { max-width: 400px; }
|
||||
.maxwidth500 { max-width: 500px; }
|
||||
.maxwidth50imp { max-width: 50px !important; }
|
||||
.maxwidth75imp { max-width: 75px !important; }
|
||||
.minheight20 { min-height: 20px; }
|
||||
.minheight40 { min-height: 40px; }
|
||||
.titlefieldcreate { width: 20%; }
|
||||
@ -731,6 +740,7 @@ div.fiche>form>div.div-table-responsive {
|
||||
.titlefield { width: 30% !important; }
|
||||
.titlefieldcreate { width: 30% !important; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 75px !important; }
|
||||
.minwidth100imp { min-width: 100px !important; }
|
||||
.minwidth200imp { min-width: 200px !important; }
|
||||
.minwidth300imp { min-width: 300px !important; }
|
||||
@ -743,7 +753,8 @@ div.fiche>form>div.div-table-responsive {
|
||||
{
|
||||
.maxwidthonsmartphone { max-width: 100px; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth100imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 70px !important; }
|
||||
.minwidth100imp { min-width: 80px !important; }
|
||||
.minwidth200imp { min-width: 100px !important; }
|
||||
.minwidth300imp { min-width: 100px !important; }
|
||||
.minwidth400imp { min-width: 100px !important; }
|
||||
@ -793,11 +804,12 @@ div.fiche>form>div.div-table-responsive {
|
||||
.maxwidth300onsmartphone { max-width: 300px; }
|
||||
.maxwidth400onsmartphone { max-width: 400px; }
|
||||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth100imp { min-width: 50px !important; }
|
||||
.minwidth200imp { min-width: 50px !important; }
|
||||
.minwidth300imp { min-width: 50px !important; }
|
||||
.minwidth400imp { min-width: 50px !important; }
|
||||
.minwidth500imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 60px !important; }
|
||||
.minwidth100imp { min-width: 60px !important; }
|
||||
.minwidth200imp { min-width: 60px !important; }
|
||||
.minwidth300imp { min-width: 60px !important; }
|
||||
.minwidth400imp { min-width: 60px !important; }
|
||||
.minwidth500imp { min-width: 60px !important; }
|
||||
.titlefield { width: auto; }
|
||||
.titlefieldcreate { width: auto; }
|
||||
|
||||
|
||||
@ -2360,13 +2360,9 @@ else
|
||||
|
||||
$somethingshown = $formfile->show_documents('user', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
|
||||
// Linked object block
|
||||
$somethingshown = $form->showLinkedObjectBlock($object);
|
||||
|
||||
// Show links to link elements
|
||||
$linktoelem = $form->showLinkToObjectBlock($object);
|
||||
if ($linktoelem) print '<br>'.$linktoelem;
|
||||
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, null);
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user