mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
DMS im CIS soll erweitert werden um folgende Felder:
Gültig ab ( Ab welchem Datum ist das Dokument gültig ) (Date) Organsiationseinheit ( Wer ist für das Dokument verantwortlich ) (DropDown) archiviert (Boolean) Nötige Schritte DB Felder hinzufügen Legacy GUI Anpassung Felder in DMS Lib nachziehen!
This commit is contained in:
+96
-7
@@ -17,13 +17,14 @@
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at> and
|
||||
* Manfred Kindl <manfred.kindl@technikum-wien.at>.
|
||||
*/
|
||||
require_once ('../config/cis.config.inc.php');
|
||||
require_once ('../include/functions.inc.php');
|
||||
require_once ('../include/dms.class.php');
|
||||
require_once ('../include/benutzerberechtigung.class.php');
|
||||
require_once ('../include/basis_db.class.php');
|
||||
require_once ('../include/datum.class.php');
|
||||
require_once ('../include/log.class.php');
|
||||
require_once('../config/cis.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/dms.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/basis_db.class.php');
|
||||
require_once('../include/datum.class.php');
|
||||
require_once('../include/log.class.php');
|
||||
require_once('../include/organisationseinheit.class.php');
|
||||
|
||||
$db = new basis_db();
|
||||
$user = get_uid();
|
||||
@@ -52,6 +53,7 @@ if (! $rechte->isberechtigt('basis/dms', null, 's', null))
|
||||
<script type="text/javascript" src="../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script type="text/javascript" src="../vendor/joeldbirch/superfish/dist/js/superfish.min.js"></script>
|
||||
<script type="text/javascript" src="../include/tiny_mce/tiny_mce_popup.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<style type="text/css">
|
||||
.buttondesign
|
||||
{
|
||||
@@ -129,6 +131,8 @@ if (! $rechte->isberechtigt('basis/dms', null, 's', null))
|
||||
{
|
||||
//$('#divupload').hide();
|
||||
jQuery('ul.sf-menu').superfish({speed:'fast', delay:200});
|
||||
|
||||
$(".datepicker_datum").datepicker($.datepicker.regional['de']);
|
||||
});
|
||||
|
||||
function upload(id, name)
|
||||
@@ -265,6 +269,11 @@ $mimetypes = array(
|
||||
'image/png' => 'img_icon.png'
|
||||
);
|
||||
|
||||
// Organsiationseinheit dropdown
|
||||
$organisationseinheiten = new organisationseinheit();
|
||||
$organisationseinheiten->getAll(true, null, 'organisationseinheittyp_kurzbz, bezeichnung');
|
||||
$oe_typ = '';
|
||||
|
||||
// Hole Datei aus Import Verzeichnis
|
||||
if ($importFile != '')
|
||||
{
|
||||
@@ -334,6 +343,9 @@ if (isset($_POST['fileupload']))
|
||||
$schlagworte = $_POST['schlagworte'];
|
||||
$mimetype = isset($_POST['mimetype']) ? $_POST['mimetype'] : '';
|
||||
$cis_suche = isset($_POST['cis_suche']) ? true : false;
|
||||
$gueltig_ab = isset($_POST['gueltig_ab']) ? $_POST['gueltig_ab'] : null;
|
||||
$oe_kurzbz_verantwortlich = isset($_POST['oe_kurzbz_verantwortlich']) ? $_POST['oe_kurzbz_verantwortlich'] : null;
|
||||
$archiviert = isset($_POST['archiviert']) ? true : false;
|
||||
$ext = pathinfo($_FILES['userfile']['name'], PATHINFO_EXTENSION);
|
||||
$filename = uniqid();
|
||||
$filename .= ".".$ext;
|
||||
@@ -377,6 +389,10 @@ if (isset($_POST['fileupload']))
|
||||
$dms->beschreibung = $beschreibung;
|
||||
$dms->schlagworte = $schlagworte;
|
||||
$dms->cis_suche = $cis_suche;
|
||||
$gueltig_ab_date = DateTime::createFromFormat('d.m.Y', $gueltig_ab);
|
||||
$dms->gueltig_ab = $gueltig_ab_date->format('Y-m-d');
|
||||
$dms->oe_kurzbz_verantwortlich = $oe_kurzbz_verantwortlich;
|
||||
$dms->archiviert = $archiviert;
|
||||
|
||||
if ($dms->save(true))
|
||||
{
|
||||
@@ -414,6 +430,9 @@ if (isset($_POST['action']) && $_POST['action'] == 'rename')
|
||||
$schlagworte = $_POST['schlagworte'];
|
||||
$mimetype = isset($_POST['mimetype']) ? $_POST['mimetype'] : '';
|
||||
$cis_suche = isset($_POST['cis_suche']) ? true : false;
|
||||
$gueltig_ab = isset($_POST['gueltig_ab']) ? $_POST['gueltig_ab'] : null;
|
||||
$oe_kurzbz_verantwortlich = isset($_POST['oe_kurzbz_verantwortlich']) ? $_POST['oe_kurzbz_verantwortlich'] : null;
|
||||
$archiviert = isset($_POST['archiviert']) ? true : false;
|
||||
|
||||
$dms = new dms();
|
||||
if ($dms->load($dms_id, $version))
|
||||
@@ -432,6 +451,10 @@ if (isset($_POST['action']) && $_POST['action'] == 'rename')
|
||||
}
|
||||
$dms->updateamum = date('Y-m-d H:i:s');
|
||||
$dms->updatevon = $user;
|
||||
$gueltig_ab_date = DateTime::createFromFormat('d.m.Y', $gueltig_ab);
|
||||
$dms->gueltig_ab = $gueltig_ab_date->format('Y-m-d');
|
||||
$dms->oe_kurzbz_verantwortlich = $oe_kurzbz_verantwortlich;
|
||||
$dms->archiviert = $archiviert;
|
||||
|
||||
if ($dms->save(false))
|
||||
echo '<span class="ok">Dateiname wurde erfolgreich geändert</span>';
|
||||
@@ -1037,6 +1060,34 @@ else
|
||||
<td>CIS-Suche</td>
|
||||
<td><input type="checkbox" id="cis_suche_checkbox" name="cis_suche"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gültig ab</td>
|
||||
<td><input id="gueltig_ab" class="datepicker_datum" type="text" name="gueltig_ab" value=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Organisationseinheit: <br>(Upload, Ansicht, Änderungen)</td>
|
||||
<td>
|
||||
<select name="oe_kurzbz_verantwortlich">
|
||||
<option value="">-- Bitte Auswählen --</option>';
|
||||
foreach ($organisationseinheiten->result as $oe)
|
||||
{
|
||||
if ($oe_typ != $oe->organisationseinheittyp_kurzbz || $oe_typ == '')
|
||||
{
|
||||
if ($oe_typ != '') echo '</optgroup>';
|
||||
|
||||
echo '<optgroup label="'.$oe->organisationseinheittyp_kurzbz.'">';
|
||||
}
|
||||
echo '<option value="'.$oe->oe_kurzbz.'">'.$oe->organisationseinheittyp_kurzbz.' '.$oe->bezeichnung.'</option>';
|
||||
$oe_typ = $oe->organisationseinheittyp_kurzbz;
|
||||
}
|
||||
echo '
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Archiviert</td>
|
||||
<td><input type="checkbox" id="archiviert_checkbox" name="archiviert"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="file" name="userfile"></td>
|
||||
@@ -1555,6 +1606,7 @@ function drawFilesList($rows)
|
||||
function drawRenameForm($dms_id, $version, $page = NULL, $dpp = NULL, $searching, $searchstring)
|
||||
{
|
||||
global $kategorie_kurzbz;
|
||||
global $organisationseinheiten, $oe_typ;
|
||||
|
||||
$dms = new dms();
|
||||
if ($dms->load($dms_id, $version))
|
||||
@@ -1577,6 +1629,12 @@ function drawRenameForm($dms_id, $version, $page = NULL, $dpp = NULL, $searching
|
||||
echo '&dpp='.$dpp;
|
||||
echo '" method="POST">';
|
||||
}
|
||||
$gueltig_ab_date = '';
|
||||
if ($dms->gueltig_ab != null || $dms->gueltig_ab != '')
|
||||
{
|
||||
$tmp_date = date_create($dms->gueltig_ab);
|
||||
$gueltig_ab_date = $tmp_date->format('d.m.Y');
|
||||
}
|
||||
echo '
|
||||
<table>
|
||||
<tr>
|
||||
@@ -1599,6 +1657,37 @@ function drawRenameForm($dms_id, $version, $page = NULL, $dpp = NULL, $searching
|
||||
<td>CIS-Suche:</td>
|
||||
<td><input type="checkbox" name="cis_suche" '.($dms->cis_suche == 'true'?'checked="checked"':'').'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gültig ab</td>
|
||||
<td><input id="gueltig_ab" class="datepicker_datum" type="text" name="gueltig_ab" value="'.$gueltig_ab_date.'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Organisationseinheit: <br>(Upload, Ansicht, Änderungen)</td>
|
||||
<td>
|
||||
<select name="oe_kurzbz_verantwortlich">
|
||||
<option value="">-- Bitte Auswählen --</option>';
|
||||
foreach ($organisationseinheiten->result as $oe)
|
||||
{
|
||||
if ($oe_typ != $oe->organisationseinheittyp_kurzbz || $oe_typ == '')
|
||||
{
|
||||
if ($oe_typ != '') echo '</optgroup>';
|
||||
|
||||
echo '<optgroup label="'.$oe->organisationseinheittyp_kurzbz.'">';
|
||||
}
|
||||
$selected = '';
|
||||
if ($oe->oe_kurzbz == $dms->oe_kurzbz_verantwortlich)
|
||||
$selected = 'selected';
|
||||
echo '<option '.$selected.' value="'.$oe->oe_kurzbz.'">'.$oe->organisationseinheittyp_kurzbz.' '.$oe->bezeichnung.'</option>';
|
||||
$oe_typ = $oe->organisationseinheittyp_kurzbz;
|
||||
}
|
||||
echo '
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Archiviert</td>
|
||||
<td><input type="checkbox" id="archiviert_checkbox" name="archiviert" '.($dms->archiviert == 'true'?'checked="checked"':'').'></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="action" value="rename">
|
||||
<input type="hidden" name="dms_id" value="'.$dms_id.'">
|
||||
|
||||
+40
-3
@@ -51,6 +51,9 @@ class dms extends basis_db
|
||||
public $kategorie_oe_kurzbz;
|
||||
public $berechtigung_kurzbz;
|
||||
public $bezeichnung;
|
||||
public $gueltig_ab;
|
||||
public $oe_kurzbz_verantwortlich;
|
||||
public $archiviert;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
@@ -97,6 +100,9 @@ class dms extends basis_db
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$this->schlagworte = $row->schlagworte;
|
||||
$this->gueltig_ab = $row->gueltig_ab;
|
||||
$this->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$this->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -148,7 +154,7 @@ class dms extends basis_db
|
||||
|
||||
$qry.="INSERT INTO campus.tbl_dms_version(dms_id, version,
|
||||
filename, mimetype, name, beschreibung, letzterzugriff, insertamum, insertvon,
|
||||
updateamum, updatevon, cis_suche, schlagworte) VALUES(".
|
||||
updateamum, updatevon, cis_suche, schlagworte, oe_kurzbz_verantwortlich, gueltig_ab, archiviert) VALUES(".
|
||||
$dms_id.','.
|
||||
$this->db_add_param($this->version, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->filename).','.
|
||||
@@ -161,7 +167,11 @@ class dms extends basis_db
|
||||
$this->db_add_param($this->updateamum).','.
|
||||
$this->db_add_param($this->updatevon).','.
|
||||
$this->db_add_param($this->cis_suche, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->schlagworte).');';
|
||||
$this->db_add_param($this->schlagworte).','.
|
||||
$this->db_add_param($this->oe_kurzbz_verantwortlich).','.
|
||||
$this->db_add_param($this->gueltig_ab).','.
|
||||
$this->db_add_param($this->archiviert, FHC_BOOLEAN).
|
||||
');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -179,7 +189,10 @@ class dms extends basis_db
|
||||
" updateamum=".$this->db_add_param($this->updateamum).",".
|
||||
" updatevon=".$this->db_add_param($this->updatevon).",".
|
||||
" cis_suche=".$this->db_add_param($this->cis_suche, FHC_BOOLEAN).",".
|
||||
" schlagworte=".$this->db_add_param($this->schlagworte).
|
||||
" schlagworte=".$this->db_add_param($this->schlagworte).",".
|
||||
" archiviert=".$this->db_add_param($this->archiviert, FHC_BOOLEAN).",".
|
||||
" oe_kurzbz_verantwortlich=".$this->db_add_param($this->oe_kurzbz_verantwortlich).",".
|
||||
" gueltig_ab=".$this->db_add_param($this->gueltig_ab).
|
||||
" WHERE dms_id=".$this->db_add_param($this->dms_id,FHC_INTEGER)." AND version=".$this->db_add_param($this->version, FHC_INTEGER).";";
|
||||
}
|
||||
|
||||
@@ -685,6 +698,9 @@ class dms extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -789,6 +805,9 @@ class dms extends basis_db
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->berechtigung_kurzbz = $row->berechtigung_kurzbz;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -840,6 +859,9 @@ class dms extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -888,6 +910,9 @@ class dms extends basis_db
|
||||
$obj->version = $row->version;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -966,6 +991,9 @@ class dms extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -1017,6 +1045,9 @@ class dms extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -1069,6 +1100,9 @@ class dms extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -1425,6 +1459,9 @@ class dms extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->cis_suche = $this->db_parse_bool($row->cis_suche);
|
||||
$obj->schlagworte = $row->schlagworte;
|
||||
$obj->gueltig_ab = $row->gueltig_ab;
|
||||
$obj->oe_kurzbz_verantwortlich = $row->oe_kurzbz_verantwortlich;
|
||||
$obj->archiviert = $this->db_parse_bool($row->archiviert);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ require_once('dbupdate_3.4/67490_studstatus_suche_abort_controller_haengt.php');
|
||||
require_once('dbupdate_3.4/69065_Projektarbeiten_Firmen_verwalten.php');
|
||||
require_once('dbupdate_3.4/68744_StV_settings.php');
|
||||
require_once('dbupdate_3.4/62889_reihungstest_ueberwachung_mit_constructor.php');
|
||||
require_once('dbupdate_3.4/70806_DMS_Erweiterung_Metadaten.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -151,7 +152,7 @@ $tabellen=array(
|
||||
"campus.tbl_dms" => array("dms_id","oe_kurzbz","dokument_kurzbz","kategorie_kurzbz"),
|
||||
"campus.tbl_dms_kategorie" => array("kategorie_kurzbz","bezeichnung","beschreibung","parent_kategorie_kurzbz","oe_kurzbz","berechtigung_kurzbz"),
|
||||
"campus.tbl_dms_kategorie_gruppe" => array("kategorie_kurzbz","gruppe_kurzbz","insertamum","insertvon"),
|
||||
"campus.tbl_dms_version" => array("dms_id","version","filename","mimetype","name","beschreibung","letzterzugriff","updateamum","updatevon","insertamum","insertvon","cis_suche","schlagworte"),
|
||||
"campus.tbl_dms_version" => array("dms_id","version","filename","mimetype","name","beschreibung","letzterzugriff","updateamum","updatevon","insertamum","insertvon","cis_suche","schlagworte", "oe_kurzbz_verantwortlich", "gueltig_ab", "archiviert"),
|
||||
"campus.tbl_erreichbarkeit" => array("erreichbarkeit_kurzbz","beschreibung","farbe"),
|
||||
"campus.tbl_feedback" => array("feedback_id","betreff","text","datum","uid","lehrveranstaltung_id","updateamum","updatevon","insertamum","insertvon"),
|
||||
"campus.tbl_freebusy" => array("freebusy_id","uid","freebusytyp_kurzbz","url","aktiv","bezeichnung","insertamum","insertvon","updateamum","updatevon"),
|
||||
|
||||
Reference in New Issue
Block a user