Commit b99c2250 authored by Gerd Schachtschneider's avatar Gerd Schachtschneider
Browse files

add field cmr

parent 577656c3
......@@ -33,7 +33,7 @@ name = "mpidb_mpg_gfk"
[_own]
dn = "mpi-magdeburg.mpg.de"
notify = 30
version = 1.0.02
version = 1.0.03
mailto = "db-responsable@<domain>.mpg.de"
mailname = "db-admin"
......
-- views fuer db mpg_chem auf mpg_gfk tabellen
-- view auf list_lgk von db gfk - version mpg
CREATE OR REPLACE VIEW mpidb_mpg_chem.view_lgk AS
SELECT
......@@ -13,12 +15,7 @@ FROM
-- view auf list_gefahr von db gfk - version mpg
CREATE OR REPLACE VIEW mpidb_mpg_chem.view_gefahr AS
SELECT
autoID,
kategorie,
hsatz,
merkmal,
anweisung,
lgk
*
FROM
mpidb_mpg_gfk.list_gefahr
;
......
This diff is collapsed.
......@@ -32,6 +32,7 @@ IF ( SELECT MAX(version) FROM dataface__version ) < '1000' THEN
INSERT INTO dataface__version (version) VALUES ('1000');
END IF;
-- CHANGES V1.0.01 - 2016-04-25
-- ****************************
-- fs::rsync - asi policy view BA und SDB
......@@ -99,6 +100,41 @@ END IF;
END IF;
-- CHANGES V1.0.03 - 2016-05-30
-- ****************************
-- fs::rsync - add field cmr in list_gefahr
-- db::list_gefahr - add field cmr in list_gefahr
-- db::view_chemALL - del field cmr
IF ( SELECT MAX(version) FROM dataface__version ) < '1003' THEN
-- add field cmr
ALTER TABLE list_gefahr ADD cmr TINYINT(1) NULL DEFAULT '0' AFTER merkmal ;
-- change view_chemAll mpg-version
CREATE OR REPLACE VIEW view_chemAll AS
SELECT
'1' AS tabID,
'Fake Eintrag wenn keine chemDB' AS substanz,
'-' AS reinheit,
'-' AS lgk,
'-' AS cas,
'-' AS einheit,
'0' AS bFileID,
'-' AS bFilename,
'0' AS sFileID,
'-' AS sFilename,
'mpg' AS gruppe,
'initial' AS bearbeiter,
'2016-05-30 11:34:18' AS zeitstempel
;
TRUNCATE dataface__version;
INSERT INTO dataface__version (version) VALUES ('1003');
END IF;
END;
$$
......
......@@ -22,10 +22,18 @@ widget:label = "Gefahrenhinweis"
widget:type = "textarea"
display = inline
[cmr]
widget:type = checkbox
widget:label = "CMR-Stoff"
vocabulary = cmr
filter = 1
[anweisung]
# Typ: tinyint(1)
widget:type = checkbox
vocabulary = anweisung
widget:label = BA notwendig
column:label = BA notw.
filter = 1
[lgk]
......
......@@ -45,14 +45,12 @@ class tables_list_gefahr {
return $record->val('lgk');
}
// mache aus 0 und 1 = ja und nein
function anweisung__renderCell(&$record) {
if ($record->val('anweisung') == '1') return 'ja';
return 'nein';
function valuelist__cmr() {
return array(0=>'nein', 1=>'ja');
}
function valuelist__anweisung() {
return array(0=>'nein', 1=>'ja');
return array(0=>'nein', 1=>'ja');
}
}
......
[lagerklasse]
__sql__ = "SELECT lgk,CONCAT(lgk,' : ',beschreibung) from list_lgk"
../valuelists.ini
\ No newline at end of file
......@@ -59,7 +59,14 @@
__sql__ = "SELECT ablageID, filename FROM view_ablageAll"
#
# list_gefahr
#
[lagerklasse]
__sql__ = "SELECT lgk,CONCAT(lgk,' : ',beschreibung) from list_lgk"
# ENDE
......@@ -14,7 +14,7 @@ CREATE OR REPLACE VIEW view_ablageAll AS
-- version mpg mit mpg_chem
-- entsprechend erweitern/anpassen, wenn mehr chemie-db's existieren
-- siehe Beispiel mpi-dcts (4db's) in ../tables/view_chemAll/view_chemAll.sql
-- siehe Beispiel mpi-dcts (4db's) in ../tables/view_ablageAll/view_ablageAll.sql
CREATE OR REPLACE VIEW view_ablageAll AS
SELECT
LPAD(mpg.ablageID, 6, '0') AS ablageID,
......
......@@ -6,16 +6,15 @@ CREATE OR REPLACE VIEW view_chemAll AS
'Fake Eintrag wenn keine chemDB' AS substanz,
'-' AS reinheit,
'-' AS lgk,
'0' AS cmr,
'-' AS cas,
'-' AS einheit,
'-' AS bFileID,
'0' AS bFileID,
'-' AS bFilename,
'-' AS sFileID,
'0' AS sFileID,
'-' AS sFilename,
'mpg' AS gruppe,
'initial' AS bearbeiter,
'2016-03-02 11:34:18' AS zeitstempel
'2016-05-03 11:34:18' AS zeitstempel
;
......@@ -28,7 +27,6 @@ CREATE OR REPLACE VIEW view_chemAll AS
mpg.substanz AS substanz,
mpg.reinheit AS reinheit,
mpg.lgk AS lgk,
mpg.cmr AS cmr,
mpg.cas AS cas,
mpg.einheit AS einheit,
LPAD(mpg.bFileID, 6, '0') AS bFileID,
......@@ -50,7 +48,6 @@ CREATE OR REPLACE VIEW view_chemAll AS
bio.substanz AS substanz,
bio.reinheit AS reinheit,
bio.lgk AS lgk,
bio.cmr AS cmr,
bio.cas AS cas,
bio.einheit AS einheit,
LPAD(bio.bFileID, 6, '0') AS bFileID,
......@@ -67,7 +64,6 @@ UNION ALL
bpe.substanz AS substanz,
bpe.reinheit AS reinheit,
bpe.lgk AS lgk,
bpe.cmr AS cmr,
bpe.cas AS cas,
bpe.einheit AS einheit,
LPAD(bpe.bFileID, 6, '0') AS bFileID,
......@@ -85,7 +81,6 @@ UNION ALL
pcg.substanz AS substanz,
pcg.reinheit AS reinheit,
pcg.lgk AS lgk,
pcg.cmr AS cmr,
pcg.cas AS cas,
pcg.einheit AS einheit,
LPAD(pcg.bFileID, 6, '0') AS bFileID,
......@@ -103,7 +98,6 @@ UNION ALL
pse.substanz AS substanz,
pse.reinheit AS reinheit,
pse.lgk AS lgk,
pse.cmr AS cmr,
pse.cas AS cas,
pse.einheit AS einheit,
LPAD(pse.bFileID, 6, '0') AS bFileID,
......
__sql__ = "SELECT vGef.*, lGef.cmr, lGef.anweisung, lGef.lgk FROM view_gefahr AS vGef LEFT JOIN list_gefahr AS lGef ON lGef.kategorie = vGef.kategorie ORDER BY zeitstempel DESC, vGef.tabID, lGef.hsatz"
[__global__]
noLinkFromListView = 1
[autoID]
visibility:list = hidden
Key = PRI
order = 10
[tabID]
visibility:list = hidden
order = 20
[substanz]
widget:label = "Substanz"
filter = 1
order = 30
[kategorie]
widget:label = "Gefahrenklasse"
filter = 1
order = 40
[lgk]
filter = 1
order = 50
[cmr]
widget:type = static
widget:label = "CMR"
vocabulary = cmr
filter = 1
order = 55
[anweisung]
widget:type = static
vocabulary = anweisung
widget:label = "BA"
filter = 1
order = 60
[gruppe]
filter = 1
order = 70
[bearbeiter]
order = 80
[zeitstempel]
order = 90
......@@ -27,9 +27,12 @@ class tables_view_gefahr {
return '<div style="white-space:nowrap"><a href="/'.$subdb.'/index.php?-table='.$table.'&-action=browse&tabID='.$tabID.'">'.$subst.'</a></div>';
}
function anweisung__renderCell(&$record) {
if ($record->val('anweisung') == '1') return 'ja';
return 'nein';
function valuelist__cmr() {
return array(0=>'nein', 1=>'ja');
}
function valuelist__anweisung() {
return array(0=>'nein', 1=>'ja');
}
// Formatiere Zeitstempel auf Deutsch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment