Subversion Repositories Applications.referentiel

Rev

Rev 37 | Rev 39 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37 Rev 38
Line 12... Line 12...
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
13
 * @version		SVN: $Id$
13
 * @version		SVN: $Id$
14
 */
14
 */
15
class Versionnage extends AppliControleur {
15
class Versionnage extends AppliControleur {
Line -... Line 16...
-
 
16
	
16
	
17
	private $manuel = null;
Line 17... Line 18...
17
	private $referentiel = null;
18
	private $referentiel = null;
18
	
19
	
Line 19... Line 20...
19
	public function __construct()  {
20
	public function __construct()  {
20
		parent::__construct();
21
		parent::__construct();
21
		
22
		
22
		// Récupération de paramêtres
23
		// Récupération de paramêtres
-
 
24
		if (isset($_GET['ref'])) { // code du projet courrant
-
 
25
			$this->referentiel = strtolower($_GET['ref']);
23
		if (isset($_GET['ref'])) { // code du projet courrant
26
		}
Line 24... Line 27...
24
			$this->referentiel = strtolower($_GET['ref']);
27
		
25
		}
28
		$this->manuel = parse_ini_file(Config::get('chemin_appli').DS.'..'.DS.'configurations'.DS.'referentiel_v2.1.ini');
26
	}
29
	}
27
	
30
	
28
	//+----------------------------------------------------------------------------------------------------------------+
31
	//+----------------------------------------------------------------------------------------------------------------+
29
	// Méthodes
32
	// Méthodes
-
 
33
	/**
-
 
34
	 * Fonction d'affichage par défaut
-
 
35
	 */
-
 
36
	public function executerActionParDefaut() {
-
 
37
		return $this->afficherInterface();
-
 
38
	}
-
 
39
 
-
 
40
	/**
-
 
41
	 * Affiche le formulaire de demande de versionnage
-
 
42
	 */
-
 
43
	public function afficherInterface() {
-
 
44
		$donnees = array();
-
 
45
		// Paramêtres pour l'url du formulaire
-
 
46
		$this->url->unsetVariablesRequete(array('module', 'action', 'ref'));
-
 
47
		$donnees['url_form'] = $this->url->getUrl();
-
 
48
		$donnees['url_module'] = 'Versionnage';
-
 
49
		$donnees['url_action_demande'] = 'demanderTraitement';
-
 
50
		$donnees['url_action_rafraichir'] = 'afficherInterface';
-
 
51
		
-
 
52
		// Date de production de la version
-
 
53
		$donnees['date_prod'] = date('Y-m-d');
-
 
54
		 
-
 
55
		// Récupération des paramètres de configuration du manuel des référentiels
-
 
56
		$donnees['domaine_geo'] = explode(';', $this->manuel['domaine_geo']);
-
 
57
		$donnees['domaine_taxo'] = explode(';', $this->manuel['domaine_taxo']);
-
 
58
		$donnees['domaine_code'] = explode(';', $this->manuel['domaine_code']);
-
 
59
		$licences = explode(';', $this->manuel['licences']);
-
 
60
		foreach ($licences as $licence) {
-
 
61
			if (preg_match('/^([^<]+)<([^>]+)>/', $licence, $match)) {
-
 
62
				$info_licence = array();
-
 
63
				$info_licence['nom'] = $match[1];
-
 
64
				$info_licence['url'] = $match[2];
-
 
65
				$donnees['licences'][] = $info_licence;
30
	/**
66
			}
31
	 * Fonction d'affichage par défaut
67
		}
32
	 */
-
 
33
	public function executerActionParDefaut() {
68
		
34
		$this->construireMenu($this->referentiel);
69
		$this->setSortie(self::RENDU_CORPS, $this->getVue('form_version', $donnees), false);
35
		$this->construireFilAriane($this->referentiel);
70
		$this->construireMenu($this->referentiel);
36
		$this->setSortie(self::RENDU_CORPS, '<p>En cours de réalisation...</p>', false);
71
		$this->construireFilAriane($this->referentiel);