Merge pull request #8981 from grandoc/new_branch_18_06_2018
clean and upsdate code
This commit is contained in:
commit
62307b74e7
@ -369,7 +369,6 @@ if ($conf->produit->enabled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$modBarCode = new $file();
|
$modBarCode = new $file();
|
||||||
$var = !$var;
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.(isset($modBarCode->name)?$modBarCode->name:$modBarCode->nom)."</td><td>\n";
|
print '<td>'.(isset($modBarCode->name)?$modBarCode->name:$modBarCode->nom)."</td><td>\n";
|
||||||
|
|||||||
@ -452,11 +452,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
$outputlangs->charset_output='UTF-8';
|
$outputlangs->charset_output='UTF-8';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load translation files required by the page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("projects");
|
|
||||||
|
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
{
|
{
|
||||||
@ -951,7 +949,6 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
$elementarray = $object->get_element_list($keyref, $tablename);
|
$elementarray = $object->get_element_list($keyref, $tablename);
|
||||||
if (count($elementarray)>0 && is_array($elementarray))
|
if (count($elementarray)>0 && is_array($elementarray))
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
$total_ht = 0;
|
$total_ht = 0;
|
||||||
$total_ttc = 0;
|
$total_ttc = 0;
|
||||||
$num=count($elementarray);
|
$num=count($elementarray);
|
||||||
|
|||||||
@ -197,11 +197,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
$outputlangs->charset_output='UTF-8';
|
$outputlangs->charset_output='UTF-8';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load translation files required by the page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("projects");
|
|
||||||
|
|
||||||
if ($conf->societe->multidir_output[$object->entity])
|
if ($conf->societe->multidir_output[$object->entity])
|
||||||
{
|
{
|
||||||
@ -282,7 +280,6 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
|
||||||
$var=true;
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
|
|||||||
@ -78,7 +78,6 @@ if ($permission) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$var=true;
|
|
||||||
if (empty($hideaddcontactforuser))
|
if (empty($hideaddcontactforuser))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -157,8 +156,6 @@ if ($permission) {
|
|||||||
<div class="tagtd liste_titre"> </div>
|
<div class="tagtd liste_titre"> </div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php $var=true; ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
|
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
|
||||||
foreach($arrayofsource as $source) {
|
foreach($arrayofsource as $source) {
|
||||||
@ -171,10 +168,9 @@ if ($permission) {
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$var = !$var;
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form class="tagtr <?php echo $var?"pair":"impair"; ?>">
|
<form class="tagtr oddeven">
|
||||||
<div class="tagtd" align="left">
|
<div class="tagtd" align="left">
|
||||||
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
|
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
|
||||||
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
|
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
|
||||||
|
|||||||
@ -36,7 +36,6 @@ else
|
|||||||
|
|
||||||
if( (array) $linked_resources && count($linked_resources) > 0)
|
if( (array) $linked_resources && count($linked_resources) > 0)
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
|
|
||||||
foreach ($linked_resources as $linked_resource)
|
foreach ($linked_resources as $linked_resource)
|
||||||
{
|
{
|
||||||
@ -48,7 +47,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
|
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'?element='.$element.'&element_id='.$element_id.'" method="POST">';
|
print '<form class="tagtr oddeven" action="'.$_SERVER["PHP_SELF"].'?element='.$element.'&element_id='.$element_id.'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'" />';
|
print '<input type="hidden" name="id" value="'.$object->id.'" />';
|
||||||
print '<input type="hidden" name="action" value="update_linked_resource" />';
|
print '<input type="hidden" name="action" value="update_linked_resource" />';
|
||||||
@ -68,7 +67,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
if ($linked_resource['rowid'] == GETPOST('lineid'))
|
if ($linked_resource['rowid'] == GETPOST('lineid'))
|
||||||
$style='style="background: orange;"';
|
$style='style="background: orange;"';
|
||||||
|
|
||||||
print '<form class="tagtr '.($var==true?"pair":"impair").'" '.$style.'>';
|
print '<form class="tagtr oddeven" '.$style.'>';
|
||||||
|
|
||||||
print '<div class="tagtd">';
|
print '<div class="tagtd">';
|
||||||
print $object_resource->getNomUrl(1);
|
print $object_resource->getNomUrl(1);
|
||||||
@ -102,7 +101,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<form class="tagtr '.($var==true?"pair":"impair").'">';
|
print '<form class="tagtr oddeven">';
|
||||||
print '<div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div>';
|
print '<div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div>';
|
||||||
print '<div class="tagtd opacitymedium"></div>';
|
print '<div class="tagtd opacitymedium"></div>';
|
||||||
print '<div class="tagtd opacitymedium"></div>';
|
print '<div class="tagtd opacitymedium"></div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user