Merge pull request #17279 from aspangaro/14a38
NEW: Add constant MAIN_BUGTRACK_URL to add possibility to redirect to other service
This commit is contained in:
commit
ee9c823c33
@ -211,11 +211,12 @@ if ($action == 'update') {
|
|||||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||||
//dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST('MAIN_BUGTRACK_ENABLELINK', 'aZ09'), 'chaine', 0, '', $conf->entity);
|
|
||||||
//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
||||||
|
|
||||||
$varforimage = 'imagebackground'; $dirforimage = $conf->mycompany->dir_output.'/logos/';
|
$varforimage = 'imagebackground'; $dirforimage = $conf->mycompany->dir_output.'/logos/';
|
||||||
@ -401,8 +402,7 @@ print '</tr>';
|
|||||||
|
|
||||||
// Show bugtrack link
|
// Show bugtrack link
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||||
print ajax_constantonoff("MAIN_BUGTRACK_ENABLELINK", array(), $conf->entity, 0, 0, 1, 0);
|
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" size="32" value="'.(isset($conf->global->MAIN_BUGTRACK_ENABLELINK) ? $conf->global->MAIN_BUGTRACK_ENABLELINK : '').'">';
|
||||||
//print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK', $conf->global->MAIN_BUGTRACK_ENABLELINK, 1);
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -426,3 +426,5 @@ ALTER TABLE llx_facture_fourn ADD COLUMN date_closing datetime DEFAULT NULL afte
|
|||||||
ALTER TABLE llx_facture_fourn ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid;
|
ALTER TABLE llx_facture_fourn ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid;
|
||||||
|
|
||||||
ALTER TABLE llx_entrepot ADD COLUMN fk_project INTEGER DEFAULT NULL AFTER entity; -- project associated to warehouse if any
|
ALTER TABLE llx_entrepot ADD COLUMN fk_project INTEGER DEFAULT NULL AFTER entity; -- project associated to warehouse if any
|
||||||
|
|
||||||
|
UPDATE llx_const SET value = 'github' WHERE __DECRYPT('name')__ = 'MAIN_BUGTRACK_ENABLELINK' AND __DECRYPT('value')__ = 1;
|
||||||
|
|||||||
@ -1159,7 +1159,7 @@ DoNotSuggestPaymentMode=Do not suggest
|
|||||||
NoActiveBankAccountDefined=No active bank account defined
|
NoActiveBankAccountDefined=No active bank account defined
|
||||||
OwnerOfBankAccount=Owner of bank account %s
|
OwnerOfBankAccount=Owner of bank account %s
|
||||||
BankModuleNotActive=Bank accounts module not enabled
|
BankModuleNotActive=Bank accounts module not enabled
|
||||||
ShowBugTrackLink=Show link "<strong>%s</strong>"
|
ShowBugTrackLink=Define the link "<strong>%s</strong>" (empty to not display this link, 'github' for the link to the Dolibarr project or define directly an url 'https://...')
|
||||||
Alerts=Alerts
|
Alerts=Alerts
|
||||||
DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for:
|
DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for:
|
||||||
DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element.
|
DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element.
|
||||||
|
|||||||
@ -2743,6 +2743,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
|||||||
if (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) {
|
if (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
|
if ($conf->global->MAIN_BUGTRACK_ENABLELINK == 'github') {
|
||||||
$bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new?labels=Bug';
|
$bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new?labels=Bug';
|
||||||
$bugbaseurl .= '&title=';
|
$bugbaseurl .= '&title=';
|
||||||
$bugbaseurl .= urlencode("Bug: ");
|
$bugbaseurl .= urlencode("Bug: ");
|
||||||
@ -2775,6 +2776,13 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
|||||||
$bugbaseurl .= urlencode("[*Files*]\n");
|
$bugbaseurl .= urlencode("[*Files*]\n");
|
||||||
$bugbaseurl .= urlencode("\n");
|
$bugbaseurl .= urlencode("\n");
|
||||||
|
|
||||||
|
$bugbaseurl .= urlencode("\n");
|
||||||
|
$bugbaseurl .= urlencode("## Report\n");
|
||||||
|
} elseif (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) {
|
||||||
|
$bugbaseurl = $conf->global->MAIN_BUGTRACK_ENABLELINK;
|
||||||
|
} else {
|
||||||
|
$bugbaseurl = "";
|
||||||
|
}
|
||||||
|
|
||||||
// Execute hook printBugtrackInfo
|
// Execute hook printBugtrackInfo
|
||||||
$parameters = array('bugbaseurl' => $bugbaseurl);
|
$parameters = array('bugbaseurl' => $bugbaseurl);
|
||||||
@ -2785,8 +2793,6 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_
|
|||||||
$bugbaseurl = $hookmanager->resPrint;
|
$bugbaseurl = $hookmanager->resPrint;
|
||||||
}
|
}
|
||||||
|
|
||||||
$bugbaseurl .= urlencode("\n");
|
|
||||||
$bugbaseurl .= urlencode("## Report\n");
|
|
||||||
print '<div id="blockvmenuhelpbugreport" class="blockvmenuhelp">';
|
print '<div id="blockvmenuhelpbugreport" class="blockvmenuhelp">';
|
||||||
print '<a class="help" target="_blank" rel="noopener" href="'.$bugbaseurl.'">'.$langs->trans("FindBug").'</a>';
|
print '<a class="help" target="_blank" rel="noopener" href="'.$bugbaseurl.'">'.$langs->trans("FindBug").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user