diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index 4afc10f2e88..12159f29433 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -1454,6 +1454,38 @@ class Fichinter extends CommonObject
return -1;
}
}
+
+ /**
+ * Return clicable link of object (with eventually picto)
+ *
+ * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+ * @return string HTML Code for Kanban thumb.
+ */
+ public function getKanbanView($option = '')
+ {
+ global $langs;
+ $return = '
';
+ print '';
}
- print '
';
- }
- if (!empty($arrayfields['f.ref']['checked'])) {
- print "";
- print '';
+ print '';
+ // Picto + Ref
+ print '';
+ print $objectstatic->getNomUrl(1);
+ print ' ';
+ // Warning
+ $warnornote = '';
+ //if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->fichinter->warning_delay)) $warnornote.=img_warning($langs->trans("Late"));
+ if (!empty($obj->note_private)) {
+ $warnornote .= ($warnornote ? ' ' : '');
+ $warnornote .= '';
+ $warnornote .= ''.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').' ';
+ $warnornote .= ' ';
+ }
+ if ($warnornote) {
+ print '';
+ print $warnornote;
+ print ' ';
+ }
- print "\n";
- if (!$i) {
- $totalarray['nbfield']++;
+ // Other picto tool
+ print '';
+ $filename = dol_sanitizeFileName($obj->ref);
+ $filedir = $conf->ficheinter->dir_output.'/'.dol_sanitizeFileName($obj->ref);
+ $urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
+ print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
+ print '
';
+
+ print " \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- if (!empty($arrayfields['f.ref_client']['checked'])) {
- // Customer ref
- print '';
- print dol_escape_htmltag($obj->ref_client);
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
+ if (!empty($arrayfields['f.ref_client']['checked'])) {
+ // Customer ref
+ print '';
+ print dol_escape_htmltag($obj->ref_client);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- if (!empty($arrayfields['s.nom']['checked'])) {
- print '';
- print $companystatic->getNomUrl(1, '', 44);
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
+ if (!empty($arrayfields['s.nom']['checked'])) {
+ print '';
+ print $companystatic->getNomUrl(1, '', 44);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- if (!empty($arrayfields['pr.ref']['checked'])) {
- print '';
- $projetstatic->id = $obj->projet_id;
- $projetstatic->ref = $obj->projet_ref;
- $projetstatic->title = $obj->projet_title;
- if ($projetstatic->id > 0) {
- print $projetstatic->getNomUrl(1, '');
+ if (!empty($arrayfields['pr.ref']['checked'])) {
+ print ' ';
+ $projetstatic->id = $obj->projet_id;
+ $projetstatic->ref = $obj->projet_ref;
+ $projetstatic->title = $obj->projet_title;
+ if ($projetstatic->id > 0) {
+ print $projetstatic->getNomUrl(1, '');
+ }
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- print '';
- if (!$i) {
- $totalarray['nbfield']++;
+ if (!empty($arrayfields['c.ref']['checked'])) {
+ print '';
+ $contratstatic->id = $obj->contrat_id;
+ $contratstatic->ref = $obj->contrat_ref;
+ $contratstatic->ref_customer = $obj->contrat_ref_customer;
+ $contratstatic->ref_supplier = $obj->contrat_ref_supplier;
+ if ($contratstatic->id > 0) {
+ print $contratstatic->getNomUrl(1, '');
+ print ' ';
+ }
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- if (!empty($arrayfields['c.ref']['checked'])) {
- print '';
- $contratstatic->id = $obj->contrat_id;
- $contratstatic->ref = $obj->contrat_ref;
- $contratstatic->ref_customer = $obj->contrat_ref_customer;
- $contratstatic->ref_supplier = $obj->contrat_ref_supplier;
- if ($contratstatic->id > 0) {
- print $contratstatic->getNomUrl(1, '');
+ if (!empty($arrayfields['f.description']['checked'])) {
+ print ' '.dol_trunc(dolGetFirstLineOfText(dol_string_nohtmltag($obj->description, 1)), 48).' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Extra fields
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
+ // Fields from hook
+ $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
+ $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
+ // Date creation
+ if (!empty($arrayfields['f.datec']['checked'])) {
+ print '';
+ print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Date modification
+ if (!empty($arrayfields['f.tms']['checked'])) {
+ print '';
+ print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Note public
+ if (!empty($arrayfields['f.note_public']['checked'])) {
+ print '';
+ print dol_string_nohtmltag($obj->note_public);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Note private
+ if (!empty($arrayfields['f.note_private']['checked'])) {
+ print '';
+ print dol_string_nohtmltag($obj->note_private);
+ print ' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Status
+ if (!empty($arrayfields['f.fk_statut']['checked'])) {
+ print ''.$objectstatic->getLibStatut(5).' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ // Fields of detail of line
+ if (!empty($arrayfields['fd.description']['checked'])) {
+ print ''.dol_trunc(dolGetFirstLineOfText(dol_string_nohtmltag($obj->descriptiondetail, 1)), 48).' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ if (!empty($arrayfields['fd.date']['checked'])) {
+ print ''.dol_print_date($db->jdate($obj->dp), 'dayhour')." \n";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+ if (!empty($arrayfields['fd.duree']['checked'])) {
+ print ''.convertSecondToTime($obj->duree, 'allhourmin').' ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['type'][$totalarray['nbfield']] = 'duration';
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'fd.duree';
+ }
+ $totalarray['val']['fd.duree'] += $obj->duree;
+ }
+ // 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)) {
+ $selected = 1;
+ }
+ print ' ';
+ }
print ' ';
}
if (!$i) {
$totalarray['nbfield']++;
}
- }
- if (!empty($arrayfields['f.description']['checked'])) {
- print ''.dol_trunc(dolGetFirstLineOfText(dol_string_nohtmltag($obj->description, 1)), 48).' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Extra fields
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
- // Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
- $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
- print $hookmanager->resPrint;
- // Date creation
- if (!empty($arrayfields['f.datec']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Date modification
- if (!empty($arrayfields['f.tms']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Note public
- if (!empty($arrayfields['f.note_public']['checked'])) {
- print '';
- print dol_string_nohtmltag($obj->note_public);
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Note private
- if (!empty($arrayfields['f.note_private']['checked'])) {
- print '';
- print dol_string_nohtmltag($obj->note_private);
- print ' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Status
- if (!empty($arrayfields['f.fk_statut']['checked'])) {
- print ''.$objectstatic->getLibStatut(5).' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- // Fields of detail of line
- if (!empty($arrayfields['fd.description']['checked'])) {
- print ''.dol_trunc(dolGetFirstLineOfText(dol_string_nohtmltag($obj->descriptiondetail, 1)), 48).' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- if (!empty($arrayfields['fd.date']['checked'])) {
- print ''.dol_print_date($db->jdate($obj->dp), 'dayhour')." \n";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
- if (!empty($arrayfields['fd.duree']['checked'])) {
- print ''.convertSecondToTime($obj->duree, 'allhourmin').' ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- if (!$i) {
- $totalarray['type'][$totalarray['nbfield']] = 'duration';
- }
- if (!$i) {
- $totalarray['pos'][$totalarray['nbfield']] = 'fd.duree';
- }
- $totalarray['val']['fd.duree'] += $obj->duree;
- }
- // 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)) {
- $selected = 1;
- }
- print ' ';
- }
- print ' ';
- }
- if (!$i) {
- $totalarray['nbfield']++;
- }
+ print ' '."\n";
- print ''."\n";
-
- $total += $obj->duree;
+ $total += $obj->duree;
+ }
$i++;
}