diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php
index dff2d54a91c..4d9954669eb 100644
--- a/htdocs/core/boxes/box_actions.php
+++ b/htdocs/core/boxes/box_actions.php
@@ -55,6 +55,9 @@ class box_actions extends ModeleBoxes
$this->enabled = isModEnabled('agenda');
$this->hidden = !($user->hasRight('agenda', 'myactions', 'read'));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/comm/action/card.php?action=create';
+ $this->msgNoRecords = 'NoActionsToDo';
}
/**
@@ -173,12 +176,12 @@ class box_actions extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoActionsToDo").''
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoActionsToDo").''
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_boms.php b/htdocs/core/boxes/box_boms.php
index e5c8a0ca6e6..99ca90917e2 100644
--- a/htdocs/core/boxes/box_boms.php
+++ b/htdocs/core/boxes/box_boms.php
@@ -51,6 +51,8 @@ class box_boms extends ModeleBoxes
$this->db = $db;
$this->hidden = !$user->hasRight('bom', 'read');
+ $this->urltoaddentry = DOL_URL_ROOT.'/bom/bom_card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedOrders';
}
/**
@@ -149,12 +151,12 @@ class box_boms extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedOrders").''
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordedOrders").''
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php
index 9c025931400..ddaf6749dfd 100644
--- a/htdocs/core/boxes/box_bookmarks.php
+++ b/htdocs/core/boxes/box_bookmarks.php
@@ -47,6 +47,8 @@ class box_bookmarks extends ModeleBoxes
$this->db = $db;
$this->hidden = !$user->hasRight('bookmark', 'lire');
+ $this->urltoaddentry = DOL_URL_ROOT.'/bookmarks/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedBookmarks';
}
/**
@@ -109,17 +111,17 @@ class box_bookmarks extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $mytxt = $langs->trans("NoRecordedBookmarks");
- if ($user->hasRight("bookmark", "creer")) {
- $mytxt .= ' '.$langs->trans("ClickToAdd");
- }
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center" colspan="2"',
- 'tooltip' => $mytxt,
- 'url' => DOL_URL_ROOT.'/bookmarks/list.php', 'text' => $mytxt,
- );
- }
+ // if ($num == 0) {
+ // $mytxt = $langs->trans("NoRecordedBookmarks");
+ // if ($user->hasRight("bookmark", "creer")) {
+ // $mytxt .= ' '.$langs->trans("ClickToAdd");
+ // }
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center" colspan="2"',
+ // 'tooltip' => $mytxt,
+ // 'url' => DOL_URL_ROOT.'/bookmarks/list.php', 'text' => $mytxt,
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php
index 0b18e3ca48f..8d30c4f3505 100644
--- a/htdocs/core/boxes/box_clients.php
+++ b/htdocs/core/boxes/box_clients.php
@@ -58,6 +58,9 @@ class box_clients extends ModeleBoxes
}
$this->hidden = !($user->hasRight('societe', 'read') && empty($user->socid));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/societe/card.php?action=create&type=c';
+ $this->msgNoRecords = 'NoRecordedCustomers';
}
/**
@@ -147,12 +150,6 @@ class box_clients extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedCustomers").''
- );
- }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php
index de80645db7d..288492c9601 100644
--- a/htdocs/core/boxes/box_commandes.php
+++ b/htdocs/core/boxes/box_commandes.php
@@ -51,6 +51,10 @@ class box_commandes extends ModeleBoxes
$this->db = $db;
$this->hidden = !$user->hasRight('commande', 'lire');
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/commande/card.php?action=create';
+
+ $this->msgNoRecords = 'NoRecordedOrders';
}
/**
@@ -186,12 +190,6 @@ class box_commandes extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedOrders").''
- );
- }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php
index dc0a9e29354..f67bf006148 100644
--- a/htdocs/core/boxes/box_comptes.php
+++ b/htdocs/core/boxes/box_comptes.php
@@ -60,6 +60,8 @@ class box_comptes extends ModeleBoxes
}
$this->hidden = !$user->hasRight('banque', 'lire');
+ $this->urltoaddentry = DOL_URL_ROOT.'/compta/bank/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedBankAccounts';
}
/**
@@ -164,12 +166,6 @@ class box_comptes extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedBankAccounts").''
- );
- }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php
index 06a5db32149..5b95234e478 100644
--- a/htdocs/core/boxes/box_contacts.php
+++ b/htdocs/core/boxes/box_contacts.php
@@ -54,6 +54,9 @@ class box_contacts extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('societe', 'lire') && $user->hasRight('societe', 'contact', 'lire'));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/contact/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedContacts';
}
/**
@@ -183,13 +186,13 @@ class box_contacts extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedContacts").'',
- 'asis' => 1
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordedContacts").'',
+ // 'asis' => 1
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php
index d3c66fce04b..e7700692e3e 100644
--- a/htdocs/core/boxes/box_contracts.php
+++ b/htdocs/core/boxes/box_contracts.php
@@ -50,6 +50,8 @@ class box_contracts extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('contrat', 'lire'));
+ $this->urltoaddentry = DOL_URL_ROOT.'/contrat/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedContracts';
}
/**
@@ -162,12 +164,12 @@ class box_contracts extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedContracts").''
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordedContracts").''
+ // );
+ // }
$this->db->free($resql);
} else {
diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php
index 73f69b2d723..07829e463c4 100644
--- a/htdocs/core/boxes/box_external_rss.php
+++ b/htdocs/core/boxes/box_external_rss.php
@@ -52,6 +52,7 @@ class box_external_rss extends ModeleBoxes
{
$this->db = $db;
$this->paramdef = $param;
+ $this->urltoaddentry = DOL_URL_ROOT.'/admin/external_rss.php';
}
/**
diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php
index 408fcb1fa49..ee333e1eec5 100644
--- a/htdocs/core/boxes/box_factures.php
+++ b/htdocs/core/boxes/box_factures.php
@@ -49,6 +49,8 @@ class box_factures extends ModeleBoxes
$this->db = $db;
$this->hidden = !$user->hasRight('facture', 'lire');
+ $this->urltoaddentry = DOL_URL_ROOT.'/compta/facture/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedInvoices';
}
/**
@@ -197,12 +199,12 @@ class box_factures extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedInvoices").'',
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordedInvoices").'',
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php
index dceb3d6843c..511a041a035 100644
--- a/htdocs/core/boxes/box_factures_fourn.php
+++ b/htdocs/core/boxes/box_factures_fourn.php
@@ -50,6 +50,8 @@ class box_factures_fourn extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('fournisseur', 'facture', 'lire'));
+ $this->urltoaddentry = DOL_URL_ROOT.'/fourn/facture/card.php?action=create';
+ $this->msgNoRecords = 'NoModifiedSupplierBills';
}
/**
@@ -193,12 +195,12 @@ class box_factures_fourn extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoModifiedSupplierBills").'',
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoModifiedSupplierBills").'',
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php
index d6a24e31576..cf4d4967a16 100644
--- a/htdocs/core/boxes/box_factures_imp.php
+++ b/htdocs/core/boxes/box_factures_imp.php
@@ -53,6 +53,8 @@ class box_factures_imp extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('facture', 'lire'));
+ $this->urltoaddentry = DOL_URL_ROOT.'/compta/facture/card.php?action=create';
+ $this->msgNoRecords = 'NoUnpaidCustomerBills';
}
/**
@@ -220,10 +222,10 @@ class box_factures_imp extends ModeleBoxes
}
if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center" colspan="3"',
- 'text' => ''.$langs->trans("NoUnpaidCustomerBills").''
- );
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center" colspan="3"',
+ // 'text' => ''.$langs->trans("NoUnpaidCustomerBills").''
+ // );
} else {
$sql = "SELECT SUM(f.total_ht) as total_ht ".$sql2;
diff --git a/htdocs/core/boxes/box_fediverse.php b/htdocs/core/boxes/box_fediverse.php
index 7ce725e741a..b4cd84fc642 100644
--- a/htdocs/core/boxes/box_fediverse.php
+++ b/htdocs/core/boxes/box_fediverse.php
@@ -50,6 +50,8 @@ class box_fediverse extends ModeleBoxes
{
$this->db = $db;
$this->paramdef = $param;
+ $this->urltoaddentry = DOL_URL_ROOT.'/admin/fediverse.php';
+ $this->msgNoRecords = 'NoRecordFound';
}
/**
@@ -150,12 +152,12 @@ class box_fediverse extends ModeleBoxes
}
- if ($nbitems == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordFound").''
- );
- }
+ // if ($nbitems == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordFound").''
+ // );
+ // }
}
diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php
index dfa059d4bf6..ff12319eebe 100644
--- a/htdocs/core/boxes/box_ficheinter.php
+++ b/htdocs/core/boxes/box_ficheinter.php
@@ -50,6 +50,8 @@ class box_ficheinter extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('ficheinter', 'lire'));
+ $this->urltoaddentry = DOL_URL_ROOT.'/fichinter/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedInterventions';
}
/**
@@ -151,12 +153,12 @@ class box_ficheinter extends ModeleBoxes
$i++;
}
- if ($num == 0) {
- $this->info_box_contents[$i][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedInterventions").''
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$i][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordedInterventions").''
+ // );
+ // }
$this->db->free($resql);
} else {
diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php
index 4917492036b..6cd7b8c3bab 100644
--- a/htdocs/core/boxes/box_fournisseurs.php
+++ b/htdocs/core/boxes/box_fournisseurs.php
@@ -51,6 +51,8 @@ class box_fournisseurs extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('societe', 'read') && empty($user->socid));
+ $this->urltoaddentry = DOL_URL_ROOT.'/societe/card.php?action=create&type=f';
+ $this->msgNoRecords = 'NoRecordedSuppliers';
}
/**
@@ -138,13 +140,13 @@ class box_fournisseurs extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $langs->load("suppliers");
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedSuppliers").''
- );
- }
+ // if ($num == 0) {
+ // $langs->load("suppliers");
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => ''.$langs->trans("NoRecordedSuppliers").''
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php
index 03c77b0500e..f6323dd7af9 100644
--- a/htdocs/core/boxes/box_members_last_subscriptions.php
+++ b/htdocs/core/boxes/box_members_last_subscriptions.php
@@ -59,6 +59,9 @@ class box_members_last_subscriptions extends ModeleBoxes
}
$this->hidden = !(isModEnabled('member') && $user->hasRight('adherent', 'lire'));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/adherents/card.php?leftmenu=members&action=create';
+ $this->msgNoRecords = 'NoRecordedMembers';
}
/**
@@ -156,12 +159,6 @@ class box_members_last_subscriptions extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedMembers").'',
- );
- }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_mos.php b/htdocs/core/boxes/box_mos.php
index 214c38ced17..be80c7d4536 100644
--- a/htdocs/core/boxes/box_mos.php
+++ b/htdocs/core/boxes/box_mos.php
@@ -51,6 +51,9 @@ class box_mos extends ModeleBoxes
$this->db = $db;
$this->hidden = !$user->hasRight('bom', 'read');
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/mrp/mo_card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedOrders';
}
/**
@@ -146,12 +149,6 @@ class box_mos extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedOrders").''
- );
- }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php
index 52a27b151cb..db7710e960b 100644
--- a/htdocs/core/boxes/box_produits.php
+++ b/htdocs/core/boxes/box_produits.php
@@ -55,6 +55,8 @@ class box_produits extends ModeleBoxes
$tmpentry = array('enabled' => (isModEnabled("product") || isModEnabled("service")), 'perms' => ($user->hasRight('produit', 'lire') || $user->hasRight('service', 'lire')), 'module' => 'product|service');
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
$this->hidden = ($showmode != 1);
+ $this->urltoaddentry = DOL_URL_ROOT.'/product/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedProducts';
}
/**
@@ -210,12 +212,12 @@ class box_produits extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => $langs->trans("NoRecordedProducts"),
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => $langs->trans("NoRecordedProducts"),
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php
index da714ede7ab..f2a18d04ccc 100644
--- a/htdocs/core/boxes/box_produits_alerte_stock.php
+++ b/htdocs/core/boxes/box_produits_alerte_stock.php
@@ -57,6 +57,8 @@ class box_produits_alerte_stock extends ModeleBoxes
$tmpentry = array('enabled' => ((isModEnabled("product") || isModEnabled("service")) && isModEnabled('stock')), 'perms' => $user->hasRight('stock', 'lire'), 'module' => 'product|service|stock');
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
$this->hidden = ($showmode != 1);
+ $this->urltoaddentry = DOL_URL_ROOT.'/product/card.php?action=create';
+ $this->msgNoRecords = 'NoTooLowStockProducts';
}
/**
@@ -202,12 +204,12 @@ class box_produits_alerte_stock extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => $langs->trans("NoTooLowStockProducts"),
- );
- }
+ // if ($num == 0) {
+ // $this->info_box_contents[$line][0] = array(
+ // 'td' => 'class="center"',
+ // 'text' => $langs->trans("NoTooLowStockProducts"),
+ // );
+ // }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php
index e713b654997..e58fa7047dc 100644
--- a/htdocs/core/boxes/box_project.php
+++ b/htdocs/core/boxes/box_project.php
@@ -54,6 +54,8 @@ class box_project extends ModeleBoxes
$this->boxlabel = "OpenedProjects";
$this->hidden = !$user->hasRight('projet', 'lire');
+ $this->urltoaddentry = DOL_URL_ROOT.'/projet/card.php?action=create';
+ $this->msgNoRecords = 'NoOpenedProjects';
}
/**
@@ -175,33 +177,34 @@ class box_project extends ModeleBoxes
}
}
-
- // Add the sum à the bottom of the boxes
- $this->info_box_contents[$i][] = array(
- 'tr' => 'class="liste_total_wrap"',
- 'td' => 'class="liste_total"',
- 'text' => $langs->trans("Total")." ".$textHead,
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="right liste_total" ',
- 'text' => round($num, 0)." ".$langs->trans("Projects"),
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="right liste_total" ',
- 'text' => (($max < $num) ? '' : (round($totalnbTask, 0)." ".$langs->trans("Tasks"))),
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
+ if ($num > 0) {
+ // Add the sum à the bottom of the boxes
+ $this->info_box_contents[$i][] = array(
+ 'tr' => 'class="liste_total_wrap"',
+ 'td' => 'class="liste_total"',
+ 'text' => $langs->trans("Total")." ".$textHead,
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="right liste_total" ',
+ 'text' => round($num, 0)." ".$langs->trans("Projects"),
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="right liste_total" ',
+ 'text' => (($max < $num) ? '' : (round($totalnbTask, 0)." ".$langs->trans("Tasks"))),
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ }
}
diff --git a/htdocs/core/boxes/box_project_opportunities.php b/htdocs/core/boxes/box_project_opportunities.php
index 43e35640e7e..9781657ccdd 100644
--- a/htdocs/core/boxes/box_project_opportunities.php
+++ b/htdocs/core/boxes/box_project_opportunities.php
@@ -55,6 +55,8 @@ class box_project_opportunities extends ModeleBoxes
$this->enabled = getDolGlobalInt('PROJECT_USE_OPPORTUNITIES');
$this->hidden = !$user->hasRight('projet', 'lire');
+ $this->urltoaddentry = DOL_URL_ROOT.'/projet/card.php?action=create';
+ $this->msgNoRecords = 'NoOpenedProjectsOpportunities';
}
/**
@@ -160,33 +162,34 @@ class box_project_opportunities extends ModeleBoxes
}
}
-
- // Add the sum à the bottom of the boxes
- $this->info_box_contents[$i][] = array(
- 'tr' => 'class="liste_total_wrap"',
- 'td' => 'class="liste_total"',
- 'text' => $langs->trans("Total")." ".$textHead,
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="right liste_total" ',
- 'text' => round($num, 0)." ".$langs->trans("Projects"),
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
- $this->info_box_contents[$i][] = array(
- 'td' => 'class="liste_total"',
- 'text' => " ",
- );
+ if ($num > 0) {
+ // Add the sum à the bottom of the boxes
+ $this->info_box_contents[$i][] = array(
+ 'tr' => 'class="liste_total_wrap"',
+ 'td' => 'class="liste_total"',
+ 'text' => $langs->trans("Total")." ".$textHead,
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="right liste_total" ',
+ 'text' => round($num, 0)." ".$langs->trans("Projects"),
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="liste_total"',
+ 'text' => " ",
+ );
+ }
}
diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php
index 59daa109ef1..09b12577f48 100644
--- a/htdocs/core/boxes/box_propales.php
+++ b/htdocs/core/boxes/box_propales.php
@@ -52,6 +52,9 @@ class box_propales extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('propal', 'read'));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/comm/propal/card.php?action=create';
+ $this->msgNoRecords = 'NoRecordedProposals';
}
/**
@@ -171,12 +174,6 @@ class box_propales extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => $langs->trans("NoRecordedProposals"),
- );
- }
$this->db->free($result);
} else {
diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php
index 0052c28a331..dd90e6f1910 100644
--- a/htdocs/core/boxes/box_prospect.php
+++ b/htdocs/core/boxes/box_prospect.php
@@ -60,6 +60,9 @@ class box_prospect extends ModeleBoxes
}
$this->hidden = !($user->hasRight('societe', 'read') && empty($user->socid));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/societe/card.php?action=create&type=p';
+ $this->msgNoRecords = 'NoRecordedProspects';
}
/**
@@ -153,13 +156,6 @@ class box_prospect extends ModeleBoxes
$line++;
}
- if ($num == 0) {
- $this->info_box_contents[$line][0] = array(
- 'td' => 'class="center"',
- 'text' => ''.$langs->trans("NoRecordedProspects").''
- );
- }
-
$this->db->free($resql);
} else {
$this->info_box_contents[0][0] = array(
diff --git a/htdocs/core/boxes/box_scheduled_jobs.php b/htdocs/core/boxes/box_scheduled_jobs.php
index 1b621155ee2..cf1d6f683fe 100644
--- a/htdocs/core/boxes/box_scheduled_jobs.php
+++ b/htdocs/core/boxes/box_scheduled_jobs.php
@@ -51,6 +51,9 @@ class box_scheduled_jobs extends ModeleBoxes
$this->db = $db;
$this->hidden = !($user->hasRight('cron', 'read'));
+
+ $this->urltoaddentry = DOL_URL_ROOT.'/cron/card.php?action=create';
+ $this->msgNoRecords = 'NoScheduledJobs';
}
/**
@@ -159,26 +162,27 @@ class box_scheduled_jobs extends ModeleBoxes
);
$line++;
}
-
- // Line nb job in error
- $this->info_box_contents[$line][] = array(
- 'td' => 'class="tdoverflowmax300" colspan="3"',
- 'text' => $langs->trans("NumberScheduledJobError")
- );
- $textnoformat = '';
- if ($nbjobsnotfinished) {
- $textnoformat .= '