diff --git a/build/debian/README.howto b/build/debian/README.howto index 86b2acababba2860c0d8520071673589be466a0c..cd7cd93c24e44580faabe638bffb3c4c89f1ebe5 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -333,7 +333,7 @@ To update dolibarr debian package when only files into debian has changed: To update dolibarr debian package when only files not into debian has changed: * Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch" -* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revien a l'état du upstream sans les patch. +* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch. Once files has been prepared, it's time to test: @@ -350,7 +350,7 @@ Note: Package is built into directory ../build-area Note: To compare 2 packages: debdiff package1.dsc package2.dsc * Test package (see dedicated chapter to test it with debian unstable env) -> cp ../build-area/* /srv/chroot/unstable/tmp +> sudo rm /srv/chroot/unstable/tmp/* >/dev/null 2>&1; cp ../build-area/* /srv/chroot/unstable/tmp See rest of process into dedicated chapter "To test a package" to test it with debian unstable env * If package .deb is ok: diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d52edaa14d93de0ef37290baf2ff3065981dbb52..d38270b88273e53e5fddfdef5a67c9967ffd4950 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 21d1f576ad25060fe743e9d7063c149c9be74b26..419b32cdea47410163e71765bdaca3de0140928a 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -514,7 +514,7 @@ class ActionComm extends CommonObject $sql.= " a.fk_contact, a.percent as percentage,"; $sql.= " a.fk_element, a.elementtype,"; $sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,"; - $sql.= " c.id as type_id, c.code as type_code, c.libelle, c.color as type_color,"; + $sql.= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,"; $sql.= " s.nom as socname,"; $sql.= " u.firstname, u.lastname as lastname"; $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a "; @@ -535,17 +535,18 @@ class ActionComm extends CommonObject { $obj = $this->db->fetch_object($resql); - $this->id = $obj->id; - $this->ref = $obj->ref; - $this->ref_ext = $obj->ref_ext; + $this->id = $obj->id; + $this->ref = $obj->ref; + $this->ref_ext = $obj->ref_ext; - // Properties of parent table llx_c_actioncomm (will be deprecated in future) - $this->type_id = $obj->type_id; - $this->type_code = $obj->type_code; + // Properties of parent table llx_c_actioncomm + $this->type_id = $obj->type_id; + $this->type_code = $obj->type_code; $this->type_color = $obj->type_color; + $this->type_picto = $obj->type_picto; $transcode=$langs->trans("Action".$obj->type_code); - $type_libelle=($transcode!="Action".$obj->type_code?$transcode:$obj->libelle); - $this->type = $type_libelle; + $type_label=($transcode!="Action".$obj->type_code?$transcode:$obj->type_label); + $this->type = $type_label; $this->code = $obj->code; $this->label = $obj->label; @@ -1018,7 +1019,7 @@ class ActionComm extends CommonObject */ function getLibStatut($mode,$hidenastatus=0) { - return $this->LibStatut($this->percentage,$mode,$hidenastatus); + return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep); } /** @@ -1027,9 +1028,10 @@ class ActionComm extends CommonObject * @param int $percent Percent * @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Picto+Long label, 7=Very short label+Picto * @param int $hidenastatus 1=Show nothing if status is "Not applicable" + * @param int $datestart Date start of event * @return string Label */ - function LibStatut($percent,$mode,$hidenastatus=0) + function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') { global $langs; diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 5e14b45665b586e90bc7160c66d1cae5f41051e0..237a1043ac61e9198725ddeb5e35a04bdde0cab0 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -35,9 +35,11 @@ class CActionComm var $code; var $type; - var $libelle; + var $libelle; // deprecated + var $label; var $active; var $color; + var $picto; var $type_actions=array(); @@ -60,7 +62,7 @@ class CActionComm */ function fetch($id) { - $sql = "SELECT id, code, type, libelle, color, active"; + $sql = "SELECT id, code, type, libelle as label, color, active, picto"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; if (is_numeric($id)) $sql.= " WHERE id=".$id; else $sql.= " WHERE code='".$id."'"; @@ -76,7 +78,8 @@ class CActionComm $this->id = $obj->id; $this->code = $obj->code; $this->type = $obj->type; - $this->libelle = $obj->libelle; + $this->libelle = $obj->label; // deprecated + $this->label = $obj->label; $this->active = $obj->active; $this->color = $obj->color; @@ -114,7 +117,7 @@ class CActionComm $repid = array(); $repcode = array(); - $sql = "SELECT id, code, libelle, module, type, color"; + $sql = "SELECT id, code, libelle as label, module, type, color, picto"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; $sql.= " WHERE 1=1"; if ($active != '') $sql.=" AND active=".$active; @@ -155,8 +158,8 @@ class CActionComm if ($onlyautoornot && $code == 'AC_OTH') $code='AC_MANUAL'; if ($onlyautoornot && $code == 'AC_OTH_AUTO') $code='AC_AUTO'; $transcode=$langs->trans("Action".$code); - $repid[$obj->id] = ($transcode!="Action".$code?$transcode:$langs->trans($obj->libelle)); - $repcode[$obj->code] = ($transcode!="Action".$code?$transcode:$langs->trans($obj->libelle)); + $repid[$obj->id] = ($transcode!="Action".$code?$transcode:$langs->trans($obj->label)); + $repcode[$obj->code] = ($transcode!="Action".$code?$transcode:$langs->trans($obj->label)); if ($onlyautoornot && preg_match('/^module/',$obj->type) && $obj->module) $repcode[$obj->code].=' ('.$langs->trans("Module").': '.$obj->module.')'; } $i++; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 63a28c9f480793e3d9778d6fe45c6fa5917dc33d..ec4fba1298082a4687a83d4d369df75146d9d212 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -318,7 +318,8 @@ if ($resql) print '<tr class="liste_titre">'; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"a.id",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder); - if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle",$param,"","",$sortfield,$sortorder); + //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"a.datep",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"a.datep2",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder); @@ -331,11 +332,11 @@ if ($resql) print '<tr class="liste_titre">'; print '<td class="liste_titre"></td>'; print '<td class="liste_titre"><input type="text" name="search_title" value="'.$search_title.'"></td>'; - if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { + //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + //{ print '<td class="liste_titre"></td>'; //print '<td class="liste_titre"><input type="text" name="search_type" value="'.$search_type.'"></td>'; - } + //} print '<td class="liste_titre" align="center">'; print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print '</td>'; @@ -380,6 +381,7 @@ if ($resql) $actionstatic->ref=$obj->id; $actionstatic->type_code=$obj->type_code; $actionstatic->type_label=$obj->type_label; + $actionstatic->type_picto=$obj->type_picto; $actionstatic->label=$obj->label; print "<tr ".$bc[$var].">"; @@ -394,12 +396,22 @@ if ($resql) print $actionstatic->label; print '</td>'; + // Type + print '<td>'; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - $labeltype=$obj->type_code; - if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype]; - print '<td>'.dol_trunc($labeltype,28).'</td>'; + if ($actionstatic->type_picto) print img_picto('', $actionstatic->type_picto); + else { + if ($actionstatic->type_code == 'AC_TEL') print img_picto('', 'object_phoning').' '; + if ($actionstatic->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax').' '; + if ($actionstatic->type_code == 'AC_EMAIL') print img_picto('', 'object_email').' '; + } } + $labeltype=$obj->type_code; + if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype='AC_OTH'; + if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype]; + print dol_trunc($labeltype,28); + print '</td>'; // Start date print '<td align="center" class="nowrap">'; @@ -455,7 +467,8 @@ if ($resql) print '</td>'; // Status/Percent - print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,3).'</td>'; + $datep=$db->jdate($obj->datep); + print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,3,1,$datep).'</td>'; print '<td></td>'; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 23a4cd67d378fbb172837156eb2c52923a49a2e9..5cc7fcedf4df988f63c5533bf2bab47e429c0f7b 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -279,11 +279,13 @@ if ($socid > 0) print '<br>'; print load_fiche_titre($langs->trans("NewGlobalDiscount"),'',''); + + print '<div class="underbanner clearboth"></div>'; print '<table class="border" width="100%">'; - print '<tr><td width="38%" class="fieldrequired">'.$langs->trans("AmountHT").'</td>'; + print '<tr><td class="titlefield fieldrequired">'.$langs->trans("AmountHT").'</td>'; print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">'; print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>'; - print '<tr><td width="38%">'.$langs->trans("VAT").'</td>'; + print '<tr><td>'.$langs->trans("VAT").'</td>'; print '<td>'; print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object); print '</td></tr>'; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index ba9aa961002e0a7399e52f5552b1773426c9330a..503c1fbb739c52fa3adc55f6d33f6cf6e4b2de2a 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -62,7 +62,7 @@ class FormActions $listofstatus = array( '-1' => $langs->trans("ActionNotApplicable"), - '0' => $langs->trans("ActionRunningNotStarted"), + '0' => $langs->trans("ActionsToDoShort"), '50' => $langs->trans("ActionRunningShort"), '100' => $langs->trans("ActionDoneShort") ); @@ -100,7 +100,7 @@ class FormActions } else if (defaultvalue == 0) { percentage.val(0); - percentage.prop('disabled', true); + percentage.removeAttr('disabled'); /* Not disabled, we want to change it to higher value */ $('.hideifna').show(); } else if (defaultvalue == 100) { diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index f1c56f53a2fa189d66fe0632c0a1b1de4752b3d5..8c73889499859d7a96f5afc0a2823c0cec477545 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -947,7 +947,7 @@ function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$ac } /** - * Show html area with actions done + * Show html area with actions (done or not, ignore the name of function) * * @param Conf $conf Object conf * @param Translate $langs Object langs @@ -958,14 +958,18 @@ function show_actions_todo($conf,$langs,$db,$filterobj,$objcon='',$noprint=0,$ac * @param string $actioncode Filter on actioncode * @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter. * @param array $filters Filter on other fields + * @param string $sortfield Sort field + * @param string $sortorder Sort order * @return mixed Return html part or void if noprint is 1 * TODO change function to be able to list event linked to an object. */ -function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=0, $actioncode='', $donetodo='done', $filters=array()) +function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep, a.id', $sortorder='DESC') { global $bc,$user,$conf; global $form; + global $param; + // Check parameters if (! is_object($filterobj)) dol_print_error('','BadParameter'); @@ -983,7 +987,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= $sql.= " a.note, a.percent,"; $sql.= " a.fk_element, a.elementtype,"; $sql.= " a.fk_user_author, a.fk_contact,"; - $sql.= " c.code as acode, c.libelle,"; + $sql.= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; $sql.= " u.login, u.rowid as user_id"; if (get_class($filterobj) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; if (get_class($filterobj) == 'Adherent') $sql.= ", m.lastname, m.firstname"; @@ -1002,7 +1006,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; if ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']); - $sql.= " ORDER BY a.datep DESC, a.id DESC"; + $sql.= $db->order($sortfield, $sortorder); dol_syslog("company.lib::show_actions_done", LOG_DEBUG); $resql=$db->query($sql); @@ -1028,15 +1032,18 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= 'dateend'=>$db->jdate($obj->dp2), 'note'=>$obj->label, 'percent'=>$obj->percent, - 'acode'=>$obj->acode, - 'libelle'=>$obj->libelle, - 'userid'=>$obj->user_id, + 'userid'=>$obj->user_id, 'login'=>$obj->login, 'contact_id'=>$obj->fk_contact, 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'fk_element'=>$obj->fk_element, - 'elementtype'=>$obj->elementtype + 'elementtype'=>$obj->elementtype, + // Type of event + 'acode'=>$obj->acode, + 'alabel'=>$obj->alabel, + 'libelle'=>$obj->alabel, // deprecated + 'apicto'=>$obj->apicto ); $numaction++; @@ -1049,11 +1056,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= } } + // Add also event from emailings. FIXME This should be replaced by an automatic event if (! empty($conf->mailing->enabled) && ! empty($objcon->email)) { $langs->load("mails"); - // Add also event from emailings. TODO This should be replaced by an automatic event $sql = "SELECT m.rowid as id, mc.date_envoi as da, m.titre as note, '100' as percentage,"; $sql.= " 'AC_EMAILING' as acode,"; $sql.= " u.rowid as user_id, u.login"; // User that valid action @@ -1104,7 +1111,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - $actionstatic=new ActionComm($db); + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + + $formactions=new FormActions($db); + + $actionstatic=new ActionComm($db); $userstatic=new User($db); $contactstatic = new Contact($db); @@ -1128,14 +1139,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= if (get_class($filterobj) == 'Societe') $out.='</a>'; $out.='</td>'; } - $out.='<td>'.$langs->trans("Ref").'</td>'; + $out.=getTitleFieldOfList($langs->trans("Ref"), 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder); $out.='<td>'.$langs->trans("Label").'</td>'; - $out.='<td>'.$langs->trans("Date").'</td>'; + $out.=getTitleFieldOfList($langs->trans("Date"), 0, $_SERVER["PHP_SELF"], 'a.datep, a.id', '', $param, '', $sortfield, $sortorder); $out.='<td>'.$langs->trans("Type").'</td>'; $out.='<td></td>'; $out.='<td></td>'; - $out.='<td>'.$langs->trans("By").'</td>'; - $out.='<td align="center">'.$langs->trans("Status").'</td>'; + $out.='<td>'.$langs->trans("Owner").'</td>'; + $out.=getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder); $out.='<td align="center"></td>'; $out.='</tr>'; @@ -1149,11 +1160,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= $out.='<td><input type="text" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>'; $out.='<td></td>'; $out.='<td>'; - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; - $formactions=new FormActions($db); - $out.=$formactions->select_type_actions($actioncode, "actioncode", '', 0, 0, 0, 1); - } + $out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0, 0, 0, 1); $out.='</td>'; $out.='<td></td>'; $out.='<td></td>'; @@ -1169,11 +1176,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= foreach ($histo as $key=>$value) { $var=!$var; - $actionstatic->fetch($histo[$key]['id']); + $actionstatic->fetch($histo[$key]['id']); // TODO Do we need this, we already have a lot of data of line into $histo $out.="<tr ".$bc[$var].">"; - // done or todo + // Done or todo if ($donetodo) { $out.='<td class="nowrap">'; @@ -1191,7 +1198,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= { $actionstatic->type_code=$histo[$key]['acode']; $transcode=$langs->trans("Action".$histo[$key]['acode']); - $libelle=($transcode!="Action".$histo[$key]['acode']?$transcode:$histo[$key]['libelle']); + $libelle=($transcode!="Action".$histo[$key]['acode']?$transcode:$histo[$key]['alabel']); //$actionstatic->libelle=$libelle; $libelle=$histo[$key]['note']; $actionstatic->id=$histo[$key]['id']; @@ -1218,7 +1225,17 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= } $out.="</td>\n"; + // Type $out.='<td>'; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($histo[$key]['apicto']) $out.=img_picto('', $histo[$key]['apicto']); + else { + if ($histo[$key]['acode'] == 'AC_TEL') $out.=img_picto('', 'object_phoning').' '; + if ($histo[$key]['acode'] == 'AC_FAX') $out.=img_picto('', 'object_phoning_fax').' '; + if ($histo[$key]['acode'] == 'AC_EMAIL') $out.=img_picto('', 'object_email').' '; + } + } $out.=$actionstatic->type; $out.='</td>'; @@ -1292,7 +1309,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= $out.='</td>'; // Statut - $out.='<td class="nowrap" align="center">'.$actionstatic->LibStatut($histo[$key]['percent'],3).'</td>'; + $out.='<td class="nowrap" align="center">'.$actionstatic->LibStatut($histo[$key]['percent'],3,1,$histo[$key]['datestart']).'</td>'; // Actions $out.='<td></td>'; diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 6d70916d0209b00c255a6ba070f71ee2e2006855..2e8ce9e5db23d6994b4ed39314e9fe0baaa4dd14 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -29,6 +29,7 @@ ALTER TABLE llx_product_lot MODIFY COLUMN entity integer DEFAULT 1; UPDATE llx_product_lot SET entity = 1 WHERE entity IS NULL; +ALTER TABLE llx_c_actioncomm ADD COLUMN picto varchar(48); ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_code_ventilation (fk_code_ventilation); ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_code_ventilation (fk_code_ventilation); diff --git a/htdocs/install/mysql/tables/llx_c_actioncomm.sql b/htdocs/install/mysql/tables/llx_c_actioncomm.sql index 9d83cec1acfb615e7277ce417687e6c87847e28e..d29cd2f8df30605e36cc6fa9778aa4af1f8500bb 100644 --- a/htdocs/install/mysql/tables/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_c_actioncomm.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> --- Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro> +-- Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> +-- Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -26,7 +26,8 @@ create table llx_c_actioncomm libelle varchar(48) NOT NULL, module varchar(16) DEFAULT NULL, active tinyint DEFAULT 1 NOT NULL, - todo tinyint, + todo tinyint, -- deprecated color varchar(9), + picto varchar(48), position integer NOT NULL DEFAULT 0 )ENGINE=innodb; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index e65b6d1aa2e297f08a927f6affff201b63d7103b..ebd0a55e94cf5cf1df9733b0546aada513128c80 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -379,7 +379,7 @@ ActionsToDoShort=To do ActionsDoneShort=Done ActionNotApplicable=Not applicable ActionRunningNotStarted=To start -ActionRunningShort=Started +ActionRunningShort=In progress ActionDoneShort=Finished ActionUncomplete=Uncomplete CompanyFoundation=Company/Foundation diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 5cedf2fdfaa7c413cd50f7d35cce5e809afda006..f4c8f5c6dbcd1e26468beb964f988cbb3ae3e013 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -50,6 +50,17 @@ $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe', $socid, '&societe'); +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if ($page == -1) { $page = 0; } +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortfield) $sortfield='a.datep, a.id'; +if (! $sortorder) $sortorder='DESC'; + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('agendathirdparty')); @@ -106,37 +117,7 @@ if ($socid) print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border centpercent">'; - - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; - } - - if ($object->client) - { - print '<tr><td class="titlefield">'; - print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; - if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; - print '</td></tr>'; - } - - if ($object->fournisseur) - { - print '<tr><td class="titlefield">'; - print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; - if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - print '</td></tr>'; - } - - print '</table>'; - - //print '<br>'; - - //print '<div class="underbanner clearboth"></div>'; - + $object->info($socid); print dol_print_object_info($object, 1); @@ -182,6 +163,11 @@ if ($socid) if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) { + $param='&socid='.$socid; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + + print load_fiche_titre($langs->trans("ActionsOnCompany"),'',''); // List of todo actions @@ -193,7 +179,9 @@ if ($socid) // List of all actions $filters=array(); $filters['search_agenda_label']=$search_agenda_label; - show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters); + + // TODO Replace this with smae code then into listactions.php + show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder); } } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 711bd807bd32bebb902fa4edc1267c34f186f805..ae45643c9cb36ab635ea67bd5f9d3490dcd8a486 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -334,6 +334,7 @@ input.removedfile { textarea:disabled { background:#ddd; } +input[type=file ] { background-color: transparent; border-top: none; border-left: none; border-right: none; box-shadow: none; } input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; } input[type=radio] { background-color: transparent; border: none; box-shadow: none; } input[type=image] { background-color: transparent; border: none; box-shadow: none; } @@ -343,8 +344,9 @@ input:-webkit-autofill { -webkit-box-shadow: 0 0 0 50px <?php echo empty($dol_use_jmobile)?'#FBFFEA':'#FFFFFF' ?> inset; } ::-webkit-input-placeholder { color:#ccc; } -::-moz-placeholder { color:#ccc; } /* firefox 19+ */ -:-ms-input-placeholder { color:#ccc; } /* ie */ +:-moz-placeholder { color:#bbb; } /* firefox 18- */ +::-moz-placeholder { color:#bbb; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ input:-moz-placeholder { color:#ccc; } <?php if (! empty($dol_use_jmobile)) { ?> diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index fc4fded0d01b23b3779492b8da3aa58b33fbc112..3922fbf4bef7a8c00dc29e4c99ac94bc282dd20e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -341,8 +341,9 @@ input:-webkit-autofill { -webkit-box-shadow: 0 0 0 50px <?php echo empty($dol_use_jmobile)?'#FBFFEA':'#FFFFFF' ?> inset; } ::-webkit-input-placeholder { color:#ccc; } -::-moz-placeholder { color:#ccc; } /* firefox 19+ */ -:-ms-input-placeholder { color:#ccc; } /* ie */ +:-moz-placeholder { color:#bbb; } /* firefox 18- */ +::-moz-placeholder { color:#bbb; } /* firefox 19+ */ +:-ms-input-placeholder { color:#ccc; } /* ie */ input:-moz-placeholder { color:#ccc; } <?php if (! empty($dol_use_jmobile)) { ?>