diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index cd1c9ecfd1b..80cfce40c32 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -98,9 +98,11 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('actioncard','globalcard')); + /* * Actions */ + $listUserAssignedUpdated = false; // Remove user to assigned list if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') @@ -644,8 +646,8 @@ if ($action == 'create') if ($backtopage) print ''; if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print ''; - if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous")); - else print load_fiche_titre($langs->trans("AddAnAction")); + if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda'); + else print load_fiche_titre($langs->trans("AddAnAction"), '', 'title_agenda'); dol_fiche_head(); @@ -1183,33 +1185,51 @@ if ($id > 0) print $formconfirm; } + $linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); + $linkback.= ''.$langs->trans("BackToList").''; + + // Link to other agenda views + $out=''; + $out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewPerUser").''; + $out.='
'; + $out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewCal").''; + $out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewWeek").''; + $out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewDay").''; + $linkback.=$out; + + dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + + print '
'; + // Affichage fiche action en mode visu print ''; - $linkback = ''.$langs->trans("BackToList").''; - // Ref - print ''; + print '';*/ // Type if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''; + print ''; } // Title - print ''; + //print ''; // Full day event - print ''; + print ''; $rowspan=4; if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++; // Date start - print ''; // Status - print ''; + print '';*/ // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) @@ -1235,7 +1255,7 @@ if ($id > 0) } // Assigned to - print ''; @@ -1432,46 +1452,6 @@ if ($id > 0) if ($action != 'edit') { - // Link to agenda views - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"').' '; - print ''."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"').' '; - print ''."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"').' '; - print ''."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"').' '; - print ''."\n"; - print '
'; - if (empty($conf->global->AGENDA_DISABLE_BUILDDOC)) { print '
 

'; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index c4739845042..b190047bac7 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -37,7 +37,8 @@ class ActionComm extends CommonObject public $table_element = 'actioncomm'; public $table_rowid = 'id'; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - + public $picto='action'; + /** * Id of the event * @var int @@ -1024,7 +1025,7 @@ class ActionComm extends CommonObject * Return label of action status * * @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=Very short label+Picto + * @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" * @return string Label */ @@ -1076,11 +1077,19 @@ class ActionComm extends CommonObject } else if ($mode == 6) { - if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9'); - else if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1'); - else if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3'); - else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6'); + if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable').' '.img_picto($langs->trans('StatusNotApplicable'),'statut9'); + else if ($percent==0) return $langs->trans('StatusActionToDo').'0% '.img_picto($langs->trans('StatusActionToDo'),'statut1'); + else if ($percent > 0 && $percent < 100) return $langs->trans('StatusActionInProcess').' ('.$percent.'%) '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3'); + else if ($percent >= 100) return $langs->trans('StatusActionDone').' (100%) '.img_picto($langs->trans('StatusActionDone'),'statut6'); } + else if ($mode == 7) + { + if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9'); + else if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1'); + else if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3'); + else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6'); + } + return ''; } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index e8e5c388eb4..4691673a831 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -123,30 +123,49 @@ if ($object->id > 0) dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action'); + $linkback = img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); + $linkback.= ''.$langs->trans("BackToList").''; + + // Link to other agenda views + $out=''; + $out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewPerUser").''; + $out.='
'; + $out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewCal").''; + $out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewWeek").''; + $out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewDay").''; + + $linkback.=$out; + + dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + + print '
'; + // Affichage fiche action en mode visu print '
'.$langs->trans("Ref").''; + /*print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); - print '
'.$langs->trans("Type").''.$object->type.'
'.$langs->trans("Type").''.$object->type.'
'.$langs->trans("Title").''.dol_htmlentities($object->label).'
'.$langs->trans("Title").''.dol_htmlentities($object->label).'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).'
'.$langs->trans("DateActionStart").''; + print '
'.$langs->trans("DateActionStart").''; if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour'); else print dol_print_date($object->datep,'day'); if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); @@ -1224,9 +1244,9 @@ if ($id > 0) print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + /*print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print $object->getLibStatut(4); - print '
'.$langs->trans("ActionAssignedTo").''; + print '
'.$langs->trans("ActionAssignedTo").''; $listofuserid=array(); if (empty($donotclearsession)) { @@ -1291,7 +1311,7 @@ if ($id > 0) // Third party - Contact if ($conf->societe->enabled) { - print '
'.$langs->trans("ActionOnCompany").''.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None")); + print '
'.$langs->trans("ActionOnCompany").''.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None")); if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL') { if ($object->thirdparty->fetch($object->thirdparty->id)) @@ -1323,7 +1343,7 @@ if ($id > 0) // Project if (! empty($conf->projet->enabled)) { - print '
'.$langs->trans("Project").''; + print '
'.$langs->trans("Project").''; if ($object->fk_project) { $project=new Project($db); @@ -1334,7 +1354,7 @@ if ($id > 0) } // Priority - print '
'.$langs->trans("Priority").''; + print '
'.$langs->trans("Priority").''; print ($object->priority?$object->priority:''); print '
'; - $linkback = ''.$langs->trans("BackToList").''; - // Ref - print ''; + print '';*/ // Type if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''; + print ''; } // Title - print ''; + //print ''; // Full day event - print ''; + print ''; // Date start - print ''; // Status - print ''; + print '';*/ // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) @@ -172,7 +191,7 @@ if ($object->id > 0) } // Assigned to - print ''; - print '
'.$langs->trans("Ref").''; + /*print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); - print '
'.$langs->trans("Type").''.$object->type.'
'.$langs->trans("Type").''.$object->type.'
'.$langs->trans("Title").''.$object->label.'
'.$langs->trans("Title").''.$object->label.'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).'
'.$langs->trans("DateActionStart").''; + print '
'.$langs->trans("DateActionStart").''; if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour'); else print dol_print_date($object->datep,'day'); if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); @@ -161,9 +180,9 @@ if ($object->id > 0) print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + /*print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print $object->getLibStatut(4); - print '
'.$langs->trans("ActionAffectedTo").''; + print '
'.$langs->trans("ActionAffectedTo").''; $listofuserid=array(); if (empty($donotclearsession)) { @@ -206,11 +225,15 @@ if ($object->id > 0) } print '


'; + print '
'; + + print '

'; + + print ''; // Third party - Contact - print ''; + print ''; print ''; print '
'.$langs->trans("ActionOnCompany").''.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None")); + print '
'.$langs->trans("ActionOnCompany").''.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None")); if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL') { if ($object->thirdparty->fetch($object->thirdparty->id)) @@ -281,7 +304,7 @@ if ($object->id > 0) } - print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; @@ -289,54 +312,6 @@ if ($object->id > 0) dol_fiche_end(); - - if ($action != 'edit') - { - // Link to agenda views - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"').' '; - print '
'."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone pictoactionview"').' '; - print '
'."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone pictoactionview"').' '; - print '
'."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone pictoactionview"').' '; - print '
'."\n"; - print '
'; - - print '
'; - print "

"; - } - - $modulepart = 'actions'; $permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create; $param = '&id=' . $object->id; diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 7c2001d925d..d1338142173 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -50,19 +50,41 @@ $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions| $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('',$langs->trans("Agenda"),$help_url); -$act = new ActionComm($db); -$act->fetch($id); -$act->info($act->id); +$object = new ActionComm($db); +$object->fetch($id); +$object->info($object->id); -$head=actions_prepare_head($act); +$head=actions_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("Action"),0,'action'); +$linkback = img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); +$linkback.= ''.$langs->trans("BackToList").''; + +// Link to other agenda views +$out=''; +$out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"'); +$out.=''.$langs->trans("ViewPerUser").''; +$out.='
'; +$out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"'); +$out.=''.$langs->trans("ViewCal").''; +$out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"'); +$out.=''.$langs->trans("ViewWeek").''; +$out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"'); +$out.=''.$langs->trans("ViewDay").''; + +$linkback.=$out; + +dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + +print '
'; + +print '
'; print '
'; -dol_print_object_info($act); +dol_print_object_info($object); print '
'; -print ''; +dol_fiche_end(); llxFooter(); $db->close(); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 90fdc246be6..b0ea8a9f4ba 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1661,6 +1661,8 @@ if ($action == 'create') print $formconfirm; + // Proposal card + $linkback = '' . $langs->trans("BackToList") . ''; @@ -1669,7 +1671,10 @@ if ($action == 'create') // Ref customer $morehtmlref.=$langs->trans('RefCustomer').' '; if ($action != 'refclient' && ! empty($object->brouillon)) - $morehtmlref.='' . img_edit($langs->trans('Modify')) . ' : '; + { + $morehtmlref.='' . img_edit($langs->trans('Modify')) . ' '; + } + $morehtmlref.=' : '; if ($user->rights->propal->creer && $action == 'refclient') { $morehtmlref.='
'; $morehtmlref.=''; @@ -1719,8 +1724,12 @@ if ($action == 'create') $morehtmlref.=''; + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + print '
'; print '
'; print ''; @@ -1927,7 +1936,7 @@ if ($action == 'create') // Payment mode print ''; - print ''; print '
'; + print ''; print ''; @@ -1947,7 +1956,7 @@ if ($action == 'create') { // Multicurrency code print ''; - print ''; // Delivery date planed - print ''; print '
'; print $langs->trans('PaymentMode'); print '
'; + print ''; print ''; @@ -1964,7 +1973,7 @@ if ($action == 'create') // Multicurrency rate print ''; - print '
'; print fieldLabel('Currency','multicurrency_code'); print '
'; + print ''; print ''; @@ -2073,71 +2082,81 @@ if ($action == 'create') } // Other attributes - $cols = 5; + $cols = 2; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + print '
'; print fieldLabel('CurrencyRate','multicurrency_tx'); print '
'; + + print ''; + print '
'; + print '
'; + print '
'; + + print ''; + // Amount HT print ''; - print ''; - - // Margin Infos - if (! empty($conf->margin->enabled)) - { - $rowspan=4; - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $rowspan++; - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $rowspan++; - print ''; - } + print ''; print ''; - + // Amount VAT print ''; - print ''; + print ''; print ''; - + // Amount Local Taxes if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } - + // Amount TTC print ''; - print ''; + print ''; print ''; - + if (!empty($conf->multicurrency->enabled)) { - // Multicurrency Amount HT - print ''; - print ''; - print ''; - - // Multicurrency Amount VAT - print ''; - print ''; - print ''; - - // Multicurrency Amount TTC - print ''; - print ''; - print ''; + // Multicurrency Amount HT + print ''; + print ''; + print ''; + + // Multicurrency Amount VAT + print ''; + print ''; + print ''; + + // Multicurrency Amount TTC + print ''; + print ''; + print ''; } - + // Statut //print ''; - - print '
' . $langs->trans('AmountHT') . '' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - $formmargin->displayMarginInfos($object); - print '' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . $langs->trans('AmountVAT') . '' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . $langs->trans('AmountTTC') . '' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '
' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . $langs->trans('Status') . '' . $object->getLibStatut(4) . '

'; + + print '
'; + + // Margin Infos + if (! empty($conf->margin->enabled)) + { + $formmargin->displayMarginInfos($object); + } + + print ''; + print ''; + print ''; + + print '

'; if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $blocname = 'contacts'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 00eac5dce6f..7431ee9ca79 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1434,7 +1434,6 @@ if ($action == 'create' && $user->rights->commande->creer) } $absolute_discount=$soc->getAvailableDiscounts(); - $nbrow = 10; print ''; print ''; @@ -1911,24 +1910,82 @@ if ($action == 'create' && $user->rights->commande->creer) // Print form confirm print $formconfirm; - /* - * Commande - */ - $nbrow = 9; - if (! empty($conf->projet->enabled)) - $nbrow ++; - - // Local taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) - $nbrow++; - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0 ) - $nbrow++; - - print ''; + // Order card + $linkback = '' . $langs->trans("BackToList") . ''; + + $morehtmlref='
'; + + // Ref customer + $morehtmlref.=$langs->trans('RefCustomer').' '; + if ($action != 'refclient' && ! empty($object->brouillon)) + { + $morehtmlref.='' . img_edit($langs->trans('Modify')) . ' '; + } + $morehtmlref.=' : '; + if ($user->rights->commande->creer && $action == 'refclient') { + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=' '; + $morehtmlref.=''; + } else { + $morehtmlref.=$object->ref_client; + } + + // Thirdparty + $morehtmlref.='
'.$langs->trans('Company') . ' : ' . $soc->getNomUrl(1); + + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->commande->creer) + { + if ($action != 'classify') + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } + } + + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print '
'; + + print '
'; + // Ref + /* print ''; print ''; + print '';*/ if ($soc->outstanding_limit) { // Outstanding Bill print ''; @@ -1999,7 +2056,7 @@ if ($action == 'create' && $user->rights->commande->creer) $addabsolutediscount = '' . $langs->trans("EditGlobalDiscounts") . ''; $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; - print ''; print '
' . $langs->trans('Ref') . ''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -1971,14 +2028,14 @@ if ($action == 'create' && $user->rights->commande->creer) } else { print $soc->getNomUrl(1, 'compta'); } - print '
'; print $langs->trans('OutstandingBill'); - print ''; + print ''; print price($soc->get_OutstandingBill()) . ' / '; print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency); print '
' . $langs->trans('Discounts') . ''; + print '
' . $langs->trans('Discounts') . ''; if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); else @@ -2034,7 +2091,7 @@ if ($action == 'create' && $user->rights->commande->creer) if ($action != 'editdate' && $object->brouillon) print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . '
'; - print '
'; + print ''; if ($action == 'editdate') { print '
'; print ''; @@ -2052,14 +2109,14 @@ if ($action == 'create' && $user->rights->commande->creer) print '
'; + print '
'; print ''; if ($action != 'editdate_livraison') print ''; print '
'; print $langs->trans('DateDeliveryPlanned'); print 'id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . '
'; - print '
'; + print ''; if ($action == 'editdate_livraison') { print ''; print ''; @@ -2085,7 +2142,7 @@ if ($action == 'create' && $user->rights->commande->creer) if ($action != 'editshippingmethod' && $user->rights->commande->creer) print 'id.'">'.img_edit($langs->trans('SetShippingMode'),1).'
'; - print '
'; + print ''; if ($action == 'editshippingmethod') { $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1); } else { @@ -2106,7 +2163,7 @@ if ($action == 'create' && $user->rights->commande->creer) if ($action != 'editwarehouse' && $user->rights->commande->creer) print 'id.'">'.img_edit($langs->trans('SetWarehouse'),1).'
'; - print ''; + print ''; if ($action == 'editwarehouse') { $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); } else { @@ -2117,14 +2174,14 @@ if ($action == 'create' && $user->rights->commande->creer) } // Terms of payment - print ''; + print ''; print ''; if ($action != 'editconditions') print ''; print '
'; print $langs->trans('PaymentConditionsShort'); print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . '
'; - print ''; + print ''; if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1); } else { @@ -2135,14 +2192,14 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; // Mode of payment - print ''; + print ''; print ''; if ($action != 'editmode') print ''; print '
'; print $langs->trans('PaymentMode'); print 'id . '">' . img_edit($langs->trans('SetMode'), 1) . '
'; - print ''; + print ''; if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); } else { @@ -2155,14 +2212,14 @@ if ($action == 'create' && $user->rights->commande->creer) { // Multicurrency code print ''; - print ''; + print ''; print ''; if ($action != 'editmulticurrencycode' && ! empty($object->brouillon)) print ''; print '
'; print fieldLabel('Currency','multicurrency_code'); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; - print ''; + print ''; if ($action == 'editmulticurrencycode') { $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code'); } else { @@ -2172,14 +2229,14 @@ if ($action == 'create' && $user->rights->commande->creer) // Multicurrency rate print ''; - print ''; + print ''; print ''; if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon)) print ''; print '
'; print fieldLabel('CurrencyRate','multicurrency_tx'); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; - print ''; + print ''; if ($action == 'editmulticurrencyrate') { $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); } else { @@ -2196,7 +2253,7 @@ if ($action == 'create' && $user->rights->commande->creer) if ($action != 'editavailability') print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; print ''; - print ''; + print ''; if ($action == 'editavailability') { $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1); } else { @@ -2212,7 +2269,7 @@ if ($action == 'create' && $user->rights->commande->creer) if ($action != 'editdemandreason') print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; print ''; - print ''; + print ''; if ($action == 'editdemandreason') { $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { @@ -2230,7 +2287,7 @@ if ($action == 'create' && $user->rights->commande->creer) if ($totalWeight || $totalVolume) { print ''.$langs->trans("CalculatedWeight").' / '.$langs->trans("CalculatedVolume").''; - print ''; + print ''; print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no'); print ' / '; print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no'); @@ -2240,6 +2297,7 @@ if ($action == 'create' && $user->rights->commande->creer) // TODO How record was recorded OrderMode (llx_c_input_method) // Project + /* if (! empty($conf->projet->enabled)) { $langs->load('projects'); @@ -2259,7 +2317,8 @@ if ($action == 'create' && $user->rights->commande->creer) } print ''; } - + */ + // Incoterms if (!empty($conf->incoterm->enabled)) { @@ -2283,16 +2342,6 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; } - // Other attributes - $cols = 3; - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; - - $rowspan = 4; - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) - $rowspan ++; - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) - $rowspan ++; - // Bank Account if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) { @@ -2313,20 +2362,23 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; } + // Other attributes + $cols = 2; + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + + print ''; + + print '
'; + print '
'; + print '
'; + print '
'; + + print ''; + // Total HT print ''; print ''; - // Margin Infos - if (! empty($conf->margin->enabled)) { - print ''; - } else - print ''; - - print ''; - // Total VAT print ''; @@ -2349,25 +2401,36 @@ if ($action == 'create' && $user->rights->commande->creer) { // Multicurrency Amount HT print ''; - print ''; + print ''; print ''; // Multicurrency Amount VAT print ''; - print ''; + print ''; print ''; // Multicurrency Amount TTC print ''; - print ''; + print ''; print ''; } // Statut - print ''; + //print ''; + + print '
' . $langs->trans('AmountHT') . '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ''; - $formmargin->displayMarginInfos($object); - print '
' . $langs->trans('AmountVAT') . '' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '
' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . $langs->trans('Status') . '' . $object->getLibStatut(4) . '
' . $langs->trans('Status') . '' . $object->getLibStatut(4) . '
'; + + // Margin Infos + if (! empty($conf->margin->enabled)) { + $formmargin->displayMarginInfos($object); + } + - print '
'; - print "\n"; + print '
'; + print '
'; + print '
'; + + print '

