Qual: All text for html output is inside display_canvas()
This commit is contained in:
parent
e92c686bcb
commit
31ff9bb739
@ -194,7 +194,7 @@ class ActionsContactCardCommon
|
|||||||
|
|
||||||
$out='';
|
$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");
|
if ($action == 'create') $out.= $langs->trans("AddContact");
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CONTACTCARD_CREATE.TPL.PHP DEFAULT -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
print_fiche_titre($this->control->tpl['title']);
|
print_fiche_titre($this->control->tpl['title']);
|
||||||
@ -102,7 +102,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("Jabberid"); ?></td>
|
<td><?php echo $langs->trans("IM"); ?></td>
|
||||||
<td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['jabberid']; ?>"></td>
|
<td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['jabberid']; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,12 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CONTACTCARD_EDIT.TPL.PHP DEFAULT -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
print_fiche_titre($this->control->tpl['title']);
|
print_fiche_titre($this->control->tpl['title']);
|
||||||
@ -118,7 +121,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("Jabberid"); ?></td>
|
<td><?php echo $langs->trans("IM"); ?></td>
|
||||||
<td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['jabberid']; ?>"></td>
|
<td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['jabberid']; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,12 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
|
dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
|
||||||
@ -103,7 +106,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("Jabberid"); ?></td>
|
<td><?php echo $langs->trans("IM"); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['jabberid']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['jabberid']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -313,7 +313,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
}
|
}
|
||||||
else if ($action == 'edit')
|
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))
|
if (empty($objcanvas->control->object))
|
||||||
{
|
{
|
||||||
$object = new Contact($db);
|
$object = new Contact($db);
|
||||||
@ -326,7 +326,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$objcanvas->control->object=$objcanvas->getObject($socid); // Load object
|
$objcanvas->control->object=$objcanvas->getObject($id); // Load object
|
||||||
if (empty($objcanvas->control->object))
|
if (empty($objcanvas->control->object))
|
||||||
{
|
{
|
||||||
$object = new Contact($db);
|
$object = new Contact($db);
|
||||||
|
|||||||
@ -973,7 +973,6 @@ class Form
|
|||||||
$sql.= $db->order("p.ref");
|
$sql.= $db->order("p.ref");
|
||||||
$sql.= $db->plimit($limit);
|
$sql.= $db->plimit($limit);
|
||||||
|
|
||||||
|
|
||||||
// Build output string
|
// Build output string
|
||||||
$outselect='';
|
$outselect='';
|
||||||
$outjson=array();
|
$outjson=array();
|
||||||
|
|||||||
@ -360,17 +360,6 @@ class ActionsCardCommon
|
|||||||
return $out;
|
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
|
* Assigne les valeurs par defaut pour le canvas
|
||||||
* @param action Type of template
|
* @param action Type of template
|
||||||
@ -547,7 +536,13 @@ class ActionsCardCommon
|
|||||||
}
|
}
|
||||||
else
|
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');
|
$this->tpl['showrefnav'] = $form->showrefnav($this->object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
|||||||
<table class="border" width="100%">
|
<table class="border" width="100%">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class="fieldrequired"><?php echo $langs->trans('Name'); ?></span></td>
|
<td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
|
||||||
<td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
|
<td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
|
||||||
<?php if (! empty($conf->global->SOCIETE_USEPREFIX)) { ?>
|
<?php if (! empty($conf->global->SOCIETE_USEPREFIX)) { ?>
|
||||||
<td><?php echo $langs->trans('Prefix'); ?></td>
|
<td><?php echo $langs->trans('Prefix'); ?></td>
|
||||||
|
|||||||
@ -17,9 +17,12 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP DEFAULT -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
print_fiche_titre($this->control->tpl['title']);
|
print_fiche_titre($this->control->tpl['title']);
|
||||||
@ -42,7 +45,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
|||||||
<table class="border" width="100%">
|
<table class="border" width="100%">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class="fieldrequired"><?php echo $langs->trans('Name'); ?></span></td>
|
<td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td>
|
||||||
<td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
|
<td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,19 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$soc = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP DEFAULT -->
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$head = societe_prepare_head($soc);
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
|
<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
|
||||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||||
@ -28,7 +38,7 @@
|
|||||||
<table class="border" width="100%">
|
<table class="border" width="100%">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="20%"><?php echo $langs->trans('Name'); ?></td>
|
<td width="20%"><?php echo $langs->trans('ThirdPartyName'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -226,7 +236,7 @@ for ($i=1; $i<=4; $i++) {
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
<?php dol_fiche_end(); ?>
|
||||||
|
|
||||||
<div class="tabsAction">
|
<div class="tabsAction">
|
||||||
<?php if ($user->rights->societe->creer) { ?>
|
<?php if ($user->rights->societe->creer) { ?>
|
||||||
@ -248,4 +258,37 @@ for ($i=1; $i<=4; $i++) {
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<table width="100%"><tr><td valign="top" width="50%">
|
||||||
|
<a name="builddoc"></a>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Documents generes
|
||||||
|
*/
|
||||||
|
$filedir=$conf->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);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// 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);
|
||||||
|
?>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP INDIVIDUAL -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
print_fiche_titre($this->control->tpl['title']);
|
print_fiche_titre($this->control->tpl['title']);
|
||||||
|
|||||||
@ -17,9 +17,19 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$soc = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP INDIVIDUAL -->
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$head = societe_prepare_head($soc);
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
|
<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
|
||||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||||
@ -167,7 +177,7 @@
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
<?php dol_fiche_end(); ?>
|
||||||
|
|
||||||
<div class="tabsAction">
|
<div class="tabsAction">
|
||||||
<?php if ($user->rights->societe->creer) { ?>
|
<?php if ($user->rights->societe->creer) { ?>
|
||||||
@ -189,4 +199,37 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<table width="100%"><tr><td valign="top" width="50%">
|
||||||
|
<a name="builddoc"></a>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Documents generes
|
||||||
|
*/
|
||||||
|
$filedir=$conf->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);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// 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);
|
||||||
|
?>
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
<!-- END PHP TEMPLATE -->
|
||||||
@ -418,40 +418,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
$object->fetch($socid);
|
$object->fetch($socid);
|
||||||
$objcanvas->control->object=$object;
|
$objcanvas->control->object=$object;
|
||||||
}
|
}
|
||||||
$objcanvas->assign_values(); // Assign values
|
$objcanvas->assign_values('view'); // Assign values
|
||||||
$objcanvas->display_canvas(); // Show template
|
$objcanvas->display_canvas('view'); // Show template
|
||||||
|
|
||||||
// TODO Move this also into template
|
|
||||||
print '<table width="100%"><tr><td valign="top" width="50%">';
|
|
||||||
print '<a name="builddoc"></a>'; // 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 '</td>';
|
|
||||||
print '<td></td>';
|
|
||||||
print '</tr>';
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -483,9 +451,6 @@ else
|
|||||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php");
|
||||||
$modCodeFournisseur = new $module;
|
$modCodeFournisseur = new $module;
|
||||||
|
|
||||||
/*
|
|
||||||
* Company Fact creation mode
|
|
||||||
*/
|
|
||||||
//if ($_GET["type"]=='cp') { $soc->client=3; }
|
//if ($_GET["type"]=='cp') { $soc->client=3; }
|
||||||
if (GETPOST("type")!='f') $soc->client=3;
|
if (GETPOST("type")!='f') $soc->client=3;
|
||||||
if (GETPOST("type")=='c') { $soc->client=1; }
|
if (GETPOST("type")=='c') { $soc->client=1; }
|
||||||
@ -1684,7 +1649,7 @@ else
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print "</div>\n";
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1704,7 +1669,7 @@ else
|
|||||||
|
|
||||||
if ($conf->projet->enabled && $user->rights->projet->creer)
|
if ($conf->projet->enabled && $user->rights->projet->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/projet/fiche.php?socid='.$socid.'&action=create">'.$langs->trans("AddProject").'</a>'."\n";
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/projet/fiche.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddProject").'</a>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->societe->supprimer)
|
if ($user->rights->societe->supprimer)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user