diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 991e0c4a148..29f29a7e8cd 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -649,14 +649,14 @@ if ($action == 'create')
// Type of event
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
- print '
| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
print '';
$percent=-1;
if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status');
@@ -743,7 +743,7 @@ if ($action == 'create')
print '';
// Societe, contact
- print '| '.$langs->trans("ActionOnCompany").' | ';
+ print ' | | '.$langs->trans("ActionOnCompany").' | ';
if (GETPOST('socid','int') > 0)
{
$societe = new Societe($db);
@@ -834,7 +834,7 @@ if ($action == 'create')
print ' ';
print '';
print ' ';
- print '';
+ print '';
print ' ';
print "";
diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index 43f675ea0e9..cd8a2e174f8 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -307,7 +307,7 @@ if ($action == 'create')
if (! empty($conf->projet->enabled)) $nbrows++;
// Date
- print ' | | '.$langs->trans("Date").' | ';
+ print ' | | '.$langs->trans("Date").' | ';
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
print ' | ';
@@ -332,7 +332,7 @@ if ($action == 'create')
print ' ';
// Country
- print ' | ';
+ print ' | | ';
print $form->select_country(GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print ' | ';
@@ -382,7 +382,11 @@ if ($action == 'create')
dol_fiche_end();
- print ' ';
+ print '';
+ print '';
+ print ' ';
+ print '';
+ print ' ';
print "\n";
}
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 964b5f648b1..08d380b0ae4 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1054,7 +1054,7 @@ if ($action == 'create')
print '';
print '';
- print '| '.$langs->trans("ThirdParty").' | '.$soc->getNomUrl(1).' | ';
+ print '| '.$langs->trans("ThirdParty").' | '.$soc->getNomUrl(1).' | ';
print '';
@@ -1159,6 +1159,8 @@ if ($action == 'create')
print '';
print '';
+ print ' ';
+ print '';
print ' ';
print '';
diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang
index 3397af6fc17..a5795c402ae 100644
--- a/htdocs/langs/en_US/commercial.lang
+++ b/htdocs/langs/en_US/commercial.lang
@@ -16,8 +16,8 @@ Rendez-Vous=Rendezvous
ConfirmDeleteAction=Are you sure you want to delete this event ?
CardAction=Event card
PercentDone=Percentage complete
-ActionOnCompany=Task about company
-ActionOnContact=Task about contact
+ActionOnCompany=Event about company
+ActionOnContact=Event about contact
TaskRDV=Meetings
TaskRDVWith=Meeting with %s
ShowTask=Show task
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 672a6f80ced..84c72afc7a0 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -90,7 +90,7 @@ $object = new Project($db);
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
// Security check
-$socid=0;
+$socid=$object->socid;
if ($user->societe_id > 0) $socid=$user->societe_id;
$result = restrictedArea($user, 'projet', $projectid, 'projet&project');
@@ -189,7 +189,10 @@ $listofreferent=array(
'class'=>'Propal',
'table'=>'propal',
'datefieldname'=>'datep',
- 'urlnew'=>DOL_URL_ROOT.'/comm/propal.php?action=create&project_id='.$id,
+ 'urlnew'=>DOL_URL_ROOT.'/comm/propal.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'propal',
+ 'buttonnew'=>'AddProp',
+ 'testnew'=>$user->rights->propal->creer,
'test'=>$conf->propal->enabled && $user->rights->propale->lire),
'order'=>array(
'name'=>"CustomersOrders",
@@ -197,8 +200,11 @@ $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),
+ 'urlnew'=>DOL_URL_ROOT.'/commande/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'orders',
+ 'buttonnew'=>'CreateOrder',
+ 'testnew'=>$user->rights->commande->creer,
+ 'test'=>$conf->commande->enabled && $user->rights->commande->lire),
'invoice'=>array(
'name'=>"CustomersInvoices",
'title'=>"ListInvoicesAssociatedProject",
@@ -206,22 +212,43 @@ $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),
+ 'urlnew'=>DOL_URL_ROOT.'/compta/facture.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'bills',
+ 'buttonnew'=>'CreateBill',
+ 'testnew'=>$user->rights->facture->creer,
+ 'test'=>$conf->facture->enabled && $user->rights->facture->lire),
'invoice_predefined'=>array(
'name'=>"PredefinedInvoices",
'title'=>"ListPredefinedInvoicesAssociatedProject",
'class'=>'FactureRec',
'table'=>'facture_rec',
'datefieldname'=>'datec',
- 'test'=>$conf->facture->enabled && $user->rights->facture->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/compta/facture.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'bills',
+ 'buttonnew'=>'CreateBill',
+ 'testnew'=>$user->rights->facture->creer,
+ 'test'=>$conf->facture->enabled && $user->rights->facture->lire),
+'proposal_supplier'=>array(
+ 'name'=>"SuppliersOrders",
+ 'title'=>"ListSupplierOrdersAssociatedProject",
+ 'class'=>'CommandeFournisseur',
+ 'table'=>'commande_fournisseur',
+ 'datefieldname'=>'date_commande',
+ 'urlnew'=>DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'supplier_proposal',
+ 'buttonnew'=>'AddSupplierProposal',
+ 'testnew'=>$user->rights->supplier_proposal->creer,
+ 'test'=>$conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire),
'order_supplier'=>array(
'name'=>"SuppliersOrders",
'title'=>"ListSupplierOrdersAssociatedProject",
'class'=>'CommandeFournisseur',
'table'=>'commande_fournisseur',
'datefieldname'=>'date_commande',
- 'urlnew'=>DOL_URL_ROOT.'/fourn/commande/card.php?action=create&project_id='.$id,
+ 'urlnew'=>DOL_URL_ROOT.'/fourn/commande/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'suppliers',
+ 'buttonnew'=>'AddSupplierOrder',
+ 'testnew'=>$user->rights->fournisseur->commande->creer,
'test'=>$conf->supplier_order->enabled && $user->rights->fournisseur->commande->lire),
'invoice_supplier'=>array(
'name'=>"BillsSuppliers",
@@ -230,7 +257,10 @@ $listofreferent=array(
'margin'=>'minus',
'table'=>'facture_fourn',
'datefieldname'=>'datef',
- 'urlnew'=>DOL_URL_ROOT.'/fourn/facture/card.php?action=create&project_id='.$id,
+ 'urlnew'=>DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'suppliers',
+ 'buttonnew'=>'AddSupplierInvoice',
+ 'testnew'=>$user->rights->fournisseur->facture->creer,
'test'=>$conf->supplier_invoice->enabled && $user->rights->fournisseur->facture->lire),
'contract'=>array(
'name'=>"Contracts",
@@ -238,7 +268,11 @@ $listofreferent=array(
'class'=>'Contrat',
'table'=>'contrat',
'datefieldname'=>'date_contrat',
- 'test'=>$conf->contrat->enabled && $user->rights->contrat->lire),
+ 'urlnew'=>DOL_URL_ROOT.'/contrat/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'contracts',
+ 'buttonnew'=>'AddContract',
+ 'testnew'=>$user->rights->contrat->creer,
+ 'test'=>$conf->contrat->enabled && $user->rights->contrat->lire),
'intervention'=>array(
'name'=>"Interventions",
'title'=>"ListFichinterAssociatedProject",
@@ -246,8 +280,11 @@ $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),
+ 'urlnew'=>DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'interventions',
+ 'buttonnew'=>'AddIntervention',
+ 'testnew'=>$user->rights->ficheinter->creer,
+ 'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
'trip'=>array(
'name'=>"TripsAndExpenses",
'title'=>"ListExpenseReportsAssociatedProject",
@@ -256,7 +293,10 @@ $listofreferent=array(
'datefieldname'=>'dated',
'margin'=>'minus',
'disableamount'=>1,
- 'urlnew'=>DOL_URL_ROOT.'/fichinter/card.php?action=create&project_id='.$id,
+ 'urlnew'=>DOL_URL_ROOT.'/deplacement/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'trips',
+ 'buttonnew'=>'AddTrip',
+ 'testnew'=>$user->rights->deplacement->creer,
'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
'expensereport'=>array(
'name'=>"ExpenseReports",
@@ -266,17 +306,11 @@ $listofreferent=array(
'datefieldname'=>'date',
'margin'=>'minus',
'disableamount'=>0,
- 'urlnew'=>DOL_URL_ROOT.'/expensereport/card.php?action=create&project_id='.$id,
+ 'urlnew'=>DOL_URL_ROOT.'/expensereport/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'trips',
+ 'buttonnew'=>'AddTrip',
+ 'testnew'=>$user->rights->expensereport->creer,
'test'=>$conf->expensereport->enabled && $user->rights->expensereport->lire),
-'agenda'=>array(
- 'name'=>"Agenda",
- 'title'=>"ListActionsAssociatedProject",
- 'class'=>'ActionComm',
- 'table'=>'actioncomm',
- 'datefieldname'=>'datep',
- 'disableamount'=>1,
- '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",
@@ -285,8 +319,23 @@ $listofreferent=array(
'table'=>'don',
'datefieldname'=>'datedon',
'disableamount'=>0,
- 'urlnew'=>DOL_URL_ROOT.'/donation/card.php?action=create&project_id='.$id,
+ 'urlnew'=>DOL_URL_ROOT.'/don/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'donations',
+ 'buttonnew'=>'AddDonation',
+ 'testnew'=>$user->rights->don->creer,
'test'=>$conf->don->enabled && $user->rights->don->lire),
+'agenda'=>array(
+ 'name'=>"Agenda",
+ 'title'=>"ListActionsAssociatedProject",
+ 'class'=>'ActionComm',
+ 'table'=>'actioncomm',
+ 'datefieldname'=>'datep',
+ 'disableamount'=>1,
+ 'urlnew'=>DOL_URL_ROOT.'/comm/action/card.php?action=create&projectid='.$id.'&socid='.$socid,
+ 'lang'=>'agenda',
+ 'buttonnew'=>'AddEvent',
+ 'testnew'=>$user->rights->agenda->myactions->create,
+ 'test'=>$conf->agenda->enabled && $user->rights->agenda->myactions->read),
'project_task'=>array(
'name'=>"TaskTimeValorised",
'title'=>"ListTaskTimeUserProject",
@@ -295,7 +344,7 @@ $listofreferent=array(
'table'=>'projet_task',
'datefieldname'=>'task_date',
'disableamount'=>0,
- 'test'=>$conf->projet->enabled && $user->rights->projet->lire && $conf->salaries->enabled),
+ 'test'=>$conf->projet->enabled && $user->rights->projet->lire && $conf->salaries->enabled && empty($conf->global->PROJECT_HIDE_TASKS)),
);
if ($action=="addelement")
@@ -511,13 +560,18 @@ foreach ($listofreferent as $key => $value)
$tablename=$value['table'];
$datefieldname=$value['datefieldname'];
$qualified=$value['test'];
- $urlnew=$value['urlnew'];
-
+ $langtoload=$value['lang'];
+ $urlnew=$value['urlnew'];
+ $buttonnew=$value['buttonnew'];
+ $testnew=$value['testnew'];
+
if ($qualified)
{
// If we want the project task array to have details of users
//if ($key == 'project_task') $key = 'project_task_time';
-
+
+ if ($langtoload) $langs->load($langtoload);
+
$element = new $classname($db);
$addform='';
@@ -525,7 +579,7 @@ foreach ($listofreferent as $key => $value)
$idtofilterthirdparty=0;
if (! in_array($tablename, array('facture_fourn', 'commande_fourn'))) $idtofilterthirdparty=$object->thirdparty->id;
- if (empty($conf->global->PROJECT_LINK_DISABLE))
+ if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty > 0)
{
$selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300');
if (! $selectList || ($selectList<0))
@@ -535,7 +589,8 @@ foreach ($listofreferent as $key => $value)
elseif($selectList)
{
// Define form with the combo list of elements to link
- $addform.=' ';
$addform.='';
+ $addform.='';
}
}
- /*if (empty($conf->global->PROJECT_CREATE_ELEM_DISABLE) && $urlnew) // Not yet ready. Use instead button on project card
+ if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew)
{
- $addform.='';
- $addform.=' '.$langs->trans("Create").'';
+ $addform.=' ';
+ if ($testnew) $addform.=' '.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'';
+ else $addform.=' '.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'';
$addform.=' ';
- }*/
+ }
print load_fiche_titre($langs->trans($title), $addform, '');
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 29e2acc1403..8b6b842b980 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -355,7 +355,8 @@ fieldset { border: 1px solid #AAAAAA !important; box-shadow: 2px 2px 3px #DDD; }
margin-top: 0;
text-align: center;
cursor: pointer;
- color: #333333;
+ color: #333333 !important;
+ text-decoration: none !important;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
@@ -432,6 +433,9 @@ th .button {
.maxwidthsearch { /* Max width of column with the search picto */
width: 54px;
}
+.valigntop {
+ vertical-align: top;
+}
.valignmiddle {
vertical-align: middle;
}
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 96ad9f0f872..49b7bd9c5d9 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -422,6 +422,9 @@ th .button {
width: 54px;
}
+.valigntop {
+ vertical-align: top;
+}
.valignmiddle {
vertical-align: middle;
}
@@ -1828,7 +1831,8 @@ span.butAction, span.butActionDelete {
text-align: center;
vertical-align: middle;
cursor: pointer;
- color: #333333;
+ color: #333333 !important;
+ text-decoration: none !important;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|