diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php
index d161fe0387083d413420081d7568e7d5ed97f105..57181b83f6ba9d8b745f5288458dbb94fd0f392b 100644
--- a/htdocs/comm/propal/note.php
+++ b/htdocs/comm/propal/note.php
@@ -132,9 +132,9 @@ if ($id > 0 || ! empty($ref))
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
+ $cssclass="titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
- print '</div>';
print '</div>';
dol_fiche_end();
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index c451b2e32fdbd68d973fc3ad509bbcefd0b84fb9..81de34e012fcf48b991b03260a54687c76211523 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -282,6 +282,7 @@ class Conf
// Define default dir_output and dir_temp for directories of modules
foreach($this->modules as $module)
{
+ //var_dump($module);
// For multicompany sharings
$this->$module->multidir_output = array($this->entity => $rootfordata."/".$module);
$this->$module->multidir_temp = array($this->entity => $rootfordata."/".$module."/temp");
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index ad59235993690f3a196a4dab04bd0e91b0248f2c..09f89ba0c3fe08069f6effaf3a35f36c2b8eb94e 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -239,7 +239,7 @@ function show_array_actions_to_do($max=5)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("LastActionsToDo",$max).'</td>';
- print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
+ print '<td colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
print '</tr>';
$var = true;
@@ -336,7 +336,7 @@ function show_array_last_actions_done($max=5)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("LastDoneTasks",$max).'</td>';
- print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
+ print '<td colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
print '</tr>';
$var = true;
$i = 0;
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 5126768c083a338e88ff7642a2c5a0a047e9aeda..9d01643825af4042d6a287532389a4c8c6e3eb98 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -407,10 +407,11 @@ if ($result)
print $warnornote;
print '</td>';
}
+
// Other picto tool
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
$filename=dol_sanitizeFileName($obj->ref);
- $filedir=$conf->fichinter->dir_output . '/' . dol_sanitizeFileName($obj->ref);
+ $filedir=$conf->ficheinter->dir_output . '/' . dol_sanitizeFileName($obj->ref);
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
print '</td></tr></table>';
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 443e402674fecc7eaec9abb6ea918fd5d82801bb..d91823dfcf42225c40154500a6942380914bccd7 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1408,17 +1408,6 @@ if ($action == 'create')
print '<table class="border" width="100%">';
- // Ref
- /*
- print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td><td colspan="5">';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
- print '</td></tr>';
-
- // Company
- print '<tr><td>' . $langs->trans('Supplier') . '</td><td colspan="5">' . $soc->getNomUrl(1) . '</td>';
- print '</tr>';
- */
-
// Payment term
print '<tr><td class="titlefield">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php
index d8c51a4515243f06e9a9337289257d462d305b68..2f49951c84488b74ca97f30144a5699d97b5f6ec 100644
--- a/htdocs/supplier_proposal/document.php
+++ b/htdocs/supplier_proposal/document.php
@@ -93,26 +93,70 @@ if ($object->id > 0)
$totalsize+=$file['size'];
}
- print '<table class="border"width="100%">';
-
- $linkback='<a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
- // Ref
- print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
- print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
- print '</td></tr>';
+ // Supplier proposal card
+ $linkback = '<a href="' . DOL_URL_ROOT . '/supplier_proposal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
+
+
+ $morehtmlref='<div class="refidno">';
+ // Ref supplier
+ //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+ //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
+ if ($user->rights->supplier_proposal->creer)
+ {
+ if ($action != 'classify')
+ //$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
+ $morehtmlref.='<input type="hidden" name="action" value="classin">';
+ $morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
+ $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
+ $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
+ $morehtmlref.='</form>';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='</a>';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+ }
+ $morehtmlref.='</div>';
+
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ print '<div class="fichecenter">';
+ print '<div class="underbanner clearboth"></div>';
- // Supplier
- print "<tr><td>".$langs->trans("Supplier")."</td>";
- print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
+ print '<table class="border"width="100%">';
- print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
- print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
+ print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td>'.count($filearray).'</td></tr>';
+ print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td>'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';
print '</div>';
-
+
+ dol_fiche_end();
+
$modulepart = 'supplier_proposal';
$permission = $user->rights->supplier_proposal->creer;
$permtoedit = $user->rights->supplier_proposal->creer;
diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php
index 9c3f8967bd5f4b932d298114e16c0b92e328fc60..de98ed5be656484811530a8c49ee695d4bfc5654 100644
--- a/htdocs/supplier_proposal/info.php
+++ b/htdocs/supplier_proposal/info.php
@@ -49,10 +49,65 @@ $object = new SupplierProposal($db);
$object->fetch($id);
$object->fetch_thirdparty();
+$object->info($object->id);
+
+
$head = supplier_proposal_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans('CommRequest'), 0, 'supplier_proposal');
-$object->info($object->id);
+// Supplier proposal card
+$linkback = '<a href="' . DOL_URL_ROOT . '/supplier_proposal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
+
+
+$morehtmlref='<div class="refidno">';
+// Ref supplier
+//$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+//$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+// Thirdparty
+$morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+// Project
+if (! empty($conf->projet->enabled))
+{
+ $langs->load("projects");
+ $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
+ if ($user->rights->supplier_proposal->creer)
+ {
+ if ($action != 'classify')
+ //$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
+ $morehtmlref.='<input type="hidden" name="action" value="classin">';
+ $morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
+ $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
+ $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
+ $morehtmlref.='</form>';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='</a>';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+}
+$morehtmlref.='</div>';
+
+
+dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+print '<div class="fichecenter">';
+print '<div class="underbanner clearboth"></div>';
+
+print '<br>';
print '<table width="100%"><tr><td>';
dol_print_object_info($object);
@@ -60,6 +115,7 @@ print '</td></tr></table>';
print '</div>';
+dol_fiche_end();
llxFooter();
$db->close();
diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php
index 981b654599d350666c55222d156804e76520834a..b764372848dde4258e19377ea30c693e73998eb9 100644
--- a/htdocs/supplier_proposal/note.php
+++ b/htdocs/supplier_proposal/note.php
@@ -45,19 +45,18 @@ $object = new SupplierProposal($db);
-/******************************************************************************/
-/* Actions */
-/******************************************************************************/
+/*
+ * Actions
+ */
$permissionnote=$user->rights->supplier_proposal->creer; // Used by the include of actions_setnotes.inc.php
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
-
-/******************************************************************************/
-/* Affichage fiche */
-/******************************************************************************/
+/*
+ * View
+ */
llxHeader('',$langs->trans('CommRequest'),'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur');
@@ -71,47 +70,71 @@ if ($id > 0 || ! empty($ref))
if ($object->fetch($id, $ref))
{
+ $object->fetch_thirdparty();
+
$societe = new Societe($db);
if ( $societe->fetch($object->socid) )
{
$head = supplier_proposal_prepare_head($object);
dol_fiche_head($head, 'note', $langs->trans('CommRequest'), 0, 'supplier_proposal');
- print '<table class="border" width="100%">';
- $linkback = '<a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans('BackToList').'</a>';
-
- // Ref
- print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
- print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
- print '</td></tr>';
+ // Supplier proposal card
+ $linkback = '<a href="' . DOL_URL_ROOT . '/supplier_proposal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
- // Customer
- if ( is_null($object->thirdparty) )
- $object->fetch_thirdparty();
- print "<tr><td>".$langs->trans("Supplier")."</td>";
- print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
- // Payment term
- print '<tr><td>';
- print '<table class="nobordernopadding" width="100%"><tr><td>';
- print $langs->trans('PaymentConditionsShort');
- print '</td>';
- print '</tr></table>';
- print '</td><td colspan="3">';
- $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none', 1);
- print '</td>';
- print '</tr>';
- print '<tr><td>'.$langs->trans('SupplierProposalDate').'</td><td colspan="3">';
- print dol_print_date($object->date_livraison,'daytext');
- print '</td>';
- print '</tr>';
+ $morehtmlref='<div class="refidno">';
+ // Ref supplier
+ //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
+ //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ // Project
+ if (! empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
+ if ($user->rights->supplier_proposal->creer)
+ {
+ if ($action != 'classify')
+ //$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
+ $morehtmlref.='<input type="hidden" name="action" value="classin">';
+ $morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
+ $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
+ $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
+ $morehtmlref.='</form>';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='</a>';
+ } else {
+ $morehtmlref.='';
+ }
+ }
+ }
+ $morehtmlref.='</div>';
- print "</table>";
-
- print '<br>';
-
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ print '<div class="fichecenter">';
+ print '<div class="underbanner clearboth"></div>';
+
+ $cssclass="titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
+
+ print '</div>';
dol_fiche_end();
}
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index ec4ccdd2b385b98f37848c911a2426ec0be54c36..0e278019df6bc62ecc25cee952b2de7bdeda5db5 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -254,6 +254,7 @@ a.tab { font-weight: bold !important; }
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: normal; color: rgb(<?php print $colortextlink; ?>); text-decoration: none; }
a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); }
+a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; }
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
background-color: #FFF;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 17eec13037768166f95207c9629c8069ab4afebc..f45b0355880486872cd0ab3ceaba4537bd80e891 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -254,6 +254,7 @@ a.tab { font-weight: bold !important; }
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: normal; color: rgb(<?php print $colortextlink; ?>); text-decoration: none; }
a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); }
+a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; }
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
background-color: #FDFDFD;