diff --git a/content/projekt/ressourcenauslastung.php b/content/projekt/ressourcenauslastung.php
index 680ad8ea1..9443e1112 100755
--- a/content/projekt/ressourcenauslastung.php
+++ b/content/projekt/ressourcenauslastung.php
@@ -23,7 +23,7 @@ require_once('../../include/ressource.class.php');
require_once('../../include/datum.class.php');
require_once('../../include/projektphase.class.php');
-$showweeks=15;
+$showweeks=52;
$timestamp = time();
$ressource = new ressource();
$ressource_arr = array();
@@ -33,15 +33,15 @@ $datum = date('Y-m-d',$timestamp);
if(isset($_GET['typ']) && $_GET['typ']=='projekt')
{
- $ressource->getProjektRessoureDatum($datum);
+ $ressource->getProjektRessourceDatum($datum);
$typ = 'projekt';
$anzahl_warnung = 6;
}
else
{
- $ressource->getProjektphaseRessoureDatum($datum);
+ $ressource->getProjektphaseRessourceDatum($datum);
$typ = 'phase';
- $anzahl_warnung = 3;
+ $anzahl_warnung = 6;
}
foreach($ressource->result as $row)
@@ -85,8 +85,9 @@ echo '';
foreach($ressource_arr as $bezeichnung)
{
- echo '
';
- echo '| '.$bezeichnung.' | ';
+ $showrow=false;
+ $htmlrow='
';
+ $htmlrow.='| '.$bezeichnung.' | ';
for($i=0;$i<$showweeks;$i++)
{
$timestamp_kw = jump_week($timestamp,$i);
@@ -100,7 +101,6 @@ foreach($ressource_arr as $bezeichnung)
$start = $datum_obj->mktime_fromdate($row->start);
$ende = $datum_obj->mktime_fromdate($row->ende);
if($row->bezeichnung == $bezeichnung
-
&& ($row->start=='' || $start<=$timestamp_kw)
&& ($row->ende=='' || $ende>=$timestamp_kw)
)
@@ -108,11 +108,13 @@ foreach($ressource_arr as $bezeichnung)
if($typ=='projekt' && $row->projekt_kurzbz!='')
{
$anzahl++;
+ $showrow=true;
$title .= $row->projekt_kurzbz.',';
}
elseif($typ=='phase' && $row->projektphase_id!='')
{
$anzahl++;
+ $showrow=true;
$phase = new projektphase();
$phase->load($row->projektphase_id);
$title .= $phase->bezeichnung.'('.$phase->projekt_kurzbz.'),';
@@ -121,17 +123,19 @@ foreach($ressource_arr as $bezeichnung)
}
$title = mb_substr($title,0,-1);
- echo '';
+ $htmlrow.=' | ';
if($anzahl>=$anzahl_warnung)
- echo ''.$anzahl.'';
+ $htmlrow.=''.$anzahl.'';
else
- echo $anzahl;
- echo ' | ';
+ $htmlrow.=$anzahl;
+ $htmlrow.='';
}
- echo '
';
+ $htmlrow.='';
+ if ($showrow)
+ echo $htmlrow;
}
echo '