diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 883013c2014..00adaf510d2 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -194,7 +194,7 @@ class ActionsContactCardCommon $out=''; - if ($action == 'view' || $action == 'edit') $out.= $langs->trans("Contact"); + if ($action == 'view' || $action == 'edit') $out.= $langs->trans("ContactsAddresses"); if ($action == 'create') $out.= $langs->trans("AddContact"); return $out; diff --git a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php index 4dbd0f2eccb..0e5dbfadd72 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php @@ -19,7 +19,7 @@ */ ?> - + control->tpl['title']); @@ -102,7 +102,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?> - trans("Jabberid"); ?> + trans("IM"); ?> diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index ebee043d3cd..7f8aeccbd94 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -17,9 +17,12 @@ * * $Id$ */ + +$contact = $GLOBALS['objcanvas']->control->object; + ?> - + control->tpl['title']); @@ -118,7 +121,7 @@ echo $this->control->tpl['ajax_selectcountry']; - trans("Jabberid"); ?> + trans("IM"); ?> diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index ef77ee057da..4b0336fb52d 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -17,9 +17,12 @@ * * $Id$ */ + +$contact = $GLOBALS['objcanvas']->control->object; + ?> - + control->tpl['error'],$this->control->tpl['errors']); @@ -103,7 +106,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] - trans("Jabberid"); ?> + trans("IM"); ?> control->tpl['jabberid']; ?> diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4dbb45d32f9..d9477db7091 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -313,7 +313,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } else if ($action == 'edit') { - $objcanvas->control->object=$objcanvas->getObject($socid); // Load object + $objcanvas->control->object=$objcanvas->getObject($id); // Load object if (empty($objcanvas->control->object)) { $object = new Contact($db); @@ -326,7 +326,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } else { - $objcanvas->control->object=$objcanvas->getObject($socid); // Load object + $objcanvas->control->object=$objcanvas->getObject($id); // Load object if (empty($objcanvas->control->object)) { $object = new Contact($db); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f51517157f5..a25088ecd9a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -973,7 +973,6 @@ class Form $sql.= $db->order("p.ref"); $sql.= $db->plimit($limit); - // Build output string $outselect=''; $outjson=array(); diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index fafe81cedf7..1f4905c155f 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -360,17 +360,6 @@ class ActionsCardCommon return $out; } - /** - * Return the head of card (tabs) - */ - function showHead($action) - { - $head = societe_prepare_head($this->object); - $title = $this->getTitle($action); - - return dol_fiche_head($head, 'card', $title, 0, 'company'); - } - /** * Assigne les valeurs par defaut pour le canvas * @param action Type of template @@ -547,7 +536,13 @@ class ActionsCardCommon } else { - $this->tpl['showhead']=$this->showHead('view'); + /* TODO dol_fiche_head and dol_fiche_end must return a string and no do a print + $head = societe_prepare_head($this->object); + $title = $this->getTitle($action); + + $this->tpl['showhead']=dol_fiche_head($head, 'card', $title, 0, 'company'); + $this->tpl['showend']=dol_fiche_end(); + */ $this->tpl['showrefnav'] = $form->showrefnav($this->object,'socid','',($user->societe_id?0:1),'rowid','nom'); diff --git a/htdocs/societe/canvas/default/tpl/card_create.tpl.php b/htdocs/societe/canvas/default/tpl/card_create.tpl.php index 8ac106a775d..c0850550a0f 100644 --- a/htdocs/societe/canvas/default/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/default/tpl/card_create.tpl.php @@ -54,7 +54,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] - + global->SOCIETE_USEPREFIX)) { ?> diff --git a/htdocs/societe/canvas/default/tpl/card_edit.tpl.php b/htdocs/societe/canvas/default/tpl/card_edit.tpl.php index 8197dbcd220..b3ec839f4ef 100644 --- a/htdocs/societe/canvas/default/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/default/tpl/card_edit.tpl.php @@ -17,9 +17,12 @@ * * $Id$ */ + +$contact = $GLOBALS['objcanvas']->control->object; + ?> - +control->tpl['title']); @@ -42,7 +45,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
trans('Name'); ?>trans('ThirdPartyName'); ?> trans('Prefix'); ?>
- + diff --git a/htdocs/societe/canvas/default/tpl/card_view.tpl.php b/htdocs/societe/canvas/default/tpl/card_view.tpl.php index 76faf8d5cdf..35d425b26d4 100644 --- a/htdocs/societe/canvas/default/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/default/tpl/card_view.tpl.php @@ -17,9 +17,19 @@ * * $Id$ */ + +$soc = $GLOBALS['objcanvas']->control->object; + ?> - + +trans("ThirdParty"),0,'company'); + +?> control->tpl['error']) echo $this->control->tpl['error']; ?> control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?> @@ -28,7 +38,7 @@
trans('Name'); ?>trans('ThirdPartyName'); ?>
- + @@ -226,7 +236,7 @@ for ($i=1; $i<=4; $i++) {
trans('Name'); ?>trans('ThirdPartyName'); ?> control->tpl['showrefnav']; ?>
- +
rights->societe->creer) { ?> @@ -248,4 +258,37 @@ for ($i=1; $i<=4; $i++) {
+ + + +
+ + +societe->dir_output.'/'.$socid; +$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid; +$genallowed=$user->rights->societe->creer; +$delallowed=$user->rights->societe->supprimer; + +$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang); +?> + +
+ +
+ +control->object); + +// Contacts list +$result=show_contacts($conf,$langs,$db,$objcanvas->control->object); + +// Projects list +$result=show_projects($conf,$langs,$db,$objcanvas->control->object); +?> + \ No newline at end of file diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php index fb029ac0cf0..ffb6071d538 100644 --- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php @@ -19,7 +19,7 @@ */ ?> - + control->tpl['title']); diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 5db27c2de89..4b11e1db9ed 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -17,9 +17,19 @@ * * $Id$ */ + +$soc = $GLOBALS['objcanvas']->control->object; + ?> - + +trans("ThirdParty"),0,'company'); + +?> control->tpl['error']) echo $this->control->tpl['error']; ?> control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?> @@ -167,7 +177,7 @@ -
+
rights->societe->creer) { ?> @@ -189,4 +199,37 @@
+ + + +
+ + +societe->dir_output.'/'.$socid; +$urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid; +$genallowed=$user->rights->societe->creer; +$delallowed=$user->rights->societe->supprimer; + +$somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang); +?> + +
+ +
+ +control->object); + +// Contacts list +$result=show_contacts($conf,$langs,$db,$objcanvas->control->object); + +// Projects list +$result=show_projects($conf,$langs,$db,$objcanvas->control->object); +?> + \ No newline at end of file diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index e43333521bc..176767814b0 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -418,40 +418,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->fetch($socid); $objcanvas->control->object=$object; } - $objcanvas->assign_values(); // Assign values - $objcanvas->display_canvas(); // Show template - - // TODO Move this also into template - print ''; - print ''; - print ''; - print '
'; - print ''; // ancre - - /* - * Documents generes - */ - $filedir=$conf->societe->dir_output.'/'.$socid; - $urlsource=$_SERVER["PHP_SELF"]."?socid=".$socid; - $genallowed=$user->rights->societe->creer; - $delallowed=$user->rights->societe->supprimer; - - $var=true; - - $somethingshown=$formfile->show_documents('company',$socid,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$objcanvas->control->object->default_lang); - - print '
'; - - print '
'; - - // Subsidiaries list - $result=show_subsidiaries($conf,$langs,$db,$objcanvas->control->object); - - // Contacts list - $result=show_contacts($conf,$langs,$db,$objcanvas->control->object); - - // Projects list - $result=show_projects($conf,$langs,$db,$objcanvas->control->object); + $objcanvas->assign_values('view'); // Assign values + $objcanvas->display_canvas('view'); // Show template } } else @@ -483,9 +451,6 @@ else require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php"); $modCodeFournisseur = new $module; - /* - * Company Fact creation mode - */ //if ($_GET["type"]=='cp') { $soc->client=3; } if (GETPOST("type")!='f') $soc->client=3; if (GETPOST("type")=='c') { $soc->client=1; } @@ -1684,7 +1649,7 @@ else print ''; - print "
\n"; + dol_fiche_end(); /* @@ -1704,7 +1669,7 @@ else if ($conf->projet->enabled && $user->rights->projet->creer) { - print ''.$langs->trans("AddProject").''."\n"; + print ''.$langs->trans("AddProject").''."\n"; } if ($user->rights->societe->supprimer)