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" ...@@ -33,7 +33,7 @@ name = "mpidb_mpg_gfk"
[_own] [_own]
dn = "mpi-magdeburg.mpg.de" dn = "mpi-magdeburg.mpg.de"
notify = 30 notify = 30
version = 1.0.02 version = 1.0.03
mailto = "db-responsable@<domain>.mpg.de" mailto = "db-responsable@<domain>.mpg.de"
mailname = "db-admin" mailname = "db-admin"
......
-- views fuer db mpg_chem auf mpg_gfk tabellen
-- view auf list_lgk von db gfk - version mpg -- view auf list_lgk von db gfk - version mpg
CREATE OR REPLACE VIEW mpidb_mpg_chem.view_lgk AS CREATE OR REPLACE VIEW mpidb_mpg_chem.view_lgk AS
SELECT SELECT
...@@ -13,12 +15,7 @@ FROM ...@@ -13,12 +15,7 @@ FROM
-- view auf list_gefahr von db gfk - version mpg -- view auf list_gefahr von db gfk - version mpg
CREATE OR REPLACE VIEW mpidb_mpg_chem.view_gefahr AS CREATE OR REPLACE VIEW mpidb_mpg_chem.view_gefahr AS
SELECT SELECT
autoID, *
kategorie,
hsatz,
merkmal,
anweisung,
lgk
FROM FROM
mpidb_mpg_gfk.list_gefahr mpidb_mpg_gfk.list_gefahr
; ;
......
This diff is collapsed.
...@@ -32,6 +32,7 @@ IF ( SELECT MAX(version) FROM dataface__version ) < '1000' THEN ...@@ -32,6 +32,7 @@ IF ( SELECT MAX(version) FROM dataface__version ) < '1000' THEN
INSERT INTO dataface__version (version) VALUES ('1000'); INSERT INTO dataface__version (version) VALUES ('1000');
END IF; END IF;
-- CHANGES V1.0.01 - 2016-04-25 -- CHANGES V1.0.01 - 2016-04-25
-- **************************** -- ****************************
-- fs::rsync - asi policy view BA und SDB -- fs::rsync - asi policy view BA und SDB
...@@ -99,6 +100,41 @@ END IF; ...@@ -99,6 +100,41 @@ END IF;
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; END;
$$ $$
......
...@@ -22,10 +22,18 @@ widget:label = "Gefahrenhinweis" ...@@ -22,10 +22,18 @@ widget:label = "Gefahrenhinweis"
widget:type = "textarea" widget:type = "textarea"
display = inline display = inline
[cmr]
widget:type = checkbox
widget:label = "CMR-Stoff"
vocabulary = cmr
filter = 1
[anweisung] [anweisung]
# Typ: tinyint(1) # Typ: tinyint(1)
widget:type = checkbox widget:type = checkbox
vocabulary = anweisung vocabulary = anweisung
widget:label = BA notwendig
column:label = BA notw.
filter = 1 filter = 1
[lgk] [lgk]
......
...@@ -45,14 +45,12 @@ class tables_list_gefahr { ...@@ -45,14 +45,12 @@ class tables_list_gefahr {
return $record->val('lgk'); return $record->val('lgk');
} }
// mache aus 0 und 1 = ja und nein function valuelist__cmr() {
function anweisung__renderCell(&$record) { return array(0=>'nein', 1=>'ja');
if ($record->val('anweisung') == '1') return 'ja';
return 'nein';
} }
function valuelist__anweisung() { 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 @@ ...@@ -59,7 +59,14 @@
__sql__ = "SELECT ablageID, filename FROM view_ablageAll" __sql__ = "SELECT ablageID, filename FROM view_ablageAll"
#
# list_gefahr
#
[lagerklasse]
__sql__ = "SELECT lgk,CONCAT(lgk,' : ',beschreibung) from list_lgk"
# ENDE # ENDE
...@@ -14,7 +14,7 @@ CREATE OR REPLACE VIEW view_ablageAll AS ...@@ -14,7 +14,7 @@ CREATE OR REPLACE VIEW view_ablageAll AS
-- version mpg mit mpg_chem -- version mpg mit mpg_chem
-- entsprechend erweitern/anpassen, wenn mehr chemie-db's existieren -- 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 CREATE OR REPLACE VIEW view_ablageAll AS
SELECT SELECT
LPAD(mpg.ablageID, 6, '0') AS ablageID, LPAD(mpg.ablageID, 6, '0') AS ablageID,
......
...@@ -6,16 +6,15 @@ CREATE OR REPLACE VIEW view_chemAll AS ...@@ -6,16 +6,15 @@ CREATE OR REPLACE VIEW view_chemAll AS
'Fake Eintrag wenn keine chemDB' AS substanz, 'Fake Eintrag wenn keine chemDB' AS substanz,
'-' AS reinheit, '-' AS reinheit,
'-' AS lgk, '-' AS lgk,
'0' AS cmr,
'-' AS cas, '-' AS cas,
'-' AS einheit, '-' AS einheit,
'-' AS bFileID, '0' AS bFileID,
'-' AS bFilename, '-' AS bFilename,
'-' AS sFileID, '0' AS sFileID,
'-' AS sFilename, '-' AS sFilename,
'mpg' AS gruppe, 'mpg' AS gruppe,
'initial' AS bearbeiter, '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 ...@@ -28,7 +27,6 @@ CREATE OR REPLACE VIEW view_chemAll AS
mpg.substanz AS substanz, mpg.substanz AS substanz,
mpg.reinheit AS reinheit, mpg.reinheit AS reinheit,
mpg.lgk AS lgk, mpg.lgk AS lgk,
mpg.cmr AS cmr,
mpg.cas AS cas, mpg.cas AS cas,
mpg.einheit AS einheit, mpg.einheit AS einheit,
LPAD(mpg.bFileID, 6, '0') AS bFileID, LPAD(mpg.bFileID, 6, '0') AS bFileID,
...@@ -50,7 +48,6 @@ CREATE OR REPLACE VIEW view_chemAll AS ...@@ -50,7 +48,6 @@ CREATE OR REPLACE VIEW view_chemAll AS
bio.substanz AS substanz, bio.substanz AS substanz,
bio.reinheit AS reinheit, bio.reinheit AS reinheit,
bio.lgk AS lgk, bio.lgk AS lgk,
bio.cmr AS cmr,
bio.cas AS cas, bio.cas AS cas,
bio.einheit AS einheit, bio.einheit AS einheit,
LPAD(bio.bFileID, 6, '0') AS bFileID, LPAD(bio.bFileID, 6, '0') AS bFileID,
...@@ -67,7 +64,6 @@ UNION ALL ...@@ -67,7 +64,6 @@ UNION ALL
bpe.substanz AS substanz, bpe.substanz AS substanz,
bpe.reinheit AS reinheit, bpe.reinheit AS reinheit,
bpe.lgk AS lgk, bpe.lgk AS lgk,
bpe.cmr AS cmr,
bpe.cas AS cas, bpe.cas AS cas,
bpe.einheit AS einheit, bpe.einheit AS einheit,
LPAD(bpe.bFileID, 6, '0') AS bFileID, LPAD(bpe.bFileID, 6, '0') AS bFileID,
...@@ -85,7 +81,6 @@ UNION ALL ...@@ -85,7 +81,6 @@ UNION ALL
pcg.substanz AS substanz, pcg.substanz AS substanz,
pcg.reinheit AS reinheit, pcg.reinheit AS reinheit,
pcg.lgk AS lgk, pcg.lgk AS lgk,
pcg.cmr AS cmr,
pcg.cas AS cas, pcg.cas AS cas,
pcg.einheit AS einheit, pcg.einheit AS einheit,
LPAD(pcg.bFileID, 6, '0') AS bFileID, LPAD(pcg.bFileID, 6, '0') AS bFileID,
...@@ -103,7 +98,6 @@ UNION ALL ...@@ -103,7 +98,6 @@ UNION ALL
pse.substanz AS substanz, pse.substanz AS substanz,
pse.reinheit AS reinheit, pse.reinheit AS reinheit,
pse.lgk AS lgk, pse.lgk AS lgk,
pse.cmr AS cmr,
pse.cas AS cas, pse.cas AS cas,
pse.einheit AS einheit, pse.einheit AS einheit,
LPAD(pse.bFileID, 6, '0') AS bFileID, 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__] [__global__]
noLinkFromListView = 1 noLinkFromListView = 1
[autoID] [autoID]
visibility:list = hidden visibility:list = hidden
Key = PRI Key = PRI
order = 10
[tabID] [tabID]
visibility:list = hidden visibility:list = hidden
order = 20
[substanz] [substanz]
widget:label = "Substanz" widget:label = "Substanz"
filter = 1 filter = 1
order = 30
[kategorie] [kategorie]
widget:label = "Gefahrenklasse" widget:label = "Gefahrenklasse"
filter = 1 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] [gruppe]
filter = 1 filter = 1
order = 70
[bearbeiter] [bearbeiter]
order = 80
[zeitstempel] [zeitstempel]
order = 90
...@@ -27,9 +27,12 @@ class tables_view_gefahr { ...@@ -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>'; return '<div style="white-space:nowrap"><a href="/'.$subdb.'/index.php?-table='.$table.'&-action=browse&tabID='.$tabID.'">'.$subst.'</a></div>';
} }
function anweisung__renderCell(&$record) { function valuelist__cmr() {
if ($record->val('anweisung') == '1') return 'ja'; return array(0=>'nein', 1=>'ja');
return 'nein'; }
function valuelist__anweisung() {
return array(0=>'nein', 1=>'ja');
} }
// Formatiere Zeitstempel auf Deutsch // 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