diff --git a/materiels.tar.gz b/materiels.tar.gz index 65b8a9d..0c46472 100644 Binary files a/materiels.tar.gz and b/materiels.tar.gz differ diff --git a/src/lib/Entry.php b/src/lib/Entry.php index 9766c0f..a455462 100644 --- a/src/lib/Entry.php +++ b/src/lib/Entry.php @@ -4,7 +4,7 @@ namespace Garradin\Plugin\Materiels; use Garradin\DB; -class Entry // entrées définitives +class Entry { protected $columns_order = array( 'id', diff --git a/src/schema.sql b/src/schema.sql index 27d23fc..8af9085 100644 --- a/src/schema.sql +++ b/src/schema.sql @@ -22,31 +22,11 @@ CREATE TABLE IF NOT EXISTS plugin_materiels_entry ( FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_equipment( id ) ON DELETE RESTRICT ON UPDATE CASCADE ); -CREATE TABLE IF NOT EXISTS plugin_materiels_temporary_entry ( - id integer NOT NULL PRIMARY KEY autoincrement, - kind varchar(20) NOT NULL, - number_of_equipments integer NOT NULL, - equipment_id integer NOT NULL, - start_date date NOT NULL, - end_date date, - FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_equipment( id ) ON DELETE RESTRICT ON UPDATE CASCADE -); - CREATE TABLE IF NOT EXISTS plugin_materiels_output ( id integer NOT NULL PRIMARY KEY autoincrement, kind varchar(20) NOT NULL, number_of_equipments integer NOT NULL, equipment_id integer NOT NULL, output_date date NOT NULL, - FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_entry( equipment_id ) ON DELETE RESTRICT ON UPDATE CASCADE -); - -CREATE TABLE IF NOT EXISTS plugin_materiels_temporary_output ( - id integer NOT NULL PRIMARY KEY autoincrement, - kind varchar(20) NOT NULL, - number_of_equipments integer NOT NULL, - equipment_id integer NOT NULL, - start_date date NOT NULL, - end_date date, - FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_entry( equipment_id ) ON DELETE RESTRICT ON UPDATE CASCADE + FOREIGN KEY ( equipment_id ) REFERENCES plugin_materiels_equipment( id ) ON DELETE RESTRICT ON UPDATE CASCADE ); diff --git a/src/templates/_nav.tpl b/src/templates/_nav.tpl index 9ed7323..53d00bb 100644 --- a/src/templates/_nav.tpl +++ b/src/templates/_nav.tpl @@ -1,11 +1,9 @@ diff --git a/src/templates/entrees/definitives/deja_repertorie.tpl b/src/templates/entrees/deja_repertorie.tpl similarity index 66% rename from src/templates/entrees/definitives/deja_repertorie.tpl rename to src/templates/entrees/deja_repertorie.tpl index 1353504..a9f7c70 100644 --- a/src/templates/entrees/definitives/deja_repertorie.tpl +++ b/src/templates/entrees/deja_repertorie.tpl @@ -1,6 +1,6 @@ {include file="admin/_head.tpl" title="%s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id} -{include file="%s_nav.tpl"|args:$plugin_tpl current="entrees_definitives"} +{include file="%s_nav.tpl"|args:$plugin_tpl current="entrees"} déjà repertorie diff --git a/src/templates/entrees/definitives/index.tpl b/src/templates/entrees/index.tpl similarity index 84% rename from src/templates/entrees/definitives/index.tpl rename to src/templates/entrees/index.tpl index f09d0b5..4f7500a 100644 --- a/src/templates/entrees/definitives/index.tpl +++ b/src/templates/entrees/index.tpl @@ -1,9 +1,9 @@ {include file="admin/_head.tpl" title="%s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id} -{include file="%s_nav.tpl"|args:$plugin_tpl current="entrees_definitives"} +{include file="%s_nav.tpl"|args:$plugin_tpl current="entrees"}
diff --git a/src/templates/entrees/definitives/non_repertorie.tpl b/src/templates/entrees/non_repertorie.tpl similarity index 90% rename from src/templates/entrees/definitives/non_repertorie.tpl rename to src/templates/entrees/non_repertorie.tpl index 9a87bec..504d976 100644 --- a/src/templates/entrees/definitives/non_repertorie.tpl +++ b/src/templates/entrees/non_repertorie.tpl @@ -1,10 +1,10 @@ {include file="admin/_head.tpl" title="%s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id} -{include file="%s_nav.tpl"|args:$plugin_tpl current="entrees_definitives"} +{include file="%s_nav.tpl"|args:$plugin_tpl current="entrees"}