mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Merge branch 'feature-24913/TabelleRaumtypNeuesAttributAktiv'
This commit is contained in:
@@ -47,11 +47,11 @@ echo '
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/flexcrollstyles.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script language="Javascript">
|
||||
|
||||
@@ -107,7 +107,7 @@ echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" onsubmit="return che
|
||||
'.$p->t('lvplan/raumtyp').' <SELECT name="raumtyp" style="width: 100px;">
|
||||
<OPTION value="">'.$p->t('global/alle').'</OPTION>';
|
||||
$raumtyp_obj = new raumtyp();
|
||||
$raumtyp_obj->getAll();
|
||||
$raumtyp_obj->getAll(true);
|
||||
|
||||
foreach ($raumtyp_obj->result as $row)
|
||||
{
|
||||
|
||||
@@ -199,26 +199,46 @@ $p = new phrasen($sprache);
|
||||
<label value="Raumtyp" />
|
||||
<menulist id="lehrveranstaltung-detail-menulist-raumtyp" disabled="true"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/raumtyp.rdf.php" flex="1"
|
||||
xmlns:RAUMTYP="http://www.technikum-wien.at/raumtyp/rdf#"
|
||||
ref="http://www.technikum-wien.at/raumtyp/liste" >
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
<template>
|
||||
<rule RAUMTYP:aktiv='true'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
|
||||
uri="rdf:*" style="text-decoration:line-through;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
<label value="Raumtyp alternativ" />
|
||||
<menulist id="lehrveranstaltung-detail-menulist-raumtypalternativ" disabled="true"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/raumtyp.rdf.php" flex="1"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/raumtyp.rdf.php" flex="1"
|
||||
xmlns:RAUMTYP="http://www.technikum-wien.at/raumtyp/rdf#"
|
||||
ref="http://www.technikum-wien.at/raumtyp/liste" >
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
<template>
|
||||
<rule RAUMTYP:aktiv='true'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
|
||||
uri="rdf:*" style="text-decoration:line-through;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class raumtyp extends basis_db
|
||||
//Tabellenspalten
|
||||
public $beschreibung; // string
|
||||
public $raumtyp_kurzbz; // string
|
||||
public $aktiv; //boolean
|
||||
|
||||
|
||||
/**
|
||||
@@ -42,7 +43,7 @@ class raumtyp extends basis_db
|
||||
public function __construct($raumtyp_kurzbz=null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
|
||||
if($raumtyp_kurzbz != null)
|
||||
$this->load($raumtyp_kurzbz);
|
||||
}
|
||||
@@ -51,10 +52,14 @@ class raumtyp extends basis_db
|
||||
* Laedt alle verfuegbaren Raumtypen
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getAll()
|
||||
public function getAll($aktiv = null)
|
||||
{
|
||||
$qry = 'SELECT * FROM public.tbl_raumtyp ORDER BY raumtyp_kurzbz;';
|
||||
$qry = 'SELECT * FROM public.tbl_raumtyp';
|
||||
|
||||
if (!is_null($aktiv))
|
||||
$qry .= ' WHERE aktiv = '.$this->db_add_param($aktiv, FHC_BOOLEAN);
|
||||
|
||||
$qry .= ' ORDER BY raumtyp_kurzbz';
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Datensaetze';
|
||||
@@ -67,7 +72,7 @@ class raumtyp extends basis_db
|
||||
|
||||
$raumtyp_obj->beschreibung = $row->beschreibung;
|
||||
$raumtyp_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
|
||||
|
||||
$raumtyp_obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
|
||||
$this->result[] = $raumtyp_obj;
|
||||
}
|
||||
@@ -99,7 +104,7 @@ class raumtyp extends basis_db
|
||||
{
|
||||
$this->beschreibung = $row->beschreibung;
|
||||
$this->raumtyp_kurzbz = $row->kurzbz;
|
||||
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -135,7 +140,7 @@ class raumtyp extends basis_db
|
||||
$this->errormsg = '';
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
@@ -154,6 +159,7 @@ class raumtyp extends basis_db
|
||||
$this->errormsg = 'Keine gültige ID';
|
||||
return false;
|
||||
}
|
||||
|
||||
//Neuen Datensatz anlegen
|
||||
$qry = 'INSERT INTO public.tbl_raumtyp (beschreibung, raumtyp_kurzbz) VALUES ('.
|
||||
$this->db_add_param($this->beschreibung).', '.
|
||||
|
||||
+4
-2
@@ -38,7 +38,7 @@ require_once('../include/basis_db.class.php');
|
||||
|
||||
// Orte holen
|
||||
$sql_query="SELECT * FROM (public.tbl_ort JOIN public.tbl_ortraumtyp USING (ort_kurzbz)) JOIN public.tbl_raumtyp USING (raumtyp_kurzbz)
|
||||
WHERE aktiv AND raumtyp_kurzbz!='LM' ORDER BY raumtyp_kurzbz, hierarchie,ort_kurzbz";
|
||||
WHERE tbl_ort.aktiv AND tbl_raumtyp.aktiv AND raumtyp_kurzbz!='LM' ORDER BY raumtyp_kurzbz, hierarchie,ort_kurzbz";
|
||||
$db = new basis_db();
|
||||
if(!$result = $db->db_query($sql_query))
|
||||
$error_msg.=$db->db_last_error();
|
||||
@@ -67,7 +67,9 @@ for ($i=0;$i<$num_rows;$i++)
|
||||
$nextTYP=(($i<$num_rows-1)?$ortNEXT->raumtyp_kurzbz:null);
|
||||
//echo "current:$currentTYP last:$lastTYP next:$nextTYP";
|
||||
$raumtypen='';
|
||||
$qry = "SELECT raumtyp_kurzbz FROM public.tbl_ortraumtyp WHERE ort_kurzbz='$ort->ort_kurzbz'";
|
||||
$qry = "SELECT tbl_ortraumtyp.raumtyp_kurzbz FROM public.tbl_ortraumtyp
|
||||
JOIN tbl_raumtyp USING(raumtyp_kurzbz)
|
||||
WHERE tbl_raumtyp.aktiv AND ort_kurzbz='$ort->ort_kurzbz'";
|
||||
if($result_rt = $db->db_query($qry))
|
||||
{
|
||||
while($row_rt = $db->db_fetch_object($result_rt))
|
||||
|
||||
+6
-5
@@ -56,13 +56,14 @@ foreach ($raumtypDAO->result as $rt)
|
||||
{
|
||||
?>
|
||||
<RDF:li>
|
||||
<RDF:Description id="<?php echo $rt->raumtyp_kurzbz; ?>" about="<?php echo $rdf_url.'/'.$rt->raumtyp_kurzbz; ?>" >
|
||||
<RAUMTYP:kurzbz><?php echo $rt->raumtyp_kurzbz ?></RAUMTYP:kurzbz>
|
||||
<RAUMTYP:beschreibung><?php echo $rt->beschreibung ?></RAUMTYP:beschreibung>
|
||||
</RDF:Description>
|
||||
<RDF:Description id="<?php echo $rt->raumtyp_kurzbz; ?>" about="<?php echo $rdf_url.'/'.$rt->raumtyp_kurzbz; ?>" >
|
||||
<RAUMTYP:kurzbz><?php echo $rt->raumtyp_kurzbz ?></RAUMTYP:kurzbz>
|
||||
<RAUMTYP:beschreibung><?php echo $rt->beschreibung ?></RAUMTYP:beschreibung>
|
||||
<RAUMTYP:aktiv><?php echo ($rt->aktiv ? "true" : "false") ?></RAUMTYP:aktiv>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
</RDF:RDF>
|
||||
|
||||
@@ -7026,7 +7026,7 @@ $tabellen=array(
|
||||
"public.tbl_preoutgoing_status" => array("preoutgoing_status_kurzbz","bezeichnung"),
|
||||
"public.tbl_prestudent" => array("prestudent_id","aufmerksamdurch_kurzbz","person_id","studiengang_kz","berufstaetigkeit_code","ausbildungcode","zgv_code","zgvort","zgvdatum","zgvmas_code","zgvmaort","zgvmadatum","aufnahmeschluessel","facheinschlberuf","reihungstest_id","anmeldungreihungstest","reihungstestangetreten","rt_gesamtpunkte","rt_punkte1","rt_punkte2","bismelden","anmerkung","dual","insertamum","insertvon","updateamum","updatevon","ext_id","ausstellungsstaat","rt_punkte3", "zgvdoktor_code", "zgvdoktorort", "zgvdoktordatum","mentor","zgvnation","zgvmanation","zgvdoktornation","gsstudientyp_kurzbz","aufnahmegruppe_kurzbz","udf_values","priorisierung","foerderrelevant","standort_code","zgv_erfuellt","zgvmas_erfuellt","zgvdoktor_erfuellt"),
|
||||
"public.tbl_prestudentstatus" => array("prestudent_id","status_kurzbz","studiensemester_kurzbz","ausbildungssemester","datum","orgform_kurzbz","insertamum","insertvon","updateamum","updatevon","ext_id","studienplan_id","bestaetigtam","bestaetigtvon","fgm","faktiv", "anmerkung","bewerbung_abgeschicktamum","rt_stufe","statusgrund_id"),
|
||||
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung","kosten"),
|
||||
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung","kosten", "aktiv"),
|
||||
"public.tbl_reihungstest" => array("reihungstest_id","studiengang_kz","ort_kurzbz","anmerkung","datum","uhrzeit","updateamum","updatevon","insertamum","insertvon","ext_id","freigeschaltet","max_teilnehmer","oeffentlich","studiensemester_kurzbz","aufnahmegruppe_kurzbz","stufe","anmeldefrist"),
|
||||
"public.tbl_rt_ort" => array("rt_id","ort_kurzbz","uid"),
|
||||
"public.tbl_rt_person" => array("rt_person_id","person_id","rt_id","studienplan_id","anmeldedatum","teilgenommen","ort_kurzbz","punkte","insertamum","insertvon","updateamum","updatevon"),
|
||||
|
||||
@@ -35,6 +35,7 @@ require_once('dbupdate_3.4/27388_anrechnungen_zeitfenster_pflegen.php');
|
||||
require_once('dbupdate_3.4/19154_beurteilungsformulare_pruefungssenat.php');
|
||||
require_once('dbupdate_3.4/27949_infocenter_zurueckstellen_mit_grund.php');
|
||||
require_once('dbupdate_3.4/27107_vilesci_erfassung_abwesenheiten_reinigung.php');
|
||||
require_once('dbupdate_3.4/24913_tabelle_raumtyp_neues_attribut_aktiv.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
//Add column aktiv to public.tbl_raumtyp
|
||||
if(!@$db->db_query("SELECT aktiv FROM public.tbl_raumtyp LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_raumtyp ADD COLUMN aktiv boolean NOT NULL DEFAULT true;
|
||||
COMMENT ON COLUMN public.tbl_raumtyp.aktiv IS 'Zeigt an, ob Raumtyp aktuell ist.';
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_raumtyp '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte aktiv zu Tabelle public.tbl_raumtyp hinzugefügt';
|
||||
}
|
||||
@@ -402,7 +402,12 @@
|
||||
$selected='selected';
|
||||
else
|
||||
$selected='';
|
||||
$htmlstr .= '<option value="'.$row->raumtyp_kurzbz.'" '.$selected.'>'.$row->raumtyp_kurzbz.'</option>';
|
||||
|
||||
$inaktiv = '';
|
||||
if (!$db->db_parse_bool($row->aktiv))
|
||||
$inaktiv = 'disabled';
|
||||
|
||||
$htmlstr .= '<option value="'.$row->raumtyp_kurzbz.'" '.$selected.' '. $inaktiv . '>'.$row->raumtyp_kurzbz.'</option>';
|
||||
}
|
||||
}//#'.$lv->farbe.'
|
||||
$htmlstr .= '</select></td>
|
||||
|
||||
@@ -251,7 +251,11 @@
|
||||
$raumtyp->getAll();
|
||||
foreach($raumtyp->result as $row)
|
||||
{
|
||||
$htmlstr.= '<OPTION value="'.$row->raumtyp_kurzbz.'">'.$row->beschreibung.' ('.$row->raumtyp_kurzbz.')</OPTION>';
|
||||
$inaktiv = '';
|
||||
if (!$db->db_parse_bool($row->aktiv))
|
||||
$inaktiv = 'disabled';
|
||||
|
||||
$htmlstr.= '<OPTION value="'.$row->raumtyp_kurzbz.'" '. $inaktiv .'>'.$row->beschreibung.' ('.$row->raumtyp_kurzbz.')</OPTION>';
|
||||
}
|
||||
$htmlstr.='</SELECT>
|
||||
Hierarchie: <input type="text" name="hierarchie" size="1" value="'.($hierarchiemax+1).'">
|
||||
|
||||
Reference in New Issue
Block a user