Look and feel v21 enhancement on smartphone

This commit is contained in:
Laurent Destailleur
2024-09-25 02:35:56 +02:00
parent 3383f12a06
commit ae6e35cc84
17 changed files with 110 additions and 30 deletions

View File

@@ -13941,15 +13941,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
$sql .= ", sp.lastname, sp.firstname";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') {
$sql .= ", m.lastname, m.firstname";
} elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Product') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') {
$sql .= ", o.ref";
} elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') {
} elseif (is_object($filterobj) && in_array(get_class($filterobj), array('Commande', 'CommandeFournisseur', 'Product', 'Ticket', 'BOM', 'Contrat', 'Facture', 'FactureFournisseur'))) {
$sql .= ", o.ref";
}
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
@@ -14000,6 +13992,11 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
if ($filterobj->id) {
$sql .= " AND a.fk_element = ".((int) $filterobj->id);
}
} elseif (is_object($filterobj) && get_class($filterobj) == 'Commande') {
$sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order'";
if ($filterobj->id) {
$sql .= " AND a.fk_element = ".((int) $filterobj->id);
}
} elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') {
$sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'";
if ($filterobj->id) {
@@ -14031,9 +14028,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
$sql .= " AND a.fk_contact = ".((int) $filterobj->id);
}
} elseif (is_object($filterobj) && get_class($filterobj) == 'Facture') {
$sql .= "AND a.fk_element = o.rowid";
$sql .= " AND a.fk_element = o.rowid";
if ($filterobj->id) {
$sql .= " AND a.fk_element = ".((int) $filterobj->id);
$sql .= " AND a.fk_element = ".((int) $filterobj->id)." AND a.elementtype = 'invoice'";
}
} elseif (is_object($filterobj) && get_class($filterobj) == 'FactureFournisseur') {
$sql .= " AND a.fk_element = o.rowid";
if ($filterobj->id) {
$sql .= " AND a.fk_element = ".((int) $filterobj->id)." AND a.elementtype = 'invoice_supplier'";
}
}
} else {
@@ -14041,7 +14043,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
}
// Condition on actioncode
if (!empty($actioncode)) {
if (!empty($actioncode) && $actioncode != '-1') {
if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
if ($actioncode == 'AC_NON_AUTO') {
$sql .= " AND c.type != 'systemauto'";
@@ -14258,14 +14260,13 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
$out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n";
$out .= '<th class="liste_titre"><strong class="hideonsmartphone">'.$langs->trans("Search").' : </strong></th>';
$out .= '<th class="liste_titre hideonsmartphone"><strong class="hideonsmartphone">'.$langs->trans("Search").' : </strong></th>';
if ($donetodo) {
$out .= '<th class="liste_titre"></th>';
}
$out .= '<th class="liste_titre">';
$out .= '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;" title="'.$langs->trans("ActionType").'"></span>';
//$out .= img_picto($langs->trans("Type"), 'type');
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', !getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 1 : -1, 0, 0, 1, 'minwidth200imp');
$out .= '<span class="fas fa-square inline-block fawidth30 hideonsmartphone" style="color: #ddd;" title="'.$langs->trans("ActionType").'"></span>';
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, 0, 1, 'minwidth200imp', $langs->trans("Type"));
$out .= '</th>';
$out .= '<th class="liste_titre maxwidth100onsmartphone">';
$out .= '<input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'" placeholder="'.$langs->trans("Label").'">';
@@ -14281,7 +14282,6 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
$out .= '</tr>';
$out .= '</table>';
$out .= '</form>';