diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index e940a3c6a41..6dd34e990e7 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -802,14 +802,14 @@ if ($action == 'create') { print ''; print ""; + print '
| '; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ' | '; +} foreach ($fieldlist as $field => $value) { if ($value == 'module') { print ''; @@ -944,14 +952,20 @@ foreach ($fieldlist as $field => $value) { // Status print ' | '; // Action column -print ' | '; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print ' | '; +if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ' | '; +} print '|||||||||
| '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ' | '; + } // Show main fields if (empty($reshook)) { fieldList($fieldlist, $obj, $tabname[$id], 'edit'); } + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ' | '; + } + print "\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ' | '; + print '|||||||||||
| '; $fieldsforcontent = array('topic', 'joinfiles', 'content'); if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { - $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); + $fieldsforcontent[] = 'content_lines'; } foreach ($fieldsforcontent as $tmpfieldlist) { $showfield = 1; @@ -1068,15 +1101,15 @@ if ($num) { // Show value for field if ($showfield) { // Show line for topic, joinfiles and content - print ' | |||||||||||||
| ';
if ($tmpfieldlist == 'topic') {
print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' ';
print '';
+ print ' '."\n"; } if ($tmpfieldlist == 'joinfiles') { print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; print $form->selectyesno($tmpfieldlist.'-'.$rowid, (isset($obj->$tmpfieldlist) ? $obj->$tmpfieldlist : '0'), 1, false, 0, 1); + print ' '."\n"; } if ($tmpfieldlist == 'content') { @@ -1089,6 +1122,7 @@ if ($num) { print $doleditor->Create(1); } if ($tmpfieldlist == 'content_lines') { + print ' '."\n"; print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; $okforextended = true; if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { @@ -1097,11 +1131,11 @@ if ($num) { $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, $acceptlocallinktomedia, $okforextended, ROWS_6, '90%'); print $doleditor->Create(1); } - print ' | ';
- print ''; - print ' | '; } } + print ''; + print ' | '; + print ' | '; print " | |||||||||
| '; + if ($canbemodified) { + print ''.img_edit().''; + } + if ($iserasable) { + print ''.img_delete().''; + //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin + } + print ' | '; + } + $tmpaction = 'view'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -1211,19 +1271,6 @@ if ($num) { } } - // Can an entry be erased or disabled ? - $iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default - if (!$user->admin && $obj->fk_user != $user->id) { - $iserasable = 0; - $canbedisabled = 0; - $canbemodified = 0; - } - - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); - if ($param) { - $url .= '&'.$param; - } - // Status / Active print ''; if ($canbedisabled) { @@ -1233,16 +1280,18 @@ if ($num) { } print " | "; - // Modify link / Delete link - print ''; - if ($canbemodified) { - print ''.img_edit().''; + // Action column - Modify link / Delete link + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ' | '; + if ($canbemodified) { + print ''.img_edit().''; + } + if ($iserasable) { + print ''.img_delete().''; + //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin + } + print ' | '; } - if ($iserasable) { - print ''.img_delete().''; - //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin - } - print ''; print "||||||||||