Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: ChangeLog htdocs/core/ajax/row.php htdocs/filefunc.inc.php
This commit is contained in:
commit
88ffe1827e
29
ChangeLog
29
ChangeLog
@ -3,6 +3,7 @@ English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 16.0.0 compared to 15.0.0 *****
|
||||
|
||||
For users:
|
||||
@ -30,6 +31,34 @@ Following changes may create regressions for some external modules, but were nec
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 15.0.1 compared to 15.0.0 *****
|
||||
FIX: #19777 #20281
|
||||
FIX: bad position of extrafields for interventions
|
||||
FIX: Blocking situation when a payment was deleted in bank.
|
||||
FIX: creation of the shipment if order contains services
|
||||
FIX: Drag and drop line of files on join files tab
|
||||
FIX: Error management on mass action "Approve holiday"
|
||||
FIX: error with php8
|
||||
FIX: in case of VAT refund, negative amount must be allowed
|
||||
FIX: invoice pdf: lines originating from deposits were not detailed anymore
|
||||
FIX: Invoice - When you create an invoice for a given thirdparty, fk_account is not retrieved from company card
|
||||
FIX: list of visible type of event was not correctly filtered
|
||||
FIX: Missing or bad permissions
|
||||
FIX: Missing the field date start/end in export supplier invoice/order
|
||||
FIX: On large proposal or invoice, fix n(n+1) sql into a n sql.
|
||||
FIX: options should not exists on invoices
|
||||
FIX: payment not completed when using Paypal.
|
||||
FIX: permission to download files of expense report with readall.
|
||||
FIX- Preview icon in documents list PDF in the admin page third-party
|
||||
FIX: shipping list, e.shipping_method_id should be e.fk_shipping_method.
|
||||
FIX: Show product photo on Supplier order Cornas model.
|
||||
FIX: User name in ManufacturingOrder
|
||||
FIX: viewimage.php blocks requests with multicompany from other enties
|
||||
FIX: #yogosha9048
|
||||
FIX: #yogosha9054
|
||||
FIX: #yogosha9095
|
||||
|
||||
|
||||
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
||||
|
||||
For users:
|
||||
|
||||
@ -137,7 +137,8 @@ $dirtocompress = basename($fulldirtocompress);
|
||||
|
||||
if ($compression == 'zip') {
|
||||
$file .= '.zip';
|
||||
$excludefiles = '/(\.back|\.old|\.log|\.pdf_preview-.*\.png|[\/\\\]temp[\/\\\]|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i';
|
||||
|
||||
$excludefiles = '/(\.back|\.old|\.log|\.pdf_preview-.*\.png|[\/\\\]temp[\/\\\]|[\/\\\]admin[\/\\\]documents[\/\\\])/i';
|
||||
|
||||
//var_dump($fulldirtocompress);
|
||||
//var_dump($outputdir."/".$file);exit;
|
||||
|
||||
@ -81,8 +81,6 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'facturedet_rec' && $user->rights->facture->creer) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'ecm_files' && $user->rights->ecm->creer) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'emailcollector_emailcollectoraction' && $user->admin) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'bom_bomline' && $user->rights->bom->write) {
|
||||
@ -97,10 +95,18 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'facture_fourn_det_rec' && $user->rights->fournisseur->facture->creer) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'ecm_files' && $fk_element == 'fk_product' && (!empty($user->rights->produit->creer) || !empty($user->rights->service->creer))) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'ecm_files' && $fk_element == 'fk_ticket' && !empty($user->rights->ticket->write)) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'ecm_files') { // Used when of page "documents.php"
|
||||
if (!empty($user->rights->ecm->creer)) {
|
||||
$perm = 1;
|
||||
} elseif ($fk_element == 'fk_product' && (!empty($user->rights->produit->creer) || !empty($user->rights->service->creer))) {
|
||||
$perm = 1;
|
||||
} elseif ($fk_element == 'fk_ticket' && !empty($user->rights->ticket->write)) {
|
||||
$perm = 1;
|
||||
} elseif ($fk_element == 'fk_holiday' && !empty($user->rights->holiday->write)) {
|
||||
$perm = 1;
|
||||
} elseif ($fk_element == 'fk_soc' && !empty($user->rights->societe->creer)) {
|
||||
$perm = 1;
|
||||
}
|
||||
} elseif ($table_element_line == 'product_association' && $fk_element == 'fk_product' && (!empty($user->rights->produit->creer) || !empty($user->rights->service->creer))) {
|
||||
$perm = 1;
|
||||
} elseif ($table_element_line == 'projet_task' && $fk_element == 'fk_projet' && $user->rights->projet->creer) {
|
||||
|
||||
@ -6680,7 +6680,7 @@ class Form
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$retstring = '';
|
||||
$retstring = '<span class="nowraponall">';
|
||||
|
||||
$hourSelected = 0;
|
||||
$minSelected = 0;
|
||||
@ -6712,7 +6712,7 @@ class Form
|
||||
if ($typehour != 'text') {
|
||||
$retstring .= ' '.$langs->trans('HourShort');
|
||||
} else {
|
||||
$retstring .= '<span class="hideonsmartphone">:</span>';
|
||||
$retstring .= '<span class="">:</span>';
|
||||
}
|
||||
|
||||
// Minutes
|
||||
@ -6740,7 +6740,7 @@ class Form
|
||||
$retstring .= ' '.$langs->trans('MinuteShort');
|
||||
}
|
||||
|
||||
//$retstring.=" ";
|
||||
$retstring.="</span>";
|
||||
|
||||
if (!empty($nooutput)) {
|
||||
return $retstring;
|
||||
|
||||
@ -1283,12 +1283,22 @@ class FormFile
|
||||
}
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
if (!$disablemove) {
|
||||
if (empty($disablemove) && count($filearray) > 1) {
|
||||
print '<td></td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// Get list of files stored into database for same relative directory
|
||||
if ($relativedir) {
|
||||
completeFileArrayWithDatabaseInfo($filearray, $relativedir);
|
||||
|
||||
//var_dump($sortfield.' - '.$sortorder);
|
||||
if ($sortfield && $sortorder) { // If $sortfield is for example 'position_name', we will sort on the property 'position_name' (that is concat of position+name)
|
||||
$filearray = dol_sort_array($filearray, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre nodrag nodrop">';
|
||||
//print $url.' sortfield='.$sortfield.' sortorder='.$sortorder;
|
||||
print_liste_field_titre('Documents2', $url, "name", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||
@ -1301,21 +1311,11 @@ class FormFile
|
||||
print_liste_field_titre('');
|
||||
// Action button
|
||||
print_liste_field_titre('');
|
||||
if (!$disablemove) {
|
||||
if (empty($disablemove) && count($filearray) > 1) {
|
||||
print_liste_field_titre('');
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
// Get list of files stored into database for same relative directory
|
||||
if ($relativedir) {
|
||||
completeFileArrayWithDatabaseInfo($filearray, $relativedir);
|
||||
|
||||
//var_dump($sortfield.' - '.$sortorder);
|
||||
if ($sortfield && $sortorder) { // If $sortfield is for example 'position_name', we will sort on the property 'position_name' (that is concat of position+name)
|
||||
$filearray = dol_sort_array($filearray, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
|
||||
$nboffiles = count($filearray);
|
||||
if ($nboffiles > 0) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
@ -1510,18 +1510,18 @@ class FormFile
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
if (empty($disablemove)) {
|
||||
if (empty($disablemove) && count($filearray) > 1) {
|
||||
if ($nboffiles > 1 && $conf->browser->layout != 'phone') {
|
||||
print '<td class="linecolmove tdlineupdown center">';
|
||||
if ($i > 0) {
|
||||
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id.'">'.img_up('default', 0, 'imgupforline').'</a>';
|
||||
}
|
||||
if ($i < $nboffiles - 1) {
|
||||
if ($i < ($nboffiles - 1)) {
|
||||
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&rowid='.$line->id.'">'.img_down('default', 0, 'imgdownforline').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td'.(($conf->browser->layout != 'phone' && empty($disablemove)) ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'>';
|
||||
print '<td'.(($conf->browser->layout != 'phone') ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'>';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
@ -1531,7 +1531,7 @@ class FormFile
|
||||
print '<input type="submit" class="button button-save" name="renamefilesave" value="'.dol_escape_htmltag($langs->trans("Save")).'">';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">';
|
||||
print '</td>';
|
||||
if (empty($disablemove)) {
|
||||
if (empty($disablemove) && count($filearray) > 1) {
|
||||
print '<td class="right"></td>';
|
||||
}
|
||||
}
|
||||
@ -1542,7 +1542,7 @@ class FormFile
|
||||
}
|
||||
if ($nboffiles == 0) {
|
||||
$colspan = '6';
|
||||
if (empty($disablemove)) {
|
||||
if (empty($disablemove) && count($filearray) > 1) {
|
||||
$colspan++; // 6 columns or 7
|
||||
}
|
||||
print '<tr class="oddeven"><td colspan="'.$colspan.'">';
|
||||
@ -2032,7 +2032,7 @@ class FormFile
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].($param ? '?'.$param : '').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print '<table width="100%" class="liste noborder nobottom">';
|
||||
print '<table class="liste noborder nobottom centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Links"),
|
||||
@ -2117,7 +2117,7 @@ class FormFile
|
||||
print '<td class="right">';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=update&linkid='.$link->id.$param.'&token='.newToken().'" class="editfilelink editfielda reposition" >'.img_edit().'</a>'; // id= is included into $param
|
||||
if ($permissiontodelete) {
|
||||
print ' <a class="deletefilelink" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&linkid='.$link->id.$param.'">'.img_delete().'</a>'; // id= is included into $param
|
||||
print ' <a class="deletefilelink reposition" href="'.$_SERVER['PHP_SELF'].'?action=deletelink&token='.newToken().'&linkid='.((int) $link->id).$param.'">'.img_delete().'</a>'; // id= is included into $param
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
|
||||
@ -65,6 +65,7 @@ function SetCurrentFolder( resourceType, folderPath )
|
||||
|
||||
function OnSubmit()
|
||||
{
|
||||
console.log("Click on OnSubmit");
|
||||
if ( document.getElementById('NewFile').value.length == 0 )
|
||||
{
|
||||
alert( 'Please select a file from your computer' );
|
||||
@ -80,6 +81,8 @@ function OnSubmit()
|
||||
|
||||
function OnUploadCompleted( errorNumber, data )
|
||||
{
|
||||
console.log("errorNumber = "+errorNumber);
|
||||
|
||||
// Reset the Upload Worker Frame.
|
||||
window.parent.frames['frmUploadWorker'].location = 'javascript:void(0)' ;
|
||||
|
||||
@ -106,7 +109,7 @@ function OnUploadCompleted( errorNumber, data )
|
||||
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + data + '"' );
|
||||
break;
|
||||
case 202:
|
||||
alert( 'Invalid file' );
|
||||
alert( 'Invalid file (Bad extension)' );
|
||||
break;
|
||||
default:
|
||||
alert( 'Error on file upload. Error number: ' + errorNumber );
|
||||
|
||||
@ -203,12 +203,17 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
|
||||
$oFile = isset($_FILES['NewFile']) ? $_FILES['NewFile'] : $_FILES['upload'];
|
||||
|
||||
// $resourceType should be 'Image';
|
||||
$detectHtml = 0;
|
||||
|
||||
// Map the virtual path to the local server path.
|
||||
$sServerDir = ServerMapFolder($resourceType, $currentFolder, $sCommand);
|
||||
|
||||
// Get the uploaded file name.
|
||||
$sFileName = $oFile['name'];
|
||||
$sFileName = SanitizeFileName($sFileName);
|
||||
|
||||
//$sFileName = SanitizeFileName($sFileName);
|
||||
$sFileName = dol_sanitizeFileName($sFileName);
|
||||
|
||||
$sOriginalFileName = $sFileName;
|
||||
|
||||
@ -216,6 +221,8 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
$sExtension = substr($sFileName, (strrpos($sFileName, '.') + 1));
|
||||
$sExtension = strtolower($sExtension);
|
||||
|
||||
//var_dump($Config);
|
||||
/*
|
||||
if (isset($Config['SecureImageUploads'])) {
|
||||
if (($isImageValid = IsImageValid($oFile['tmp_name'], $sExtension)) === false) {
|
||||
$sErrorNumber = '202';
|
||||
@ -228,6 +235,14 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
$sErrorNumber = '202';
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
$isImageValid = image_format_supported($sFileName) > 0 ? true : false;
|
||||
if (!$isImageValid) {
|
||||
$sErrorNumber = '202';
|
||||
}
|
||||
|
||||
|
||||
// Check if it is an allowed extension.
|
||||
if (!$sErrorNumber && IsAllowedExt($sExtension, $resourceType)) {
|
||||
@ -241,7 +256,8 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
$sFileName = RemoveExtension($sOriginalFileName).'('.$iCounter.').'.$sExtension;
|
||||
$sErrorNumber = '201';
|
||||
} else {
|
||||
move_uploaded_file($oFile['tmp_name'], $sFilePath);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_move_uploaded_file($oFile['tmp_name'], $sFilePath, 0, 0);
|
||||
|
||||
if (is_file($sFilePath)) {
|
||||
if (isset($Config['ChmodOnUpload']) && !$Config['ChmodOnUpload']) {
|
||||
|
||||
@ -408,7 +408,8 @@ EOF;
|
||||
}
|
||||
|
||||
$rpl = array('\\' => '\\\\', '"' => '\\"');
|
||||
echo 'window.parent.OnUploadCompleted('.$errorNumber.',"'.strtr($fileUrl, $rpl).'","'.strtr($fileName, $rpl).'", "'.strtr($customMsg, $rpl).'");';
|
||||
echo 'console.log('.$errorNumber.');';
|
||||
echo 'window.parent.OnUploadCompleted('.$errorNumber.', "'.strtr($fileUrl, $rpl).'", "'.strtr($fileName, $rpl).'", "'.strtr($customMsg, $rpl).'");';
|
||||
echo '</script>';
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -22,11 +22,12 @@
|
||||
* This is the "File Uploader" for PHP.
|
||||
*/
|
||||
|
||||
require 'config.php';
|
||||
require 'config.php'; // This include the main.inc.php
|
||||
require 'util.php';
|
||||
require 'io.php';
|
||||
require 'commands.php';
|
||||
|
||||
|
||||
/**
|
||||
* SendError
|
||||
*
|
||||
@ -63,6 +64,7 @@ if (!IsAllowedType($sType)) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// @CHANGE
|
||||
//FileUpload( $sType, $sCurrentFolder, $sCommand )
|
||||
|
||||
|
||||
@ -1561,8 +1561,8 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
$disabledtask = 1;
|
||||
}
|
||||
|
||||
// Form to add new time
|
||||
print '<td class="nowrap leftborder center">';
|
||||
// Select hour
|
||||
print '<td class="nowraponall leftborder center minwidth150imp">';
|
||||
$tableCell = $form->selectDate($preselectedday, $lines[$i]->id, 1, 1, 2, "addtime", 0, 0, $disabledtask);
|
||||
print $tableCell;
|
||||
print '</td>';
|
||||
|
||||
@ -432,10 +432,12 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->MultiCell($this->posxlabel - $this->posxref, 3, $outputlangs->convToOutputCharset($ref), 0, 'L');
|
||||
// Workload
|
||||
$pdf->SetXY($this->posxworkload, $curY);
|
||||
$pdf->SetFont('', '', $default_font_size - 2); // We use a smaller font
|
||||
$pdf->MultiCell($this->posxprogress - $this->posxworkload, 3, $planned_workload ? $planned_workload : '', 0, 'R');
|
||||
// Progress
|
||||
$pdf->SetXY($this->posxprogress, $curY);
|
||||
$pdf->MultiCell($this->posxdatestart - $this->posxprogress, 3, $progress, 0, 'R');
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // We restore font
|
||||
|
||||
// Date start and end
|
||||
$pdf->SetXY($this->posxdatestart, $curY);
|
||||
@ -640,9 +642,11 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateStart")." : ".dol_print_date($object->date_start, 'day', false, $outputlangs, true), '', 'R');
|
||||
|
||||
$posy += 6;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateEnd")." : ".dol_print_date($object->date_end, 'day', false, $outputlangs, true), '', 'R');
|
||||
if ($object->date_end) {
|
||||
$posy += 6;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateEnd")." : ".dol_print_date($object->date_end, 'day', false, $outputlangs, true), '', 'R');
|
||||
}
|
||||
|
||||
if (is_object($object->thirdparty)) {
|
||||
$posy += 6;
|
||||
|
||||
@ -66,7 +66,7 @@ if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket
|
||||
* Confirm form to delete a file
|
||||
*/
|
||||
|
||||
if ($action == 'deletefile') {
|
||||
if ($action == 'deletefile' || $action == 'deletelink') {
|
||||
$langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles
|
||||
print $form->formconfirm(
|
||||
$_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")).'&linkid='.GETPOST('linkid', 'int').(empty($param) ? '' : $param),
|
||||
|
||||
@ -346,7 +346,7 @@ UseProductFournDesc=Add a feature to define the product description defined by t
|
||||
ProductSupplierDescription=Vendor description for the product
|
||||
UseProductSupplierPackaging=Use packaging on supplier prices (recalculate quantities according to packaging set on supplier price when adding/updating line in supplier documents)
|
||||
PackagingForThisProduct=Packaging
|
||||
PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity
|
||||
PackagingForThisProductDesc=You will automaticaly buy a multiple of this quantity. Can't be lower than the minimum purchase quantity
|
||||
QtyRecalculatedWithPackaging=The quantity of the line were recalculated according to supplier packaging
|
||||
|
||||
#Attributes
|
||||
|
||||
@ -349,7 +349,7 @@ $next_day = $next['mday'];
|
||||
|
||||
$title = $langs->trans("TimeSpent");
|
||||
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertoprocess, (empty($usertoprocess->id) ? 2 : 0), 1); // Return all project i have permission on. I want my tasks and some of my task may be on a public projet that is not my project
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertoprocess, (empty($usertoprocess->id) ? 2 : 0), 1); // Return all project i have permission on (assigned to me+public). I want my tasks and some of my task may be on a public projet that is not my project
|
||||
|
||||
if ($id) {
|
||||
$project->fetch($id);
|
||||
@ -476,12 +476,12 @@ if ($usertoprocess->id != $user->id) {
|
||||
$titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs));
|
||||
}
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
print img_picto('', 'projecttask');
|
||||
print img_picto('', 'projecttask', 'class="pictofixedwidth"');
|
||||
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid', 0, 'maxwidth150onsmartphone');
|
||||
print '<input type="submit" class="button valignmiddle" name="assigntask smallonsmartphone" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '<input type="submit" class="button valignmiddle smallonsmartphone" name="assigntask" value="'.dol_escape_htmltag($titleassigntask).'">';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
|
||||
@ -596,10 +596,10 @@ $extrafieldsobjectkey = 'projet_task';
|
||||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<th class="leftborder plannedworkload maxwidth100 right">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
print '<th class="leftborder plannedworkload minwidth75 maxwidth100 right" title="'.dol_escape_htmltag($langs->trans("PlannedWorkload")).'">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<th class="right maxwidth100">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
print '<th class="right minwidth75 maxwidth100 title="'.dol_escape_htmltag($langs->trans("ProgressDeclared")).'">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
@ -608,7 +608,7 @@ if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
print '<th class="right maxwidth75 maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
}
|
||||
print '<th class="center leftborder">'.$langs->trans("HourStart").'</td>';
|
||||
|
||||
|
||||
@ -119,6 +119,7 @@ $extrafields = new ExtraFields($db);
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Definition of fields for list
|
||||
$arrayfields = array();
|
||||
/*$arrayfields=array(
|
||||
// Project
|
||||
@ -441,7 +442,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
// Show navigation bar
|
||||
$nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n";
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("WeekShort")." ".$week." </span>\n";
|
||||
$nav .= ' <span id="month_name">'.dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("WeekShort")." ".$week." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
$nav .= ' <button type="submit" name="submitdateselect" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
@ -652,10 +653,10 @@ $extrafieldsobjectkey = 'projet_task';
|
||||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<th class="right leftborder plannedworkload maxwidth75 right">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
print '<th class="leftborder plannedworkload minwidth75 maxwidth100 right" title="'.dol_escape_htmltag($langs->trans("PlannedWorkload")).'">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<th class="maxwidth75 right">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
print '<th class="right minwidth75 maxwidth100" title="'.dol_escape_htmltag($langs->trans("ProgressDeclared")).'">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
@ -664,7 +665,7 @@ if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
print '<th class="right maxwidth75 maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
}
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
|
||||
@ -691,7 +692,7 @@ for ($idw = 0; $idw < 7; $idw++) {
|
||||
$cssonholiday .= 'onholidayafternoon ';
|
||||
}
|
||||
|
||||
print '<th width="6%" align="center" class="bold hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'">';
|
||||
print '<th width="6%" class="center bold hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'">';
|
||||
print dol_print_date($dayinloopfromfirstdaytoshow, '%a');
|
||||
print '<br>'.dol_print_date($dayinloopfromfirstdaytoshow, 'dayreduceformat').'</th>';
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ print '<br><br>';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Year").'</td>';
|
||||
print '<td class="right">'.$langs->trans("NbOfTasks").'</td>';
|
||||
print '</tr>';
|
||||
@ -191,14 +191,14 @@ foreach ($data_all_year as $val) {
|
||||
while ($year && $oldyear > $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '</tr>';
|
||||
$oldyear = $year;
|
||||
|
||||
@ -285,10 +285,11 @@ print '<div class="corps"> '."\n";
|
||||
|
||||
// show title of survey
|
||||
$titre = str_replace("\\", "", $object->title);
|
||||
print '<strong>'.dol_htmlentities($titre).'</strong><br><br>'."\n";
|
||||
print '<strong>'.dol_htmlentities($titre).'</strong>';
|
||||
|
||||
// show description of survey
|
||||
if ($object->description) {
|
||||
print '<br><br>'."\n";
|
||||
print dol_htmlentitiesbr($object->description);
|
||||
print '<br>'."\n";
|
||||
}
|
||||
|
||||
@ -168,6 +168,10 @@ table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td.
|
||||
.liste_titre input[name=search_day_date_when], .liste_titre input[name=search_month_date_when], .liste_titre input[name=search_year_date_when],
|
||||
.liste_titre input[name=search_dtstartday], .liste_titre input[name=search_dtendday], .liste_titre input[name=search_dtstartmonth], .liste_titre input[name=search_dtendmonth],
|
||||
*/
|
||||
.liste_titre input[name=search_month] {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth,
|
||||
input, input.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||
border: none;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user