'; if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $blocname = 'contacts'; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index d9dfb2f5c17..f30318d2fb8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -47,7 +47,8 @@ class Commande extends CommonOrder public $class_element_line = 'OrderLine'; public $fk_element = 'fk_commande'; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - + public $picto = 'order'; + /** * {@inheritdoc} */ diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index 6678d87ca60..99159f62561 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -209,7 +209,7 @@ class FormMargin if (!empty($hidemargininfos)) print ''; } - print ''; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 68087c31e80..dfa724e7c64 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -951,7 +951,13 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r { $morehtmlleft.='
'; if ($modulepart != 'unknown') $morehtmlleft.=$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos); - else + else if ($object->element == 'action') + { + $cssclass='photorefcenter'; + $nophoto=img_picto('', 'title_agenda', '', false, 1); + $morehtmlleft.='
No photo
'; + } + else { $width=14; $cssclass='photorefcenter'; $nophoto=img_picto('', 'object_'.$object->picto, '', false, 1); @@ -982,7 +988,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r } else { $tmptxt=$object->getLibStatut(6); - if (empty($tmptxt)) $tmptxt=$object->getLibStatut(5); + if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5); $morehtmlright.=$tmptxt; } if (! empty($object->name_alias)) $morehtmlref.='
'.$object->name_alias.'
'; // For thirdparty diff --git a/htdocs/core/tpl/resource_add.tpl.php b/htdocs/core/tpl/resource_add.tpl.php index 482dad50085..97cb933bcf7 100644 --- a/htdocs/core/tpl/resource_add.tpl.php +++ b/htdocs/core/tpl/resource_add.tpl.php @@ -6,7 +6,7 @@ require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'); $form = new Form($db); $formresources = new FormResource($db); -$out .= '
'; +$out = '
'; $out .= ''; $out .= ''; diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index 7b2a6f43f4d..6f88d8bb5f8 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -96,8 +96,13 @@ if( (array) $linked_resources && count($linked_resources) > 0) } else { - print '
'.$langs->trans('NoResourceLinked').'
'; - + print '
'; + print '
'.$langs->trans('NoResourceLinked').'
'; + print '
'; + print '
'; + print '
'; + print '
'; + print '
'; } print '
'; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index f8e9e052995..27451b07973 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -51,7 +51,7 @@ $hookmanager->initHooks(array('element_resource')); $object->available_resources = array('dolresource'); // Get parameters -$id = GETPOST('id','int'); +$id = GETPOST('id','int'); $action = GETPOST('action','alpha'); $mode = GETPOST('mode','alpha'); $lineid = GETPOST('lineid','int'); @@ -196,24 +196,105 @@ else dol_fiche_head($head, 'resources', $langs->trans("Action"),0,'action'); + $linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); + $linkback.= ''.$langs->trans("BackToList").''; + + // Link to other agenda views + $out=''; + $out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewPerUser").''; + $out.='
'; + $out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewCal").''; + $out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewWeek").''; + $out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"'); + $out.=''.$langs->trans("ViewDay").''; + + $linkback.=$out; + + dol_banner_tab($act, 'element_id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '', "&element=".$element); + + print '
'; + + // Ref + /*print '
';*/ + // Affichage fiche action en mode visu print '
'.$langs->trans('Margins').''.$langs->trans('SellingPrice').'
'.$langs->trans("Ref").''; + print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print '
'; - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - // Type if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''; + print ''; } - // Title - print ''; + // Full day event + print ''; + + // Date start + print ''; + print ''; + + // Date end + print ''; + + // Status + /*print '';*/ + + // Location + if (empty($conf->global->AGENDA_DISABLE_LOCATION)) + { + print ''; + } + + // Assigned to + print ''; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); - print '
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("EventOnFullDay").''.yn($act->fulldayevent, 3).'
'.$langs->trans("DateActionStart").''; + if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour'); + else print dol_print_date($act->datep,'day'); + if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); + print '
'.$langs->trans("DateActionEnd").''; + if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour'); + else print dol_print_date($act->datef,'day'); + if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); + print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + print $act->getLibStatut(4); + print '
'.$langs->trans("Location").''.$act->location.'
'.$langs->trans("ActionAffectedTo").''; + $listofuserid=array(); + if (empty($donotclearsession)) + { + if ($act->userownerid > 0) $listofuserid[$act->userownerid]=array('id'=>$act->userownerid,'transparency'=>$act->transparency); // Owner first + if (! empty($act->userassigned)) // Now concat assigned users + { + // Restore array with key with same value than param 'id' + $tmplist1=$act->userassigned; $tmplist2=array(); + foreach($tmplist1 as $key => $val) + { + if ($val['id'] && $val['id'] != $act->userownerid) $listofuserid[$val['id']]=$val; + } + } + $_SESSION['assignedtouser']=json_encode($listofuserid); + } + else + { + if (!empty($_SESSION['assignedtouser'])) + { + $listofuserid=json_decode($_SESSION['assignedtouser'], true); + } + } + print '
'; + print $form->select_dolusers_forevent('view', 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print '
'; + if (in_array($user->id,array_keys($listofuserid))) + { + print '
'; + print $langs->trans("MyAvailability").': '.(($act->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody + print '
'; + } + print '
'; dol_fiche_end(); @@ -225,38 +306,37 @@ else */ if ($element_id && $element == 'societe') { - $socstatic = fetchObjectByElement($element_id,$element); - if (is_object($socstatic)) - { - $savobject = $object; - - $object = $socstatic; - - require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - $head = societe_prepare_head($socstatic); - - dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"),0,'company'); - - dol_banner_tab($socstatic, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); - + $socstatic = fetchObjectByElement($element_id, $element); + if (is_object($socstatic)) { + $savobject = $object; + + $object = $socstatic; + + require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; + $head = societe_prepare_head($socstatic); + + dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company'); + + dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom'); + print '
'; - - print '
'; + + print '
'; print ''; - + // Alias name (commercial, trademark or alias name) - print '"; - - print '
'.$langs->trans('AliasNames').''; + print '
' . $langs->trans('AliasNames') . ''; print $socstatic->name_alias; print "
'; - - print '
'; - - dol_fiche_end(); - - $object = $savobject; - } + + print ''; + + print ''; + + dol_fiche_end(); + + $object = $savobject; + } } /* @@ -303,13 +383,13 @@ else if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - //print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'',''); - - + //print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'',''); + print '
'; + // Show list of resource links - foreach ($object->available_resources as $modresources => $resources) - { + foreach ($object->available_resources as $modresources => $resources) + { $resources=(array) $resources; // To be sure $resources is an array foreach($resources as $resource_obj) { @@ -327,13 +407,12 @@ else // If we have a specific template we use it if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_add.tpl.php'))) { - $res=include dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_add.tpl.php'); + $res=include dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_add.tpl.php'); } else { - $res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php'; + $res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php'; } - //var_dump($element_id); if ($mode != 'add' || $resource_obj != $resource_type) { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index e8692055b31..1d860f5f378 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2452,6 +2452,9 @@ div.refidno { font-size: px; line-height: 21px; } +div.refidno form { + display: inline-block; +} div.pagination { float: right; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3b8c7f38097..1db2b6fe7a3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2342,6 +2342,9 @@ div.refidno { font-size: px; line-height: 21px; } +div.refidno form { + display: inline-block; +} div.pagination { float: right;