Restore button to create object from the project view.
This commit is contained in:
parent
1d700cd286
commit
5101c96223
@ -649,14 +649,14 @@ if ($action == 'create')
|
|||||||
// Type of event
|
// Type of event
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
{
|
{
|
||||||
print '<tr><td width="30%"><span class="fieldrequired">'.$langs->trans("Type").'</span></b></td><td>';
|
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Type").'</span></b></td><td>';
|
||||||
$default=(empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)?'':$conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT);
|
$default=(empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)?'':$conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT);
|
||||||
$formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):($object->type_code?$object->type_code:$default), "actioncode", "systemauto", 0, -1);
|
$formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):($object->type_code?$object->type_code:$default), "actioncode", "systemauto", 0, -1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").'</td><td><input type="text" id="label" name="label" class="soixantepercent" value="'.GETPOST('label').'"></td></tr>';
|
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired titlefieldcreate"':'').'>'.$langs->trans("Title").'</td><td><input type="text" id="label" name="label" class="soixantepercent" value="'.GETPOST('label').'"></td></tr>';
|
||||||
|
|
||||||
// Full day
|
// Full day
|
||||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked':'').'></td></tr>';
|
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked':'').'></td></tr>';
|
||||||
@ -664,7 +664,7 @@ if ($action == 'create')
|
|||||||
// Date start
|
// Date start
|
||||||
$datep=($datep?$datep:$object->datep);
|
$datep=($datep?$datep:$object->datep);
|
||||||
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
|
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
|
||||||
print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>';
|
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>';
|
||||||
if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
|
if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
|
||||||
else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
|
else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||||
else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||||
@ -684,7 +684,7 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td width="10%">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
|
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$percent=-1;
|
$percent=-1;
|
||||||
if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status');
|
if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status');
|
||||||
@ -743,7 +743,7 @@ if ($action == 'create')
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Societe, contact
|
// Societe, contact
|
||||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionOnCompany").'</td><td>';
|
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ActionOnCompany").'</td><td>';
|
||||||
if (GETPOST('socid','int') > 0)
|
if (GETPOST('socid','int') > 0)
|
||||||
{
|
{
|
||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
@ -834,7 +834,7 @@ if ($action == 'create')
|
|||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="button" class="button" name="cancel" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|||||||
@ -307,7 +307,7 @@ if ($action == 'create')
|
|||||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Date").'</td><td>';
|
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Date").'</td><td>';
|
||||||
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
|
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ if ($action == 'create')
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td width="25%"><label for="selectcountry_id">'.$langs->trans('Country').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td><label for="selectcountry_id">'.$langs->trans('Country').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print $form->select_country(GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id);
|
print $form->select_country(GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id);
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -382,7 +382,11 @@ if ($action == 'create')
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
print '<div class="center">';
|
||||||
|
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||||
|
print ' ';
|
||||||
|
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1054,7 +1054,7 @@ if ($action == 'create')
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<input type="hidden" name="socid" value='.$soc->id.'>';
|
print '<input type="hidden" name="socid" value='.$soc->id.'>';
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("ThirdParty").'</td><td>'.$soc->getNomUrl(1).'</td></tr>';
|
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("ThirdParty").'</td><td>'.$soc->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
@ -1159,6 +1159,8 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("CreateDraftIntervention").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("CreateDraftIntervention").'">';
|
||||||
|
print ' ';
|
||||||
|
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@ -16,8 +16,8 @@ Rendez-Vous=Rendezvous
|
|||||||
ConfirmDeleteAction=Are you sure you want to delete this event ?
|
ConfirmDeleteAction=Are you sure you want to delete this event ?
|
||||||
CardAction=Event card
|
CardAction=Event card
|
||||||
PercentDone=Percentage complete
|
PercentDone=Percentage complete
|
||||||
ActionOnCompany=Task about company
|
ActionOnCompany=Event about company
|
||||||
ActionOnContact=Task about contact
|
ActionOnContact=Event about contact
|
||||||
TaskRDV=Meetings
|
TaskRDV=Meetings
|
||||||
TaskRDVWith=Meeting with %s
|
TaskRDVWith=Meeting with %s
|
||||||
ShowTask=Show task
|
ShowTask=Show task
|
||||||
|
|||||||
@ -90,7 +90,7 @@ $object = new Project($db);
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=$object->socid;
|
||||||
if ($user->societe_id > 0) $socid=$user->societe_id;
|
if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'projet', $projectid, 'projet&project');
|
$result = restrictedArea($user, 'projet', $projectid, 'projet&project');
|
||||||
|
|
||||||
@ -189,7 +189,10 @@ $listofreferent=array(
|
|||||||
'class'=>'Propal',
|
'class'=>'Propal',
|
||||||
'table'=>'propal',
|
'table'=>'propal',
|
||||||
'datefieldname'=>'datep',
|
'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),
|
'test'=>$conf->propal->enabled && $user->rights->propale->lire),
|
||||||
'order'=>array(
|
'order'=>array(
|
||||||
'name'=>"CustomersOrders",
|
'name'=>"CustomersOrders",
|
||||||
@ -197,8 +200,11 @@ $listofreferent=array(
|
|||||||
'class'=>'Commande',
|
'class'=>'Commande',
|
||||||
'table'=>'commande',
|
'table'=>'commande',
|
||||||
'datefieldname'=>'date_commande',
|
'datefieldname'=>'date_commande',
|
||||||
'urlnew'=>DOL_URL_ROOT.'/commande/card.php?action=create&project_id='.$id,
|
'urlnew'=>DOL_URL_ROOT.'/commande/card.php?action=create&projectid='.$id.'&socid='.$socid,
|
||||||
'test'=>$conf->commande->enabled && $user->rights->commande->lire),
|
'lang'=>'orders',
|
||||||
|
'buttonnew'=>'CreateOrder',
|
||||||
|
'testnew'=>$user->rights->commande->creer,
|
||||||
|
'test'=>$conf->commande->enabled && $user->rights->commande->lire),
|
||||||
'invoice'=>array(
|
'invoice'=>array(
|
||||||
'name'=>"CustomersInvoices",
|
'name'=>"CustomersInvoices",
|
||||||
'title'=>"ListInvoicesAssociatedProject",
|
'title'=>"ListInvoicesAssociatedProject",
|
||||||
@ -206,22 +212,43 @@ $listofreferent=array(
|
|||||||
'margin'=>'add',
|
'margin'=>'add',
|
||||||
'table'=>'facture',
|
'table'=>'facture',
|
||||||
'datefieldname'=>'datef',
|
'datefieldname'=>'datef',
|
||||||
'urlnew'=>DOL_URL_ROOT.'/compta/facture/card.php?action=create&project_id='.$id,
|
'urlnew'=>DOL_URL_ROOT.'/compta/facture.php?action=create&projectid='.$id.'&socid='.$socid,
|
||||||
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
|
'lang'=>'bills',
|
||||||
|
'buttonnew'=>'CreateBill',
|
||||||
|
'testnew'=>$user->rights->facture->creer,
|
||||||
|
'test'=>$conf->facture->enabled && $user->rights->facture->lire),
|
||||||
'invoice_predefined'=>array(
|
'invoice_predefined'=>array(
|
||||||
'name'=>"PredefinedInvoices",
|
'name'=>"PredefinedInvoices",
|
||||||
'title'=>"ListPredefinedInvoicesAssociatedProject",
|
'title'=>"ListPredefinedInvoicesAssociatedProject",
|
||||||
'class'=>'FactureRec',
|
'class'=>'FactureRec',
|
||||||
'table'=>'facture_rec',
|
'table'=>'facture_rec',
|
||||||
'datefieldname'=>'datec',
|
'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(
|
'order_supplier'=>array(
|
||||||
'name'=>"SuppliersOrders",
|
'name'=>"SuppliersOrders",
|
||||||
'title'=>"ListSupplierOrdersAssociatedProject",
|
'title'=>"ListSupplierOrdersAssociatedProject",
|
||||||
'class'=>'CommandeFournisseur',
|
'class'=>'CommandeFournisseur',
|
||||||
'table'=>'commande_fournisseur',
|
'table'=>'commande_fournisseur',
|
||||||
'datefieldname'=>'date_commande',
|
'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),
|
'test'=>$conf->supplier_order->enabled && $user->rights->fournisseur->commande->lire),
|
||||||
'invoice_supplier'=>array(
|
'invoice_supplier'=>array(
|
||||||
'name'=>"BillsSuppliers",
|
'name'=>"BillsSuppliers",
|
||||||
@ -230,7 +257,10 @@ $listofreferent=array(
|
|||||||
'margin'=>'minus',
|
'margin'=>'minus',
|
||||||
'table'=>'facture_fourn',
|
'table'=>'facture_fourn',
|
||||||
'datefieldname'=>'datef',
|
'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),
|
'test'=>$conf->supplier_invoice->enabled && $user->rights->fournisseur->facture->lire),
|
||||||
'contract'=>array(
|
'contract'=>array(
|
||||||
'name'=>"Contracts",
|
'name'=>"Contracts",
|
||||||
@ -238,7 +268,11 @@ $listofreferent=array(
|
|||||||
'class'=>'Contrat',
|
'class'=>'Contrat',
|
||||||
'table'=>'contrat',
|
'table'=>'contrat',
|
||||||
'datefieldname'=>'date_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(
|
'intervention'=>array(
|
||||||
'name'=>"Interventions",
|
'name'=>"Interventions",
|
||||||
'title'=>"ListFichinterAssociatedProject",
|
'title'=>"ListFichinterAssociatedProject",
|
||||||
@ -246,8 +280,11 @@ $listofreferent=array(
|
|||||||
'table'=>'fichinter',
|
'table'=>'fichinter',
|
||||||
'datefieldname'=>'date_valid',
|
'datefieldname'=>'date_valid',
|
||||||
'disableamount'=>1,
|
'disableamount'=>1,
|
||||||
'urlnew'=>DOL_URL_ROOT.'/contract/card.php?action=create&project_id='.$id,
|
'urlnew'=>DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$id.'&socid='.$socid,
|
||||||
'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
|
'lang'=>'interventions',
|
||||||
|
'buttonnew'=>'AddIntervention',
|
||||||
|
'testnew'=>$user->rights->ficheinter->creer,
|
||||||
|
'test'=>$conf->ficheinter->enabled && $user->rights->ficheinter->lire),
|
||||||
'trip'=>array(
|
'trip'=>array(
|
||||||
'name'=>"TripsAndExpenses",
|
'name'=>"TripsAndExpenses",
|
||||||
'title'=>"ListExpenseReportsAssociatedProject",
|
'title'=>"ListExpenseReportsAssociatedProject",
|
||||||
@ -256,7 +293,10 @@ $listofreferent=array(
|
|||||||
'datefieldname'=>'dated',
|
'datefieldname'=>'dated',
|
||||||
'margin'=>'minus',
|
'margin'=>'minus',
|
||||||
'disableamount'=>1,
|
'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),
|
'test'=>$conf->deplacement->enabled && $user->rights->deplacement->lire),
|
||||||
'expensereport'=>array(
|
'expensereport'=>array(
|
||||||
'name'=>"ExpenseReports",
|
'name'=>"ExpenseReports",
|
||||||
@ -266,17 +306,11 @@ $listofreferent=array(
|
|||||||
'datefieldname'=>'date',
|
'datefieldname'=>'date',
|
||||||
'margin'=>'minus',
|
'margin'=>'minus',
|
||||||
'disableamount'=>0,
|
'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),
|
'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(
|
'donation'=>array(
|
||||||
'name'=>"Donation",
|
'name'=>"Donation",
|
||||||
'title'=>"ListDonationsAssociatedProject",
|
'title'=>"ListDonationsAssociatedProject",
|
||||||
@ -285,8 +319,23 @@ $listofreferent=array(
|
|||||||
'table'=>'don',
|
'table'=>'don',
|
||||||
'datefieldname'=>'datedon',
|
'datefieldname'=>'datedon',
|
||||||
'disableamount'=>0,
|
'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),
|
'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(
|
'project_task'=>array(
|
||||||
'name'=>"TaskTimeValorised",
|
'name'=>"TaskTimeValorised",
|
||||||
'title'=>"ListTaskTimeUserProject",
|
'title'=>"ListTaskTimeUserProject",
|
||||||
@ -295,7 +344,7 @@ $listofreferent=array(
|
|||||||
'table'=>'projet_task',
|
'table'=>'projet_task',
|
||||||
'datefieldname'=>'task_date',
|
'datefieldname'=>'task_date',
|
||||||
'disableamount'=>0,
|
'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")
|
if ($action=="addelement")
|
||||||
@ -511,13 +560,18 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$tablename=$value['table'];
|
$tablename=$value['table'];
|
||||||
$datefieldname=$value['datefieldname'];
|
$datefieldname=$value['datefieldname'];
|
||||||
$qualified=$value['test'];
|
$qualified=$value['test'];
|
||||||
$urlnew=$value['urlnew'];
|
$langtoload=$value['lang'];
|
||||||
|
$urlnew=$value['urlnew'];
|
||||||
|
$buttonnew=$value['buttonnew'];
|
||||||
|
$testnew=$value['testnew'];
|
||||||
|
|
||||||
if ($qualified)
|
if ($qualified)
|
||||||
{
|
{
|
||||||
// If we want the project task array to have details of users
|
// If we want the project task array to have details of users
|
||||||
//if ($key == 'project_task') $key = 'project_task_time';
|
//if ($key == 'project_task') $key = 'project_task_time';
|
||||||
|
|
||||||
|
if ($langtoload) $langs->load($langtoload);
|
||||||
|
|
||||||
$element = new $classname($db);
|
$element = new $classname($db);
|
||||||
|
|
||||||
$addform='';
|
$addform='';
|
||||||
@ -525,7 +579,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$idtofilterthirdparty=0;
|
$idtofilterthirdparty=0;
|
||||||
if (! in_array($tablename, array('facture_fourn', 'commande_fourn'))) $idtofilterthirdparty=$object->thirdparty->id;
|
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');
|
$selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300');
|
||||||
if (! $selectList || ($selectList<0))
|
if (! $selectList || ($selectList<0))
|
||||||
@ -535,7 +589,8 @@ foreach ($listofreferent as $key => $value)
|
|||||||
elseif($selectList)
|
elseif($selectList)
|
||||||
{
|
{
|
||||||
// Define form with the combo list of elements to link
|
// Define form with the combo list of elements to link
|
||||||
$addform.='<form class="inline-block" action="'.$_SERVER["PHP_SELF"].'?id='.$projectid.'" method="post">';
|
$addform.='<div class="inline-block valignmiddle">';
|
||||||
|
$addform.='<form action="'.$_SERVER["PHP_SELF"].'?id='.$projectid.'" method="post">';
|
||||||
$addform.='<input type="hidden" name="tablename" value="'.$tablename.'">';
|
$addform.='<input type="hidden" name="tablename" value="'.$tablename.'">';
|
||||||
$addform.='<input type="hidden" name="action" value="addelement">';
|
$addform.='<input type="hidden" name="action" value="addelement">';
|
||||||
$addform.='<input type="hidden" name="datesrfc" value="'.dol_print_date($dates,'dayhourrfc').'">';
|
$addform.='<input type="hidden" name="datesrfc" value="'.dol_print_date($dates,'dayhourrfc').'">';
|
||||||
@ -545,14 +600,16 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$addform.='<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("AddElement")).'"></td>';
|
$addform.='<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("AddElement")).'"></td>';
|
||||||
$addform.='</tr></table>';
|
$addform.='</tr></table>';
|
||||||
$addform.='</form>';
|
$addform.='</form>';
|
||||||
|
$addform.='</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*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.='<div class="inline-block">';
|
$addform.='<div class="inline-block valignmiddle">';
|
||||||
$addform.='<a class="button" href="'.$urlnew.'">'.$langs->trans("Create").'</a>';
|
if ($testnew) $addform.='<a class="buttonxxx" href="'.$urlnew.'">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</a>';
|
||||||
|
else $addform.='<a class="buttonxxx buttonRefused" disabled="disabled" href="#">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</a>';
|
||||||
$addform.='<div>';
|
$addform.='<div>';
|
||||||
}*/
|
}
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans($title), $addform, '');
|
print load_fiche_titre($langs->trans($title), $addform, '');
|
||||||
|
|
||||||
|
|||||||
@ -355,7 +355,8 @@ fieldset { border: 1px solid #AAAAAA !important; box-shadow: 2px 2px 3px #DDD; }
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #333333;
|
color: #333333 !important;
|
||||||
|
text-decoration: none !important;
|
||||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
||||||
@ -432,6 +433,9 @@ th .button {
|
|||||||
.maxwidthsearch { /* Max width of column with the search picto */
|
.maxwidthsearch { /* Max width of column with the search picto */
|
||||||
width: 54px;
|
width: 54px;
|
||||||
}
|
}
|
||||||
|
.valigntop {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
.valignmiddle {
|
.valignmiddle {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -422,6 +422,9 @@ th .button {
|
|||||||
width: 54px;
|
width: 54px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.valigntop {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
.valignmiddle {
|
.valignmiddle {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
@ -1828,7 +1831,8 @@ span.butAction, span.butActionDelete {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #333333;
|
color: #333333 !important;
|
||||||
|
text-decoration: none !important;
|
||||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user