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
|
||||
*
|
||||
* @param int $shownographyet Show graph to say there is not enough data
|
||||
* @return string HTML string to show graph
|
||||
* @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
|
||||
*/
|
||||
public function show($shownographyet = 0)
|
||||
{
|
||||
@ -1155,7 +1155,13 @@ class DolGraph
|
||||
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="nographyettext">'.$langs->trans("NotEnoughDataYet").'</div>';
|
||||
$s .= '<div class="nographyettext">';
|
||||
if (is_numeric($shownographyet)) {
|
||||
$s .= $langs->trans("NotEnoughDataYet");
|
||||
} else {
|
||||
$s .= $shownographyet;
|
||||
}
|
||||
$s .= '</div>';
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
@ -1014,4 +1014,5 @@ ContactDefault_ticketsup=Ticket
|
||||
ContactAddedAutomatically=Contact added from contact thirdparty roles
|
||||
More=More
|
||||
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 */
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -4518,6 +4518,18 @@ pre#editfilecontentaceeditorid {
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Custom reports */
|
||||
/* ============================================================================== */
|
||||
|
||||
.customreportsoutput, .customreportsoutputnotdata {
|
||||
padding-top: 20px;
|
||||
}
|
||||
.customreportsoutputnotdata {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Holiday */
|
||||
/* ============================================================================== */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user