diff --git a/content/planner.overlay.xul.php b/content/planner.overlay.xul.php
index d4ca54f07..d9e3a478b 100755
--- a/content/planner.overlay.xul.php
+++ b/content/planner.overlay.xul.php
@@ -72,6 +72,8 @@ echo '
+
+
@@ -84,12 +86,13 @@ echo '
-
+
+
diff --git a/content/projekt/projektphase.overlay.js.php b/content/projekt/projektphase.overlay.js.php
index b54ff8640..081d0feeb 100755
--- a/content/projekt/projektphase.overlay.js.php
+++ b/content/projekt/projektphase.overlay.js.php
@@ -146,13 +146,15 @@ function onselectTreeProjektphase()
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
getService(Components.interfaces.nsIRDFService);
var subject = rdfService.GetResource("http://www.technikum-wien.at/projektphase/" + projektphase_id);
-
+ console.log(subject);
var predicateNS = "http://www.technikum-wien.at/projektphase/rdf";
//Daten holen
var projekt_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#projekt_kurzbz" ));
var projektphase_fk=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#projektphase_fk" ));
+ var ressource_id=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ressource_id" ));
var bezeichnung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bezeichnung" ));
+ var typ=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#typ" ));
var beschreibung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#beschreibung" ));
var start=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#start" ));
var ende=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" ));
@@ -160,13 +162,18 @@ function onselectTreeProjektphase()
var personentage=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#personentage" ));
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
+ //alert(typ);
+
//Daten den Feldern zuweisen
var menulist = document.getElementById('menulist-projektphase-detail-projektphase_fk');
ProjektphaseFkLoad(menulist, projekt_kurzbz, projektphase_id);
+ menulist = document.getElementById('menulist-projektphase-detail-ressource');
+ RessourceTaskLoad(menulist, projektphase_id);
document.getElementById('textbox-projektphase-detail-projekt_kurzbz').value=projekt_kurzbz;
document.getElementById('textbox-projektphase-detail-projektphase_id').value=projektphase_id;
document.getElementById('textbox-projektphase-detail-beschreibung').value=beschreibung;
document.getElementById('textbox-projektphase-detail-bezeichnung').value=bezeichnung;
+ document.getElementById('textbox-projektphase-detail-typ').value=typ;
document.getElementById('textbox-projektphase-detail-start').value=start;
document.getElementById('textbox-projektphase-detail-ende').value=ende;
document.getElementById('textbox-projektphase-detail-budget').value=budget;
@@ -174,6 +181,7 @@ function onselectTreeProjektphase()
document.getElementById('textbox-projektphase-detail-farbe').value=farbe;
document.getElementById('checkbox-projektphase-detail-neu').checked=false;
MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', projektphase_fk);
+ MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', ressource_id);
//Notizen zu einer Phase Laden
notiz = document.getElementById('box-projektphase-notizen');
@@ -214,8 +222,10 @@ function saveProjektphaseDetail()
//Werte holen
projektphase_id = document.getElementById('textbox-projektphase-detail-projektphase_id').value;
projektphase_fk = document.getElementById('menulist-projektphase-detail-projektphase_fk').value;
+ ressource_id = document.getElementById('menulist-projektphase-detail-ressource').value;
projekt_kurzbz = document.getElementById('textbox-projektphase-detail-projekt_kurzbz').value;
bezeichnung = document.getElementById('textbox-projektphase-detail-bezeichnung').value;
+ typ = document.getElementById('textbox-projektphase-detail-typ').value;
beschreibung = document.getElementById('textbox-projektphase-detail-beschreibung').value;
start = document.getElementById('textbox-projektphase-detail-start').iso;
ende = document.getElementById('textbox-projektphase-detail-ende').iso;
@@ -233,6 +243,7 @@ function saveProjektphaseDetail()
phase.appendChild(new SOAPObject("projektphase_fk")).val(projektphase_fk);
phase.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
phase.appendChild(new SOAPObject("bezeichnung")).cdataval(bezeichnung);
+ phase.appendChild(new SOAPObject("typ")).cdataval(typ);
phase.appendChild(new SOAPObject("beschreibung")).cdataval(beschreibung);
phase.appendChild(new SOAPObject("start")).val(start);
phase.appendChild(new SOAPObject("ende")).val(ende);
@@ -314,6 +325,7 @@ function ProjektphaseDetailReset()
document.getElementById('textbox-projektphase-detail-projektphase_id').value='';
document.getElementById('textbox-projektphase-detail-projekt_kurzbz').value='';
document.getElementById('textbox-projektphase-detail-bezeichnung').value='';
+ document.getElementById('textbox-projektphase-detail-typ').value='Projektphase';
document.getElementById('textbox-projektphase-detail-beschreibung').value='';
document.getElementById('textbox-projektphase-detail-start').value='';
document.getElementById('textbox-projektphase-detail-ende').value='';
@@ -327,7 +339,9 @@ function ProjektphaseDetailReset()
function ProjektphaseDetailDisable(val)
{
document.getElementById('menulist-projektphase-detail-projektphase_fk').disabled=val;
+ document.getElementById('menulist-projektphase-detail-ressource').disabled=val;
document.getElementById('textbox-projektphase-detail-bezeichnung').disabled=val;
+ document.getElementById('textbox-projektphase-detail-typ').disabled=val;
document.getElementById('textbox-projektphase-detail-beschreibung').disabled=val;
document.getElementById('textbox-projektphase-detail-start').disabled=val;
document.getElementById('textbox-projektphase-detail-ende').disabled=val;
@@ -359,12 +373,20 @@ function ProjektphaseNeu()
ProjektphaseFkLoad(menulist, projekt_kurzbz);
MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', '');
+
+ //Menulist fuer Ressourcen laden und optionalen Eintrag markieren
+ menulist = document.getElementById('menulist-projektphase-detail-ressource');
+ RessourceTaskLoad(menulist, projektphase_id);
+ MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', '');
+
+
document.getElementById('textbox-projektphase-detail-projekt_kurzbz').value=projekt_kurzbz;
//Neu Status setzen
document.getElementById('caption-projektphase-detail').label='Neue Phase';
document.getElementById('checkbox-projektphase-detail-neu').checked=true;
document.getElementById('textbox-projektphase-detail-farbe').value='#0000FF';
+ document.getElementById('textbox-projektphase-detail-typ').value='Projektphase';
//Detail Tab auswaehlen
document.getElementById('projektphase-tabs').selectedItem=document.getElementById('projektphase-tab-detail');
diff --git a/content/projekt/projektphase.overlay.xul.php b/content/projekt/projektphase.overlay.xul.php
index 0f82ec70f..d89e4e311 100755
--- a/content/projekt/projektphase.overlay.xul.php
+++ b/content/projekt/projektphase.overlay.xul.php
@@ -94,6 +94,10 @@ echo '
+
+
@@ -120,12 +124,13 @@ echo '
-
+
+
diff --git a/content/projekt/projektphasedetail.overlay.xul.php b/content/projekt/projektphasedetail.overlay.xul.php
index 1fd77f209..bd552cf59 100755
--- a/content/projekt/projektphasedetail.overlay.xul.php
+++ b/content/projekt/projektphasedetail.overlay.xul.php
@@ -51,22 +51,16 @@ echo '';
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
@@ -120,6 +131,9 @@ echo '';
+
+
+
@@ -130,4 +144,4 @@ echo '';
-
\ No newline at end of file
+
diff --git a/include/projektphase.class.php b/include/projektphase.class.php
index 9b4c8bbbe..8e2985b3c 100755
--- a/include/projektphase.class.php
+++ b/include/projektphase.class.php
@@ -35,12 +35,15 @@ class projektphase extends basis_db
public $projekt_kurzbz; //string
public $projektphase_fk; //string
public $bezeichnung; //string
+ public $typ='Projektphase'; //string
public $beschreibung; //string
public $start; //date
public $ende; //date
public $personentage; //integer
public $farbe;
public $budget; // numeric
+ public $ressource_id; // bigint
+ public $ressource_bezeichnung; // string
public $insertamum; // timestamp
public $insertvon; // bigint
public $updateamum; // timestamp
@@ -72,7 +75,9 @@ class projektphase extends basis_db
return false;
}
- $qry = "SELECT * FROM fue.tbl_projektphase WHERE projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
+ $qry = "SELECT tbl_projektphase.*, tbl_ressource.bezeichnung AS ressource_bezeichnung
+ FROM fue.tbl_projektphase LEFT OUTER JOIN fue.tbl_ressource USING (ressource_id)
+ WHERE projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($this->db_query($qry))
{
@@ -82,12 +87,15 @@ class projektphase extends basis_db
$this->projektphase_id = $row->projektphase_id;
$this->projektphase_fk = $row->projektphase_fk;
$this->bezeichnung = $row->bezeichnung;
+ $this->typ = $row->typ;
$this->beschreibung = $row->beschreibung;
$this->start = $row->start;
$this->ende = $row->ende;
$this->personentage = $row->personentage;
$this->farbe = $row->farbe;
$this->budget = $row->budget;
+ $this->ressource_id = $row->ressource_id;
+ $this->ressource_bezeichnung = $row->ressource_bezeichnung;
$this->insertamum = $row->insertamum;
$this->insertvon = $row->insertvon;
$this->updateamum = $row->updateamum;
@@ -138,12 +146,14 @@ class projektphase extends basis_db
$obj->projektphase_id = $row->projektphase_id;
$obj->projektphase_fk = $row->projektphase_fk;
$obj->bezeichnung = $row->bezeichnung;
+ $obj->typ = $row->typ;
$obj->beschreibung = $row->beschreibung;
$obj->start = $row->start;
$obj->ende = $row->ende;
//$obj->personentage = $row->personentage;
$obj->farbe = $row->farbe;
$obj->budget = $row->budget;
+ $obj->ressource_id = $row->ressource_id;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
@@ -170,7 +180,9 @@ class projektphase extends basis_db
public function getProjektphasen($projekt_kurzbz, $foreignkey = null)
{
$this->result=array();
- $qry = "SELECT * FROM fue.tbl_projektphase WHERE projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
+ $qry = "SELECT tbl_projektphase.*, tbl_ressource.bezeichnung AS ressource_bezeichnung
+ FROM fue.tbl_projektphase LEFT OUTER JOIN fue.tbl_ressource USING (ressource_id)
+ WHERE projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
//echo "\n".$qry."\n";
if(!is_null($foreignkey))
@@ -188,12 +200,15 @@ class projektphase extends basis_db
$obj->projektphase_id = $row->projektphase_id;
$obj->projektphase_fk = $row->projektphase_fk;
$obj->bezeichnung = $row->bezeichnung;
+ $obj->typ = $row->typ;
$obj->beschreibung = $row->beschreibung;
$obj->start = $row->start;
$obj->ende = $row->ende;
//$obj->personentage = $row->personentage;
$obj->farbe = $row->farbe;
$obj->budget = $row->budget;
+ $obj->ressource_id = $row->ressource_id;
+ $obj->ressource_bezeichnung = $row->ressource_bezeichnung;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
@@ -218,7 +233,9 @@ class projektphase extends basis_db
*/
public function getAllUnterphasen($phase_id)
{
- $qry = "SELECT * FROM fue.tbl_projektphase WHERE projektphase_fk =".$this->db_add_param($phase_id, FHC_INTEGER);
+ $qry = "SELECT tbl_projektphase.*, tbl_ressource.bezeichnung AS ressource_bezeichung
+ FROM fue.tbl_projektphase LEFT OUTER JOIN fue.tbl_ressource USING (ressource_id)
+ WHERE projektphase_fk =".$this->db_add_param($phase_id, FHC_INTEGER);
if($result = $this->db_query($qry))
{
@@ -230,12 +247,15 @@ class projektphase extends basis_db
$obj->projektphase_id = $row->projektphase_id;
$obj->projektphase_fk = $row->projektphase_fk;
$obj->bezeichnung = $row->bezeichnung;
+ $obj->typ = $row->typ;
$obj->beschreibung = $row->beschreibung;
$obj->start = $row->start;
$obj->ende = $row->ende;
//$obj->personentage = $row->personentage;
$obj->farbe = $row->farbe;
$obj->budget = $row->budget;
+ $obj->ressource_id = $row->ressource_id;
+ $obj->ressource_bezeichnung = $row->ressource_bezeichnung;
$obj->insertamum = $row->insertamum;
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
@@ -266,6 +286,11 @@ class projektphase extends basis_db
$this->errormsg='Bezeichnung darf nicht laenger als 32 Zeichen sein';
return false;
}
+ if(mb_strlen($this->typ)>32)
+ {
+ $this->errormsg='Typ darf nicht laenger als 32 Zeichen sein';
+ return false;
+ }
if(mb_strlen($this->projekt_kurzbz)>16)
{
$this->errormsg.='Projekt Kurzbz darf nicht länger als 16 Zeichen sein';
@@ -296,14 +321,16 @@ class projektphase extends basis_db
//Neuen Datensatz einfuegen
$qry='BEGIN; INSERT INTO fue.tbl_projektphase (projekt_kurzbz, projektphase_fk, bezeichnung,
- beschreibung, start, ende, budget, insertvon, insertamum, updatevon, updateamum, farbe, personentage) VALUES ('.
+ beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage) VALUES ('.
$this->db_add_param($this->projekt_kurzbz).', '.
$this->db_add_param($this->projektphase_fk).', '.
$this->db_add_param($this->bezeichnung).', '.
+ $this->db_add_param($this->typ).', '.
$this->db_add_param($this->beschreibung).', '.
$this->db_add_param($this->start).', '.
$this->db_add_param($this->ende).', '.
$this->db_add_param($this->budget).', '.
+ $this->db_add_param($this->ressource_id).', '.
$this->db_add_param($this->insertvon).', now(), '.
$this->db_add_param($this->updatevon).', now(), '.
$this->db_add_param($this->farbe).', '.
@@ -317,10 +344,12 @@ class projektphase extends basis_db
'projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).', '.
'projektphase_fk='.$this->db_add_param($this->projektphase_fk).', '.
'bezeichnung='.$this->db_add_param($this->bezeichnung).', '.
+ 'typ='.$this->db_add_param($this->typ).', '.
'beschreibung='.$this->db_add_param($this->beschreibung).', '.
'start='.$this->db_add_param($this->start).', '.
'ende='.$this->db_add_param($this->ende).', '.
'budget='.$this->db_add_param($this->budget).', '.
+ 'ressource_id='.$this->db_add_param($this->ressource_id).', '.
'farbe='.$this->db_add_param($this->farbe).', '.
'personentage='.$this->db_add_param($this->personentage).', '.
'updateamum= now(), '.
diff --git a/rdf/projektphase.rdf.php b/rdf/projektphase.rdf.php
index d6a0757c3..a28a11ef5 100755
--- a/rdf/projektphase.rdf.php
+++ b/rdf/projektphase.rdf.php
@@ -61,6 +61,7 @@ if($projektphase_id != '')
$oRdf->obj[$i]->setAttribut('fortschritt',$ergebnis);
$oRdf->obj[$i]->setAttribut('personentage',$phase->personentage);
$oRdf->obj[$i]->setAttribut('farbe',$phase->farbe);
+ $oRdf->obj[$i]->setAttribut('typ',$phase->typ);
if($phase->projektphase_fk!='')
$oRdf->addSequence($phase->projektphase_id, $phase->projektphase_fk);
@@ -91,6 +92,7 @@ if($projektphase_id != '')
$oRdf->obj[$idx]->setAttribut('budget', '');
$oRdf->obj[$idx]->setAttribut('personentage', '');
$oRdf->obj[$idx]->setAttribut('farbe', '');
+ $oRdf->obj[$idx]->setAttribut('typ', '');
$oRdf->addSequence('opt');
}
@@ -109,6 +111,7 @@ if($projektphase_id != '')
$oRdf->obj[$idx]->setAttribut('budget', $phase->budget);
$oRdf->obj[$idx]->setAttribut('personentage', $phase->personentage);
$oRdf->obj[$idx]->setAttribut('farbe', $phase->farbe);
+ $oRdf->obj[$idx]->setAttribut('typ', $phase->typ);
$oRdf->addSequence($phase->projektphase_id);
}
@@ -216,8 +219,9 @@ else
$oRdf->obj[$idx]->setAttribut('budget',$projektphase->budget);
$oRdf->obj[$idx]->setAttribut('personentage',$projektphase->personentage);
$oRdf->obj[$idx]->setAttribut('farbe',$projektphase->farbe);
- $oRdf->obj[$idx]->setAttribut('typ','phase');
-
+ $oRdf->obj[$idx]->setAttribut('typ',strtolower($projektphase->typ));
+ $oRdf->obj[$idx]->setAttribut('ressource_bezeichnung',$projektphase->ressource_bezeichnung);
+ $oRdf->obj[$idx]->setAttribut('ressource_id',$projektphase->ressource_id);
if (!is_null($projektphase->projektphase_fk))
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_id, $projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_fk);
else