diff --git a/cache/.gitignore b/cache/.gitignore index f59ec20aab..dee5695746 100644 --- a/cache/.gitignore +++ b/cache/.gitignore @@ -1 +1 @@ -* \ No newline at end of file +*.* \ No newline at end of file diff --git a/config/doctrine/schema.yml b/config/doctrine/schema.yml index c6a78bc2cb..3a67c552cc 100755 --- a/config/doctrine/schema.yml +++ b/config/doctrine/schema.yml @@ -241,6 +241,7 @@ BibProgrammes: primary: true nom_programme: string(255) desc_programme: string() + actif: boolean(1) BibProgrammesFs: tableName: florestation.bib_programmes_fs columns: diff --git a/data/2154/data_synthese_2154.sql b/data/2154/data_synthese_2154.sql index 3708c6ec50..c040d448e7 100644 --- a/data/2154/data_synthese_2154.sql +++ b/data/2154/data_synthese_2154.sql @@ -613,13 +613,13 @@ INSERT INTO t_precisions (id_precision, nom_precision, desc_precision) VALUES (3 -- Data for Name: bib_programmes; Type: TABLE DATA; Schema: meta; Owner: - -- --faune -INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (3, 'Contact invertébrés', 'Contact aléatoire de la faune invertébrée.', true, 'Contact aléatoire de la faune invertébrée.'); -INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (1, 'Contact vertébrés', 'Contact aléatoire de la faune vertébrée.', true, 'Contact aléatoire de la faune vertébrée.'); -INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (2, 'Mortalité', 'Données issue du protocole mortalité.', true, 'Données issue du protocole mortalité.'); +INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (3, 'Contact invertébrés', 'Contact aléatoire de la faune invertébrée.', true, true, 'Contact aléatoire de la faune invertébrée.'); +INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, programme_public, desc_programme_public) VALUES (1, 'Contact vertébrés', 'Contact aléatoire de la faune vertébrée.', true, true, 'Contact aléatoire de la faune vertébrée.'); +INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, programme_public, desc_programme_public) VALUES (2, 'Mortalité', 'Données issue du protocole mortalité.', true, true, 'Données issue du protocole mortalité.'); --flore -INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (4, 'Flore prioritaire', 'Inventaire et suivi en présence absence de la Flore prioritaire.', true, 'Inventaire et suivi en présence absence de la Flore prioritaire.'); -INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (5, 'Flore station', 'Relevés stationnels et stratifiés de la flore.', true, 'Relevés stationnels et stratifiés de la flore.'); -INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, sitpn, desc_programme_sitpn) VALUES (6, 'Bryophytes', 'Relevés stationnels et non stratifiés de la flore bryophyte.', true, 'Relevés stationnels et non stratifiés de la flore bryophyte.'); +INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (4, 'Flore prioritaire', 'Inventaire et suivi en présence absence de la Flore prioritaire.', true, true, 'Inventaire et suivi en présence absence de la Flore prioritaire.'); +INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (5, 'Flore station', 'Relevés stationnels et stratifiés de la flore.', true, true, 'Relevés stationnels et stratifiés de la flore.'); +INSERT INTO bib_programmes (id_programme, nom_programme, desc_programme, actif, programme_public, desc_programme_public) VALUES (6, 'Bryophytes', 'Relevés stationnels et non stratifiés de la flore bryophyte.', true, true, 'Relevés stationnels et non stratifiés de la flore bryophyte.'); -- -- TOC entry 3370 (class 0 OID 55751) diff --git a/data/2154/synthese_2154.sql b/data/2154/synthese_2154.sql index 1f7892a6d8..9431b666a8 100644 --- a/data/2154/synthese_2154.sql +++ b/data/2154/synthese_2154.sql @@ -4171,8 +4171,9 @@ CREATE TABLE bib_programmes ( id_programme integer NOT NULL, nom_programme character varying(255), desc_programme text, - sitpn boolean, - desc_programme_sitpn text + actif boolean, + programme_public boolean, + desc_programme_public text ); -- diff --git a/lib/model/doctrine/BibProgrammesTable.class.php b/lib/model/doctrine/BibProgrammesTable.class.php index 6a61f5f4a6..cfe1a3ba9c 100755 --- a/lib/model/doctrine/BibProgrammesTable.class.php +++ b/lib/model/doctrine/BibProgrammesTable.class.php @@ -12,7 +12,8 @@ public static function listProgrammes() { $query = Doctrine_Query::create() ->select('id_programme, nom_programme, desc_programme') - ->from('BibProgrammes') + ->from('BibProgrammes') + ->where('actif = true') ->orderBy('nom_programme ASC'); $programmes = $query->fetchArray(); return $programmes; diff --git a/lib/model/doctrine/base/BaseBibProgrammes.class.php b/lib/model/doctrine/base/BaseBibProgrammes.class.php index e2b05e74f4..37221f8f89 100755 --- a/lib/model/doctrine/base/BaseBibProgrammes.class.php +++ b/lib/model/doctrine/base/BaseBibProgrammes.class.php @@ -8,15 +8,18 @@ * @property integer $id_programme * @property string $nom_programme * @property string $desc_programme + * @property boolean $actif * @property Doctrine_Collection $BibLots * * @method integer getIdProgramme() Returns the current record's "id_programme" value * @method string getNomProgramme() Returns the current record's "nom_programme" value * @method string getDescProgramme() Returns the current record's "desc_programme" value + * @method boolean getActif() Returns the current record's "actif" value * @method Doctrine_Collection getBibLots() Returns the current record's "BibLots" collection * @method BibProgrammes setIdProgramme() Sets the current record's "id_programme" value * @method BibProgrammes setNomProgramme() Sets the current record's "nom_programme" value * @method BibProgrammes setDescProgramme() Sets the current record's "desc_programme" value + * @method BibProgrammes setActif() Sets the current record's "actif" value * @method BibProgrammes setBibLots() Sets the current record's "BibLots" collection * * @package geonature @@ -42,6 +45,10 @@ public function setTableDefinition() 'type' => 'string', 'length' => '', )); + $this->hasColumn('actif', 'boolean', 1, array( + 'type' => 'boolean', + 'length' => 1, + )); } public function setUp() diff --git a/lib/model/doctrine/base/BaseTStationsBryo.class.php b/lib/model/doctrine/base/BaseTStationsBryo.class.php index 5eb107ddd4..80fa132ac0 100644 --- a/lib/model/doctrine/base/BaseTStationsBryo.class.php +++ b/lib/model/doctrine/base/BaseTStationsBryo.class.php @@ -146,9 +146,9 @@ public function setTableDefinition() 'type' => 'integer', 'length' => 4, )); - $this->hasColumn('info_acces', 'string', 255, array( + $this->hasColumn('info_acces', 'string', 1000, array( 'type' => 'string', - 'length' => 255, + 'length' => 1000, )); $this->hasColumn('complet_partiel', 'string', 1, array( 'type' => 'string', diff --git a/lib/model/doctrine/base/BaseTStationsFs.class.php b/lib/model/doctrine/base/BaseTStationsFs.class.php index d7e22704af..9662472d5e 100644 --- a/lib/model/doctrine/base/BaseTStationsFs.class.php +++ b/lib/model/doctrine/base/BaseTStationsFs.class.php @@ -216,9 +216,9 @@ public function setTableDefinition() 'notnull' => true, 'length' => 25, )); - $this->hasColumn('info_acces', 'string', 1000, array( + $this->hasColumn('info_acces', 'string', 255, array( 'type' => 'string', - 'length' => 1000, + 'length' => 255, )); $this->hasColumn('complet_partiel', 'string', 1, array( 'type' => 'string',