';
// Action column
- if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
@@ -671,6 +686,9 @@ while ($i < $imaxinloop) {
print '';
}
print '
';
if ($key == 'status') {
@@ -737,6 +755,8 @@ while ($i < $imaxinloop) {
$labellang = ($object->lang ? $langs->trans('Language_'.$object->lang) : '');
print picto_from_langcode($object->lang, 'class="paddingrightonly saturatemedium opacitylow"');
print $labellang;
+ } elseif ($key == 'question') {
+ print dolGetFirstLineOfText($object->$key);
} else {
print $object->showOutputField($val, $key, $object->$key, '');
}
@@ -762,10 +782,10 @@ while ($i < $imaxinloop) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
- $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
+ $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
- if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
@@ -775,9 +795,9 @@ while ($i < $imaxinloop) {
print '';
}
print '
';
- }
- if (!$i) {
- $totalarray['nbfield']++;
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
print '
'."\n";
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 488601d2831..52c4731f6a2 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -388,7 +388,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
dol_print_error($db);
}
- if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
+ if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
$page = 0;
$offset = 0;
}
@@ -668,9 +668,6 @@ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
}
print ''."\n";
-$totalarray = array();
-$totalarray['nbfield'] = 0;
-
// Detect if we need a fetch on each output line
$needToFetchEachLine = 0;
if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index c0e79c4b054..c9a811ad245 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -2398,7 +2398,7 @@ class Project extends CommonObject
}
$return .= '';
if (property_exists($this, 'date_start') && $this->date_start) {
- $return .= ' '.dol_print_date($this->date_start, 'day').'>';
+ $return .= ' '.dol_print_date($this->date_start, 'day').'>';
}
if (property_exists($this, 'date_end') && $this->date_end) {
if ($this->date_start) {
@@ -2406,7 +2406,7 @@ class Project extends CommonObject
} else {
$return .= ' ';
}
- $return .= ''.dol_print_date($this->date_end, 'day').'>';
+ $return .= ''.dol_print_date($this->date_end, 'day').'>';
}
/*if (property_exists($this, 'user_author_id')) {
$return .= ' '.$langs->trans("Author").'';
@@ -2414,12 +2414,12 @@ class Project extends CommonObject
}*/
if ($this->usage_opportunity && $this->opp_status_code) {
//$return .= ' '.$langs->trans("OpportunityStatusShort").'';
- $return .= ' '. $langs->trans("OppStatus".$this->opp_status_code);
+ $return .= ' '. $langs->trans("OppStatus".$this->opp_status_code);
$return .= ' ('.round($this->opp_percent).'%)';
- $return .= '>';
+ $return .= ' '.price($this->opp_amount).'';
}
if (method_exists($this, 'getLibStatut')) {
- $return .= '
';
@@ -922,23 +928,26 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
-$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
+$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
- print '
';
}
} else {
// Show here line of result
- print '
';
+ $j = 0;
+ print '
';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
+ if (in_array($object->id, $arrayofselected)) {
$selected = 1;
}
- print '';
+ print '';
}
print '
';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
foreach ($object->fields as $key => $val) {
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
@@ -1178,17 +1183,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
- $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
+ $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '
';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
+ if (in_array($object->id, $arrayofselected)) {
$selected = 1;
}
- print '';
+ print '';
}
print '