Can choose text to show when there is no data
This commit is contained in:
parent
6b30a6ad1f
commit
30a5ab479f
@ -1145,8 +1145,8 @@ class DolGraph
|
|||||||
/**
|
/**
|
||||||
* Output HTML string to show graph
|
* Output HTML string to show graph
|
||||||
*
|
*
|
||||||
* @param int $shownographyet Show graph to say there is not enough data
|
* @param int|string $shownographyet Show graph to say there is not enough data or the message in $shownographyet if it is a string.
|
||||||
* @return string HTML string to show graph
|
* @return string HTML string to show graph
|
||||||
*/
|
*/
|
||||||
public function show($shownographyet = 0)
|
public function show($shownographyet = 0)
|
||||||
{
|
{
|
||||||
@ -1155,7 +1155,13 @@ class DolGraph
|
|||||||
if ($shownographyet)
|
if ($shownographyet)
|
||||||
{
|
{
|
||||||
$s = '<div class="nographyet" style="width:'.(preg_match('/%/', $this->width) ? $this->width : $this->width.'px').'; height:'.(preg_match('/%/', $this->height) ? $this->height : $this->height.'px').';"></div>';
|
$s = '<div class="nographyet" style="width:'.(preg_match('/%/', $this->width) ? $this->width : $this->width.'px').'; height:'.(preg_match('/%/', $this->height) ? $this->height : $this->height.'px').';"></div>';
|
||||||
$s .= '<div class="nographyettext">'.$langs->trans("NotEnoughDataYet").'</div>';
|
$s .= '<div class="nographyettext">';
|
||||||
|
if (is_numeric($shownographyet)) {
|
||||||
|
$s .= $langs->trans("NotEnoughDataYet");
|
||||||
|
} else {
|
||||||
|
$s .= $shownographyet;
|
||||||
|
}
|
||||||
|
$s .= '</div>';
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1015,3 +1015,4 @@ ContactAddedAutomatically=Contact added from contact thirdparty roles
|
|||||||
More=More
|
More=More
|
||||||
ShowDetails=Show details
|
ShowDetails=Show details
|
||||||
CustomReports=Custom reports
|
CustomReports=Custom reports
|
||||||
|
SelectYourGraphOptionsFirst=Select your graph options to build a graph
|
||||||
@ -4376,6 +4376,18 @@ pre#editfilecontentaceeditorid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* Custom reports */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
.customreportsoutput, .customreportsoutputnotdata {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
.customreportsoutputnotdata {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Holiday */
|
/* Holiday */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
@ -4518,6 +4518,18 @@ pre#editfilecontentaceeditorid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* Custom reports */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
.customreportsoutput, .customreportsoutputnotdata {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
.customreportsoutputnotdata {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Holiday */
|
/* Holiday */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user