| ' . $langs->trans('RefCustomer') . ' | ';
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index da8b9012b14..d9258d921cd 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1442,7 +1442,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '';
// Reference
- print '| ' . $langs->trans('Ref') . ' | ' . $langs->trans("Draft") . ' | ';
+ print '| ' . $langs->trans('Ref') . ' | ' . $langs->trans("Draft") . ' | ';
// Reference client
print '| ' . $langs->trans('RefCustomer') . ' | ';
@@ -1732,8 +1732,12 @@ if ($action == 'create' && $user->rights->commande->creer)
dol_fiche_end();
// Button "Create Draft"
- print '';
-
+ print ' ';
+ print '';
+ print ' ';
+ print '';
+ print ' ';
+
print '';
// Show origin lines
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 300ff001cf6..3ff3053e6e9 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2039,7 +2039,7 @@ if ($action == 'create')
print '';
// Ref
- print '| ' . $langs->trans('Ref') . ' | ' . $langs->trans('Draft') . ' | ';
+ print '| ' . $langs->trans('Ref') . ' | ' . $langs->trans('Draft') . ' | ';
// Thirdparty
print '' . $langs->trans('Customer') . ' | ';
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index c8903d8d363..b38787a4067 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1189,7 +1189,11 @@ if ($action == 'create')
dol_fiche_end();
- print '';
+ print '';
+ print '';
+ print ' ';
+ print '';
+ print ' ';
if (is_object($objectsrc))
{
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 71fec224137..964b5f648b1 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1179,6 +1179,8 @@ if ($action == 'create')
print '';
print '';
print '';
+ print ' ';
+ print '';
print ' ';
print '';
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 61c2d3862af..255d7f2cda0 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -138,11 +138,6 @@ if ($object->id > 0)
print '';
print '';
- // Alias names (commercial, trademark or alias names)
- print '| '.$langs->trans('AliasNameShort').' | ';
- print $object->name_alias;
- print " | ";
-
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '| '.$langs->trans('Prefix').' | '.$object->prefix_comm.' | ';
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 6c7d3ef1b35..3765f2f6115 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -1556,7 +1556,7 @@ if ($action=='create')
print '';
// Ref
- print '| '.$langs->trans('Ref').' | '.$langs->trans('Draft').' | ';
+ print '| '.$langs->trans('Ref').' | '.$langs->trans('Draft').' | ';
// Third party
print '| '.$langs->trans('Supplier').' | ';
@@ -1692,7 +1692,11 @@ if ($action=='create')
dol_fiche_end();
- print '';
+ print '';
+ print '';
+ print ' ';
+ print '';
+ print ' ';
print "\n";
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 5dad9e2f706..27b51244d86 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -60,6 +60,7 @@ $confirm = GETPOST("confirm");
$ref = GETPOST('ref','alpha');
$cancel = GETPOST('cancel','alpha');
$lineid = GETPOST('lineid', 'int');
+$projectid = GETPOST('projectid','int');
//PDF
$hidedetails = (GETPOST('hidedetails','int') ? GETPOST('hidedetails','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
@@ -865,7 +866,7 @@ if (empty($reshook))
elseif ($action == 'classin')
{
$object->fetch($id);
- $result=$object->setProject($_POST['projectid']);
+ $result=$object->setProject($projectid);
}
@@ -1374,7 +1375,7 @@ if ($action == 'create')
print '';
// Ref
- print '| '.$langs->trans('Ref').' | '.$langs->trans('Draft').' | ';
+ print '| '.$langs->trans('Ref').' | '.$langs->trans('Draft').' | ';
// Third party
print '| '.$langs->trans('Supplier').' | ';
@@ -1649,7 +1650,11 @@ if ($action == 'create')
dol_fiche_end();
- print '';
+ print '';
+ print '';
+ print ' ';
+ print '';
+ print ' ';
print "\n";
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 1c6db9a50fa..a5a27966948 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -907,6 +907,62 @@ else
}
}
+ // Add button to create objects from project
+ if (! empty($conf->global->PROJECT_SHOW_CREATE_OBJECT_BUTTON))
+ {
+ if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
+ {
+ $langs->load("propal");
+ print '';
+ }
+ if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
+ {
+ $langs->load("orders");
+ print '';
+ }
+ if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
+ {
+ $langs->load("bills");
+ print '';
+ }
+ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer)
+ {
+ $langs->load("supplier_proposal");
+ print '';
+ }
+ if (! empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->creer)
+ {
+ $langs->load("suppliers");
+ print '';
+ }
+ if (! empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->creer)
+ {
+ $langs->load("suppliers");
+ print '';
+ }
+ if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
+ {
+ $langs->load("interventions");
+ print '';
+ }
+ if (! empty($conf->contrat->enabled) && $user->rights->contrat->creer)
+ {
+ $langs->load("contracts");
+ print '';
+ }
+ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->creer)
+ {
+ $langs->load("expensereports");
+ $langs->load("trips");
+ print '';
+ }
+ if (! empty($conf->don->enabled) && $user->rights->don->creer)
+ {
+ $langs->load("donations");
+ print '';
+ }
+ }
+
// Clone
if ($user->rights->projet->creer)
{
@@ -925,7 +981,7 @@ else
{
if ($userDelete > 0)
{
- print '';
+ print '';
}
else
{
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 30a8f87a4fa..955c1c6dd7b 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -189,6 +189,7 @@ $listofreferent=array(
'class'=>'Propal',
'table'=>'propal',
'datefieldname'=>'datep',
+ 'urlnew'=>DOL_URL_ROOT.'/comm/propal.php?action=create&project_id='.$id,
'test'=>$conf->propal->enabled && $user->rights->propale->lire),
'order'=>array(
'name'=>"CustomersOrders",
@@ -196,6 +197,7 @@ $listofreferent=array(
'class'=>'Commande',
'table'=>'commande',
'datefieldname'=>'date_commande',
+ 'urlnew'=>DOL_URL_ROOT.'/commande/card.php?action=create&project_id='.$id,
'test'=>$conf->commande->enabled && $user->rights->commande->lire),
'invoice'=>array(
'name'=>"CustomersInvoices",
@@ -204,6 +206,7 @@ $listofreferent=array(
'margin'=>'add',
'table'=>'facture',
'datefieldname'=>'datef',
+ 'urlnew'=>DOL_URL_ROOT.'/compta/facture/card.php?action=create&project_id='.$id,
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
'invoice_predefined'=>array(
'name'=>"PredefinedInvoices",
@@ -218,7 +221,8 @@ $listofreferent=array(
'class'=>'CommandeFournisseur',
'table'=>'commande_fournisseur',
'datefieldname'=>'date_commande',
- 'test'=>$conf->supplier_order->enabled && $user->rights->fournisseur->commande->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/fourn/commande/card.php?action=create&project_id='.$id,
+ 'test'=>$conf->supplier_order->enabled && $user->rights->fournisseur->commande->lire),
'invoice_supplier'=>array(
'name'=>"BillsSuppliers",
'title'=>"ListSupplierInvoicesAssociatedProject",
@@ -226,7 +230,8 @@ $listofreferent=array(
'margin'=>'minus',
'table'=>'facture_fourn',
'datefieldname'=>'datef',
- 'test'=>$conf->supplier_invoice->enabled && $user->rights->fournisseur->facture->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/fourn/facture/card.php?action=create&project_id='.$id,
+ 'test'=>$conf->supplier_invoice->enabled && $user->rights->fournisseur->facture->lire),
'contract'=>array(
'name'=>"Contracts",
'title'=>"ListContractAssociatedProject",
@@ -241,6 +246,7 @@ $listofreferent=array(
'table'=>'fichinter',
'datefieldname'=>'date_valid',
'disableamount'=>1,
+ 'urlnew'=>DOL_URL_ROOT.'/contract/card.php?action=create&project_id='.$id,
'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
'trip'=>array(
'name'=>"TripsAndExpenses",
@@ -250,7 +256,8 @@ $listofreferent=array(
'datefieldname'=>'dated',
'margin'=>'minus',
'disableamount'=>1,
- 'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/fichinter/card.php?action=create&project_id='.$id,
+ 'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
'expensereport'=>array(
'name'=>"ExpenseReports",
'title'=>"ListExpenseReportsAssociatedProject",
@@ -259,7 +266,8 @@ $listofreferent=array(
'datefieldname'=>'date',
'margin'=>'minus',
'disableamount'=>0,
- 'test'=>$conf->expensereport->enabled && $user->rights->expensereport->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/expensereport/card.php?action=create&project_id='.$id,
+ 'test'=>$conf->expensereport->enabled && $user->rights->expensereport->lire),
'agenda'=>array(
'name'=>"Agenda",
'title'=>"ListActionsAssociatedProject",
@@ -267,7 +275,8 @@ $listofreferent=array(
'table'=>'actioncomm',
'datefieldname'=>'datep',
'disableamount'=>1,
- 'test'=>$conf->agenda->enabled && $user->rights->agenda->allactions->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/action/comm/card.php?action=create&project_id='.$id,
+ 'test'=>$conf->agenda->enabled && $user->rights->agenda->allactions->lire),
'donation'=>array(
'name'=>"Donation",
'title'=>"ListDonationsAssociatedProject",
@@ -276,7 +285,8 @@ $listofreferent=array(
'table'=>'don',
'datefieldname'=>'datedon',
'disableamount'=>0,
- 'test'=>$conf->don->enabled && $user->rights->don->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/donation/card.php?action=create&project_id='.$id,
+ 'test'=>$conf->don->enabled && $user->rights->don->lire),
'project_task'=>array(
'name'=>"TaskTimeValorised",
'title'=>"ListTaskTimeUserProject",
@@ -501,7 +511,8 @@ foreach ($listofreferent as $key => $value)
$tablename=$value['table'];
$datefieldname=$value['datefieldname'];
$qualified=$value['test'];
-
+ $urlnew=$value['urlnew'];
+
if ($qualified)
{
// If we want the project task array to have details of users
@@ -524,7 +535,7 @@ foreach ($listofreferent as $key => $value)
elseif($selectList)
{
// Define form with the combo list of elements to link
- $addform.='';
}
}
-
+ /*if (empty($conf->global->PROJECT_CREATE_ELEM_DISABLE) && $urlnew) // Not yet ready. Use instead button on project card
+ {
+ $addform.='';
+ $addform.=' '.$langs->trans("Create").'';
+ $addform.=' ';
+ }*/
+
print load_fiche_titre($langs->trans($title), $addform, '');
print ' ';
diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php
index 4bf8616e721..08d2bdd7a8b 100644
--- a/htdocs/societe/commerciaux.php
+++ b/htdocs/societe/commerciaux.php
@@ -122,7 +122,7 @@ if (! empty($socid))
print '';
print '';
- print '| '.$langs->trans('CustomerCode').' | global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
+ print ' | '.$langs->trans('CustomerCode').' | global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
print $object->code_client;
if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
print ' | ';
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 8da096519d0..7a25b6454c0 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -959,7 +959,7 @@ else
print '';
// Name, firstname
- print '| ';
+ print ' | ';
if ($object->particulier || $private)
{
print ''.$langs->trans('LastName','name').'';
@@ -1934,7 +1934,7 @@ else
print '';
// Prospect/Customer
- print '| '.$langs->trans('ProspectCustomer').' | ';
+ print ' | | '.$langs->trans('ProspectCustomer').' | ';
print $object->getLibCustProspStatut();
print ' | ';
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 08abf28b9c6..d49c599a4ee 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -568,16 +568,21 @@ div.myavailability {
.maxwidth300 { max-width: 300px; }
.maxwidth400 { max-width: 400px; }
.maxwidth500 { max-width: 500px; }
-.titlefield { width: 30%; }
-
-.hideonsmartphone { display: none; }
-.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
-.maxwidthonsmartphone { max-width: 100px; }
-.maxwidth100onsmartphone { max-width: 100px; }
-.maxwidth200onsmartphone { max-width: 200px; }
-.maxwidth300onsmartphone { max-width: 300px; }
-.titlefield { width: auto; }
-
+.titlefield { width: 25%; }
+.titlefieldcreate { width: 20%; }
+
+/* Force values for small screen */
+@media only screen and (max-width: 570px)
+{
+ .hideonsmartphone { display: none; }
+ .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
+ .maxwidthonsmartphone { max-width: 100px; }
+ .maxwidth100onsmartphone { max-width: 100px; }
+ .maxwidth200onsmartphone { max-width: 200px; }
+ .maxwidth300onsmartphone { max-width: 300px; }
+ .titlefield { width: auto; }
+ .titlefieldcreate { width: auto; }
+}
.linkobject { cursor: pointer; }
.hideonprint { display: none; }
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 15d80b5b05b..2456e754a8f 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -560,15 +560,20 @@ div.myavailability {
.maxwidth400 { max-width: 400px; }
.maxwidth500 { max-width: 500px; }
.titlefield { width: 30%; }
-
-.hideonsmartphone { display: none; }
-.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
-.maxwidthonsmartphone { max-width: 100px; }
-.maxwidth100onsmartphone { max-width: 100px; }
-.maxwidth200onsmartphone { max-width: 200px; }
-.maxwidth300onsmartphone { max-width: 300px; }
-.titlefield { width: auto; }
-
+.titlefieldcreate { width: 20%; }
+
+/* Force values for small screen */
+@media only screen and (max-width: 570px)
+{
+ .hideonsmartphone { display: none; }
+ .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
+ .maxwidthonsmartphone { max-width: 100px; }
+ .maxwidth100onsmartphone { max-width: 100px; }
+ .maxwidth200onsmartphone { max-width: 200px; }
+ .maxwidth300onsmartphone { max-width: 300px; }
+ .titlefield { width: auto; }
+ .titlefieldcreate { width: auto; }
+}
.linkobject { cursor: pointer; }
.hideonprint { display: none; }
| | |