// id du role referent
Configure::write('Constante.referentId', 2);
// id pour l'entrée lozere nouvell vie
-Configure::write('Constante.LNV',1);
+Configure::write('Constante.LNV', 1);
// email du coordonnateur on utilise la bdd maintenant
-configure::write('Email.Coordonnateur','reseauaccueil48@gmail.com');
+configure::write('Email.Coordonnateur', 'reseauaccueil48@gmail.com');
// hauteur des champs multiples
-configure::write('Contante.hauteur',5);
-configure::write('Contante.hContenu',8);
+configure::write('Contante.hauteur', 5);
+configure::write('Contante.hContenu', 8);
+
+// pagination (nombre par page)
+configure::write('pagination.nombre',20);
+
+
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 2);
- Configure::write('Config.language','fra');
+ Configure::write('Config.language', 'fra');
/**
* Configure the Error handler used to handle errors for your application. By default
--- /dev/null
+--- Necessite ckephp_validate_core.sql pour les check
+
+
+-------------------------------------------------------
+BEGIN;
+------------------------------------------------------
+
+
+
+------------------------------------
+-- roles : hasMany utilisateurs
+------------------------------------
+
+DROP TABLE IF EXISTS roles CASCADE ;
+CREATE TABLE roles (
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(50) NOT NULL
+
+);
+
+
+
+
+----------------------------------------------------------
+--- user : hasOne roles, hasMany echanges
+----------------------------------------------------------
+
+DROP TABLE IF EXISTS users CASCADE ;
+CREATE TABLE users (
+
+id SERIAL NOT NULL PRIMARY KEY,
+role_id INTEGER NOT NULL REFERENCES roles(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+username VARCHAR(255) NOT NULL UNIQUE,
+password VARCHAR(255) NOT NULL,
+nom VARCHAR(50) NOT NULL,
+prenom VARCHAR(50) NOT NULL,
+couriel VARCHAR(255) NOT NULL CHECK(cakephp_validate_email(couriel)),
+estactif BOOL NOT NULL,
+created TIMESTAMP WITHOUT TIME ZONE,
+modified TIMESTAMP WITHOUT TIME ZONE
+
+);
+
+
+
+
+----------------------------------------
+--- evaluations
+----------------------------------------
+DROP TABLE IF EXISTS evaluations CASCADE;
+CREATE TABLE evaluations(
+
+id SERIAL NOT NULL PRIMARY KEY,
+mention VARCHAR(1000) NOT NULL,
+daterappel Date,
+estpositive BOOL
+);
+
+
+
+
+
+------------------------------------------
+--- projets :
+-------------------------------------------
+
+DROP TABLE IF EXISTS projets CASCADE ;
+CREATE TABLE projets (
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+
+);
+
+
+
+
+-----------------------------------------
+--- secteurs
+----------------------------------------
+DROP TABLE IF EXISTS secteurs CASCADE ;
+CREATE TABLE secteurs (
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+
+----------------------------------------------------
+--- avancements
+----------------------------------------------------
+
+DROP TABLE IF EXISTS avancements CASCADE;
+CREATE TABLE avancements(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+
+
+
+------------------------------------------
+--- civilites :
+-------------------------------------------
+
+DROP TABLE IF EXISTS civilites CASCADE ;
+CREATE TABLE civilites (
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(50) NOT NULL
+
+);
+
+
+
+----------------------------------------------
+--- situations
+----------------------------------------------
+
+DROP TABLE IF EXISTS situations CASCADE;
+CREATE TABLE situations(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(50) NOT NULL
+);
+
+
+
+
+
+
+----------------------------------------------------
+--- etats
+----------------------------------------------------
+
+DROP TABLE IF EXISTS etats CASCADE;
+CREATE TABLE etats(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(100) NOT NULL
+
+);
+
+
+
+
+
+
+
+
+
+
+
+----------------------------------------------------
+--- entrees
+----------------------------------------------------
+
+DROP TABLE IF EXISTS entrees CASCADE;
+CREATE TABLE entrees(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(100) NOT NULL
+);
+
+
+
+
+
+
+
+
+----------------------------------------------------
+--- besoinssante
+----------------------------------------------------
+
+DROP TABLE IF EXISTS besoinssante CASCADE;
+CREATE TABLE besoinssante(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+
+----------------------------------------------------
+--- professions
+----------------------------------------------------
+
+DROP TABLE IF EXISTS professions CASCADE;
+CREATE TABLE professions(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+
+
+
+------------------------------------------
+--- contacts :
+-------------------------------------------
+
+DROP TABLE IF EXISTS contacts CASCADE ;
+CREATE TABLE contacts (
+
+id SERIAL NOT NULL PRIMARY KEY,
+nom VARCHAR(50) NOT NULL,
+prenom VARCHAR(50) NOT NULL,
+datenaissance DATE NOT NULL,
+telephone VARCHAR(15) NOT NULL,
+mobile VARCHAR(15),
+couriel VARCHAR(255) NOT NULL CHECK(cakephp_validate_email(couriel)),
+created TIMESTAMP WITHOUT TIME ZONE,
+modified TIMESTAMP WITHOUT TIME ZONE,
+echeance DATE,
+date_attribution DATE,
+autreprofession VARCHAR(255),
+estdemandeurrenseign BOOL,
+professionsante VARCHAR(255),
+estpersonneacharge BOOL,
+usercreateur INTEGER,
+profession_id INTEGER NOT NULL REFERENCES professions(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+civilite_id INTEGER NOT NULL REFERENCES civilites(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+situation_id INTEGER REFERENCES situations(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+
+
+contact_id INTEGER REFERENCES contacts(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+etat_id INTEGER REFERENCES etats(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+entree_id INTEGER NOT NULL REFERENCES entrees(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+user_id INTEGER REFERENCES users(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+
+
+
+
+
+evaluation_id INTEGER REFERENCES evaluations(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+projet_id INTEGER NOT NULL REFERENCES projets(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+autreprojet VARCHAR(500),
+
+autresecteur VARCHAR(50)
+
+);
+
+
+
+----------------------------------------------------
+--- teletravails
+----------------------------------------------------
+
+DROP TABLE IF EXISTS teletravails CASCADE;
+CREATE TABLE teletravails(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(50) NOT NULL
+);
+
+
+
+----------------------------------------------------
+--- emplois
+----------------------------------------------------
+
+DROP TABLE IF EXISTS emplois CASCADE;
+CREATE TABLE emplois(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+teletravail_id INTEGER NOT NULL REFERENCES teletravails(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+secteuractivite VARCHAR(255),
+estrenseignementteletravail BOOL
+);
+
+
+
+
+----------------------------------------------------
+--- localisations
+----------------------------------------------------
+
+DROP TABLE IF EXISTS localisations CASCADE;
+CREATE TABLE localisations(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+----------------------------------------------------
+--- installations
+----------------------------------------------------
+
+DROP TABLE IF EXISTS installations CASCADE;
+CREATE TABLE installations(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+periode VARCHAR(255) NOT NULL,
+autrelocalisation VARCHAR(255),
+autremotivation VARCHAR(1000),
+localisation_id INTEGER REFERENCES localisations(id) --ON DELETE CASCADE ON UPDATE CASCADE
+
+);
+
+
+
+
+
+----------------------------------------------------
+--- motivations
+----------------------------------------------------
+
+DROP TABLE IF EXISTS motivations CASCADE;
+CREATE TABLE motivations(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+
+
+----------------------------------------------------
+--- installations_motivations HABTM
+-------------------------------------------------
+
+DROP TABLE IF EXISTS installations_motivations CASCADE;
+CREATE TABLE installations_motivations(
+
+id SERIAL NOT NULL PRIMARY KEY,
+installation_id INTEGER NOT NULL REFERENCES installations(id) ON DELETE CASCADE ON UPDATE CASCADE,
+motivation_id INTEGER NOT NULL REFERENCES motivations(id) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+
+
+
+
+
+
+
+----------------------------------------------------
+--- niveaux
+----------------------------------------------------
+
+DROP TABLE IF EXISTS niveaux CASCADE;
+CREATE TABLE niveaux(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+
+);
+
+----------------------------------------------------
+--- nombres
+----------------------------------------------------
+
+DROP TABLE IF EXISTS nombres CASCADE;
+CREATE TABLE nombres(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+
+);
+
+
+
+----------------------------------------------------
+--- sejours
+----------------------------------------------------
+
+DROP TABLE IF EXISTS sejours CASCADE;
+CREATE TABLE sejours(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+
+);
+
+
+
+----------------------------------------------------
+--- raisons
+----------------------------------------------------
+
+DROP TABLE IF EXISTS raisons CASCADE;
+CREATE TABLE raisons(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+
+);
+
+
+----------------------------------------------------
+--- connaissances
+----------------------------------------------------
+
+DROP TABLE IF EXISTS connaissances CASCADE;
+CREATE TABLE connaissances(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+commentsite VARCHAR(1000) NOT NULL,
+autreraison VARCHAR(255),
+niveau_id INTEGER NOT NULL REFERENCES niveaux(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+nombre_id INTEGER REFERENCES nombres(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+sejour_id INTEGER REFERENCES sejours(id) --ON DELETE CASCADE ON UPDATE CASCADE
+
+);
+
+
+
+
+
+
+------------------------------------------------------
+--- connaissances_raisons
+------------------------------------------------------
+
+DROP TABLE IF EXISTS connaissances_raisons CASCADE;
+CREATE TABLE connaissances_raisons(
+
+id SERIAL NOT NULL PRIMARY KEY,
+connaissance_id INTEGER NOT NULL REFERENCES connaissances(id) ON DELETE CASCADE ON UPDATE CASCADE,
+raison_id INTEGER NOT NULL REFERENCES raisons(id) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+
+
+
+
+------------------------------------------
+--- entreprises :
+-------------------------------------------
+
+DROP TABLE IF EXISTS entreprises CASCADE ;
+CREATE TABLE entreprises (
+
+id SERIAL NOT NULL PRIMARY KEY,
+secteur_id INTEGER REFERENCES secteurs(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+avancement_id INTEGER REFERENCES avancements(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+contact_id INTEGER REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+autresecteur VARCHAR(255),
+autreprojet VARCHAR(1000),
+descriptif VARCHAR(1000)
+);
+
+
+
+---------------------------------------------------
+--- salaries
+--------------------------------------------------
+DROP TABLE IF EXISTS salaries CASCADE;
+CREATE TABLE salaries(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+----------------------------------------------------
+--- evaluationprojets
+----------------------------------------------------
+
+DROP TABLE IF EXISTS evaluationprojets CASCADE;
+CREATE TABLE evaluationprojets(
+
+id SERIAL NOT NULL PRIMARY KEY,
+salarie_id INTEGER, --REFERENCES salaries(id) ON DELETE CASCADE ON UPDATE CASCADE,
+contact_id INTEGER REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+estevalue BOOL,
+montantpersonnel INTEGER,
+montantmobilisable INTEGER,
+apportdiverse INTEGER,
+estprevisionnel BOOL,
+estapport BOOL,
+nombreemploi INTEGER,
+autrebesoin VARCHAR(50)
+);
+
+
+
+----------------------------------------------------
+--- besoins
+----------------------------------------------------
+
+DROP TABLE IF EXISTS besoins CASCADE;
+CREATE TABLE besoins(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+);
+
+
+
+
+-----------------------------------------------------
+--- besoins_evaluationprojets (table de liaison) HABTM
+-----------------------------------------------------
+
+DROP TABLE IF EXISTS besoins_evaluationprojets CASCADE;
+CREATE TABLE besoins_evaluationprojets(
+
+id SERIAL NOT NULL PRIMARY KEY,
+besoin_id INTEGER NOT NULL REFERENCES besoins(id) ON DELETE CASCADE ON UPDATE CASCADE,
+evaluationprojet_id INTEGER NOT NULL REFERENCES evaluationprojets(id) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+
+
+----------------------------------------------------
+--- conjoints
+----------------------------------------------------
+
+DROP TABLE IF EXISTS conjoints CASCADE;
+CREATE TABLE conjoints(
+
+id SERIAL NOT NULL PRIMARY KEY,
+profession_id INTEGER NOT NULL REFERENCES professions(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+civilite_id INTEGER NOT NULL REFERENCES civilites(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+contact_id INTEGER REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+nom VARCHAR(50),
+prenom VARCHAR(50),
+datenaissance DATE,
+autreprofession VARCHAR(255),
+experience VARCHAR(1000),
+formation VARCHAR(1000)
+
+);
+
+
+
+----------------------------------------------------
+--- experiences (et formation)
+----------------------------------------------------
+
+DROP TABLE IF EXISTS experiences CASCADE;
+CREATE TABLE experiences(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+formation VARCHAR(1000) ,
+experience VARCHAR(1000)
+
+);
+
+
+
+----------------------------------------------------
+--- typevoies
+----------------------------------------------------
+
+DROP TABLE IF EXISTS typevoies CASCADE;
+CREATE TABLE typevoies(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(50) NOT NULL
+);
+
+
+-------------------------------------------------
+--- adresses
+-------------------------------------------------
+
+DROP TABLE IF EXISTS adresses CASCADE;
+CREATE TABLE adresses(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+typevoie_id INTEGER REFERENCES typevoies(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+ville VARCHAR(255) NOT NULL,
+codepostal VARCHAR(5) NOT NULL,
+numero VARCHAR(15),
+nomvoie VARCHAR(255),
+complement VARCHAR(255)
+
+);
+
+
+
+------------------------------------------
+---- types
+-----------------------------------------
+DROP TABLE IF EXISTS types CASCADE;
+CREATE TABLE types(
+
+id SERIAL NOT NULL PRIMARY KEY,
+name VARCHAR(255) NOT NULL
+
+);
+
+
+
+------------------------------------------
+--- echanges : hasOne users, hasOne contacts
+------------------------------------------
+
+DROP TABLE IF EXISTS echanges CASCADE ;
+CREATE TABLE echanges (
+
+id SERIAL NOT NULL PRIMARY KEY,
+user_id INTEGER REFERENCES users(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+type_id INTEGER NOT NULL REFERENCES types(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+sujet VARCHAR(255) NOT NULL,
+contenu VARCHAR(2000) NOT NULL,
+created TIMESTAMP WITHOUT TIME ZONE,
+modified TIMESTAMP WITHOUT TIME ZONE
+);
+
+
+-----------------------------------------------------
+--- besoinssante_contacts (table de liaison) HABTM
+-----------------------------------------------------
+
+DROP TABLE IF EXISTS besoinssante_contacts CASCADE;
+CREATE TABLE besoinssante_contacts(
+
+id SERIAL NOT NULL PRIMARY KEY,
+besoinsante_id INTEGER NOT NULL REFERENCES besoinssante(id) ON DELETE CASCADE ON UPDATE CASCADE,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE
+);
+
+
+----------------------------------------------------
+--- personnesacharge
+----------------------------------------------------
+
+DROP TABLE IF EXISTS personnesacharge CASCADE;
+CREATE TABLE personnesacharge(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+age INTEGER NOT NULL
+);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+-----------------------------------------------------
+--- modifications = contacts_users (table de liaison) HABTM (action modifier par un autre user et questions)
+-----------------------------------------------------
+
+DROP TABLE IF EXISTS modifications CASCADE;
+CREATE TABLE modifications(
+
+id SERIAL NOT NULL PRIMARY KEY,
+contact_id INTEGER NOT NULL REFERENCES contacts(id) ON DELETE CASCADE ON UPDATE CASCADE,
+user_id INTEGER REFERENCES users(id), --ON DELETE CASCADE ON UPDATE CASCADE,
+created TIMESTAMP WITHOUT TIME ZONE,
+questions VARCHAR(2000) NOT NULL,
+estvue BOOL
+);
+
+
+
+
+
+-----------------------------------------------------
+--- Parametrage table des parametrage que l'admin pourra modifier, d'autre champs à prevoir
+-----------------------------------------------------
+
+DROP TABLE IF EXISTS parametrages CASCADE;
+CREATE TABLE parametrages(
+
+id SERIAL NOT NULL PRIMARY KEY,
+coordonnateurCouriel varchar(255) CHECK(cakephp_validate_email(coordonnateureCouriel)),
+dureeRetardJours INTEGER NOT NULL,
+dureeEcheanceMois INTEGER NOT NULL
+);
+
+
+
+
+------------------------------------------------
+COMMIT;
+---------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+BEGIN;
+
+-------------------------
+--- roles *****
+------------------------
+
+INSERT INTO roles VALUES (DEFAULT,'Coordonnateur');
+INSERT INTO roles VALUES (DEFAULT,'Référent');
+INSERT INTO roles VALUES (DEFAULT,'Autre membre');
+
+----------------------------
+--- entrée *****
+----------------------------
+
+INSERT INTO entrees VALUES (DEFAULT,'Site LNV');
+INSERT INTO entrees VALUES (DEFAULT,'Salon');
+INSERT INTO entrees VALUES (DEFAULT,'Couriel');
+INSERT INTO entrees VALUES (DEFAULT,'Contact téléphonique');
+
+---------------------------
+--- etats *****
+---------------------------
+
+INSERT INTO etats VALUES (DEFAULT,'Prospect');
+INSERT INTO etats VALUES (DEFAULT,'Projet accompagné');
+INSERT INTO etats VALUES (DEFAULT,'Classé sans suite');
+INSERT INTO etats VALUES (DEFAULT,'Installé');
+--INSERT INTO etats VALUES (DEFAULT,'Brouillon');
+
+-------------------------
+--- professions *****
+-------------------------
+
+INSERT INTO professions VALUES (DEFAULT,'Agriculteur');
+INSERT INTO professions VALUES (DEFAULT,'Artisan');
+INSERT INTO professions VALUES (DEFAULT,'Chef d''entreprise');
+INSERT INTO professions VALUES (DEFAULT,'Demandeur d''emploi');
+INSERT INTO professions VALUES (DEFAULT,'Profession libérale');
+INSERT INTO professions VALUES (DEFAULT,'Salarié');
+INSERT INTO professions VALUES (DEFAULT,'Autre');
+
+------------------------------
+--- typevoies
+-----------------------------
+INSERT INTO typevoies VALUES (DEFAULT,'Rue');
+INSERT INTO typevoies VALUES (DEFAULT,'Route');
+INSERT INTO typevoies VALUES (DEFAULT,'Avenue');
+INSERT INTO typevoies VALUES (DEFAULT,'Square');
+INSERT INTO typevoies VALUES (DEFAULT,'Place');
+INSERT INTO typevoies VALUES (DEFAULT,'Chemin');
+INSERT INTO typevoies VALUES (DEFAULT,'Allée');
+INSERT INTO typevoies VALUES (DEFAULT,'Boulevard');
+INSERT INTO typevoies VALUES (DEFAULT,'Impasse');
+
+
+-----------------------------------
+--- situations
+----------------------------------
+INSERT INTO situations VALUES (DEFAULT,'Célibataire');
+INSERT INTO situations VALUES (DEFAULT,'Union libre');
+INSERT INTO situations VALUES (DEFAULT,'Pacsé(e)');
+INSERT INTO situations VALUES (DEFAULT,'Marié(e)');
+INSERT INTO situations VALUES (DEFAULT,'Divorcé(e)');
+INSERT INTO situations VALUES (DEFAULT,'Veuf(ve)');
+
+
+
+--------------------------------------
+--- civilités
+-------------------------------------
+INSERT INTO civilites VALUES (DEFAULT,'Madame');
+INSERT INTO civilites VALUES (DEFAULT,'Monsieur');
+
+
+-------------------------------------
+--- localisations
+------------------------------------
+INSERT INTO localisations VALUES (DEFAULT,'Mende - Vallée du Lot');
+INSERT INTO localisations VALUES (DEFAULT,'Langogne - Margeride Est');
+INSERT INTO localisations VALUES (DEFAULT,'St Chély d''Apcher - Aubrac - Margeride Ouest');
+INSERT INTO localisations VALUES (DEFAULT,'Marvejols - Lot - Colagne');
+INSERT INTO localisations VALUES (DEFAULT,'Florac - Gorges - Causses - Cévennes');
+INSERT INTO localisations VALUES (DEFAULT,'Autre');
+
+
+
+-----------------------------------
+--- motivations
+----------------------------------
+INSERT INTO motivations VALUES (DEFAULT,'Changement de cadre de vie');
+INSERT INTO motivations VALUES (DEFAULT,'Rapprochement de liens familiaux / amicaux');
+INSERT INTO motivations VALUES (DEFAULT,'Opportunité professionnelle');
+INSERT INTO motivations VALUES (DEFAULT,'Autre');
+
+
+-----------------------------------
+--- sejours
+----------------------------------
+
+INSERT INTO sejours VALUES (DEFAULT,'Oui');
+INSERT INTO sejours VALUES (DEFAULT,'Non');
+INSERT INTO sejours VALUES (DEFAULT,'Peut etre');
+
+
+------------------------------------
+--- nombres
+-----------------------------------
+INSERT INTO nombres VALUES (DEFAULT,'Jamais');
+INSERT INTO nombres VALUES (DEFAULT,'Une seule fois');
+INSERT INTO nombres VALUES (DEFAULT,'2 à 5 fois');
+INSERT INTO nombres VALUES (DEFAULT,'Plusieurs fois');
+
+
+
+-------------------------------------
+--- raisons
+-------------------------------------
+INSERT INTO raisons VALUES (DEFAULT,'J''ai des origines en Lozère');
+INSERT INTO raisons VALUES (DEFAULT,'J''ai de la famille en Lozère');
+INSERT INTO raisons VALUES (DEFAULT,'J''y ai passé des vacances');
+INSERT INTO raisons VALUES (DEFAULT,'J''ai des amis en Lozère');
+INSERT INTO raisons VALUES (DEFAULT,'J''y ai vécu');
+INSERT INTO raisons VALUES (DEFAULT,'Autre');
+
+
+
+
+---------------------------------
+--- niveaux
+---------------------------------
+INSERT INTO niveaux VALUES (DEFAULT,'Oui, très bien');
+INSERT INTO niveaux VALUES (DEFAULT,'Oui, un peu');
+INSERT INTO niveaux VALUES (DEFAULT,'Non, pas du tout');
+
+
+
+
+-----------------------------------
+--- teletravails
+----------------------------------
+INSERT INTO teletravails VALUES (DEFAULT,'Oui');
+INSERT INTO teletravails VALUES (DEFAULT,'Non');
+INSERT INTO teletravails VALUES (DEFAULT,'Peut-etre');
+
+
+
+---------------------------
+--- besoins
+---------------------------
+
+INSERT INTO besoins VALUES (DEFAULT,'J''ai besoin d''une formation dans mon domaine d''activité');
+INSERT INTO besoins VALUES (DEFAULT,'J''ai besoin d''être accompagné pour définir mon projet');
+INSERT INTO besoins VALUES (DEFAULT,'J''ai besoin d''être accompagné pour le montage de mon projet');
+INSERT INTO besoins VALUES (DEFAULT,'J''ai besoin de renseignements sur des ressources ou des partenaires financiers');
+INSERT INTO besoins VALUES (DEFAULT,'J''ai besoin de trouver des partenaires technique');
+INSERT INTO besoins VALUES (DEFAULT,'J''ai besoin de trouver un local professionnel ou du foncier pour mon activité');
+INSERT INTO besoins VALUES (DEFAULT,'Autre');
+
+
+---------------------------
+--- besoinssante
+---------------------------
+
+INSERT INTO besoinssante VALUES (DEFAULT,'J''ai besoin de renseignement sur les dispositifs d''aide à l''installation');
+INSERT INTO besoinssante VALUES (DEFAULT,'J''ai besoin de renseignement sur les structures medicales (centres hospitaliers, maisons de santés, etc)');
+INSERT INTO besoinssante VALUES (DEFAULT,'J''ai besoin de renseignement sur la télémédecine');
+INSERT INTO besoinssante VALUES (DEFAULT,'J''ai besoin de renseignement sur l''organisation de la permanence des soins');
+
+
+---------------------------------------
+--- projets
+---------------------------------------
+Insert INTO projets VALUES(DEFAULT,'Je souhaite créer ou remprendre une entreprise');
+Insert INTO projets VALUES(DEFAULT,'Je souhaite exercer une activité salariée');
+Insert INTO projets VALUES(DEFAULT,'J''exerce une profession libérale de santé et je souhaite m''installer en Lozère');
+Insert INTO projets VALUES(DEFAULT,'Autre');
+
+
+
+
+
+-----------------------------------------
+--- secteurs
+-----------------------------------------
+Insert INTO secteurs VALUES(DEFAULT,'-Aucun-');
+Insert INTO secteurs VALUES(DEFAULT,'Commerce');
+Insert INTO secteurs VALUES(DEFAULT,'Artisanat');
+Insert INTO secteurs VALUES(DEFAULT,'Agriculture');
+Insert INTO secteurs VALUES(DEFAULT,'Service');
+Insert INTO secteurs VALUES(DEFAULT,'Industrie');
+Insert INTO secteurs VALUES(DEFAULT,'Tourisme');
+Insert INTO secteurs VALUES(DEFAULT,'Autre');
+
+
+
+--------------------------------
+--- avancements
+----------------------------------
+Insert INTO avancements VALUES(DEFAULT,'-Aucun-');
+Insert INTO avancements VALUES(DEFAULT,'J''en suis encore au stade de la réflexion');
+Insert INTO avancements VALUES(DEFAULT,'J''ai une idée, je cherche à la développer');
+Insert INTO avancements VALUES(DEFAULT,'Mon projet est en cours d''élaboration');
+Insert INTO avancements VALUES(DEFAULT,'Mon projet est prêt');
+Insert INTO avancements VALUES(DEFAULT,'J''ai déjà un dossier de présentation');
+Insert INTO avancements VALUES(DEFAULT,'Mon activité existe, je souhaite la transférer');
+
+
+
+-----------------------------------------
+--- salaries
+-----------------------------------------
+INSERT INTO salaries VALUES(DEFAULT,'je suis travailleur indépendant');
+INSERT INTO salaries VALUES(DEFAULT,'mon activité va générer des emplois d''ici 3 ans');
+
+
+
+----------------------------------
+--- types
+---------------------------------
+INSERT INTO types VALUES(DEFAULT,'Téléphone');
+INSERT INTO types VALUES(DEFAULT,'Couriel');
+INSERT INTO types VALUES(DEFAULT,'Visioconférence');
+INSERT INTO types VALUES(DEFAULT,'Salon/Evénement');
+INSERT INTO types VALUES(DEFAULT,'Rencontre bureau');
+INSERT INTO types VALUES(DEFAULT,'Visite sur site');
+INSERT INTO types VALUES(DEFAULT,'Autre');
+
+
+
+
+
+------------------------------------
+--- parametrages
+-----------------------------------
+
+INSERT INTO parametrages VALUES(DEFAULT,'reseauaccueil48@gmail.com',5,2);
+
+
+
+COMMIT;
*
* @author rdubourget
*/
-
App::uses('CakeEmail', 'Network/Email');
App::uses("User", "Model");
App::uses("Contact", "Model");
App::uses("Modification", "Model");
App::uses("Parametrage", "Model");
+
class RetardShell extends Shell {
+
/**
* fonction qui appel toutes les autres
*/
$Param = ClassRegistry::init('Parametrage');
$result = $Param->find('first');
$coordonnateurEmail = $result['Parametrage']['coordonnateurcouriel'];
-
-
+
+
$Email = new CakeEmail('gmail');
$Email->to($dest)
->cc($coordonnateurEmail)
->from('reseauaccueil48@gmail.com')
->subject($title)
- ->send($content);
+ ->send($content);
}
/**
*
* fonction d'envoie de messages en cas de retard
*/
- public function Retard($champ, $title, $content) {
+ private function Retard($champ, $title, $content) {
$contact = ClassRegistry::init('Contact');
// recherche de tous les users ayant un nouveau contact en retard
'recursive' => -1,
'contain' => array('User'),
'conditions' => array(
- 'Contact.' . $champ . ' <' => date('Y-m-d', strtotime('-5 days')),
- 'NOT' => array('Contact.' . $champ . ' <' => date('Y-m-d', strtotime('-6 days')))
+ 'Contact.' . $champ . ' <' => date('Y-m-d', strtotime(-$this->dureeRetard().' days')),
+ 'NOT' => array('Contact.' . $champ . ' <' => date('Y-m-d', strtotime((-$this->dureeRetard()-1).' days')))
)
));
}
}
-
/**
* envoie de message en cas de non consultation de contact de plus de 5jours
*/
$this->retard('date_attribution', $title, $content);
}
-
/**
*
* envoie de message en cas de retard d'echeance de plus de 5 jours
$content = __d('email', 'content echeanceRetard');
$this->retard('echeance', $title, $content);
}
-
+
/**
* envoie de message en cas de modificaion non consulté de plus de 5jours
*/
'recursive' => 2,
'conditions' => array(
'Modification.estvue' => false,
- 'Modification.created <' => date('Y-m-d', strtotime('-5 days')),
- 'NOT' => array('Modification.created <' => date('Y-m-d', strtotime('-6 days')))
+ 'Modification.created <' => date('Y-m-d', strtotime(-$this->dureeRetard() . ' days')),
+ 'NOT' => array('Modification.created <' => date('Y-m-d', strtotime((-$this->dureeRetard()-1).' days')))
),
)
);
$this->out($res['Contact']['User']['couriel']);
+
$content = $content . 'Référent : ' . $res['Contact']['User']['username'];
$content = $content . ' / ' . 'Contact : ' . $res['Contact']['nom'] . ' ' . $res['Contact']['prenom'];
}
}
+ private function dureeRetard() {
+ $param = ClassRegistry::init('Parametrage');
+ $result = $param->find('first');
+ return $result['Parametrage']['dureeretardjours'];
+ }
+
+ private function dureeEcheance() {
+ $param = ClassRegistry::init('Parametrage');
+ $result = $param->find('first');
+ return $result['Parametrage']['dureeecheancemois'];
+ }
+
}
*/
class AppController extends Controller {
- public $components = array('Auth', 'Session', 'Login');
+ public $components = array('Auth', 'Session', 'Login','Duree');
public $helper = array('Html', 'Form', 'Session', 'Login', 'Contact');
public function beforeFilter() {
--- /dev/null
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of DureeComponent
+ *
+ * @author rdubourget
+ */
+App::uses("Parametrage", "Model");
+
+class DureeComponent extends Component {
+
+ public function retard() {
+
+ $param = ClassRegistry::init('Parametrage');
+ $result = $param->find('first');
+ return $result['Parametrage']['dureeretardjours'];
+ }
+
+ public function echeance() {
+ $param = ClassRegistry::init('Parametrage');
+ $result = $param->find('first');
+ return $result['Parametrage']['dureeecheancemois'];
+ }
+
+}
public function beforeFilter() {
parent::beforeFilter();
- $this->Auth->allow('add','success');
-
+ $this->Auth->allow('add', 'success');
}
public function success() {
if (!$this->Auth->user('id') > 0) {
//le type d'entrée pour l'internaute est tjs LNV
$this->request->data['Contact']['entree_id'] = Configure::read('Constante.LNV');
+ } else {
+ // on stock l'id de l'utilisateur qui crée le contact
+ $this->request->data['Contact']['usercreateur'] = $this->Auth->user('id');
}
//on cree un date d'echeance qui se trouvera à 2 mois que pour la creation pas pour l'edit !
- $this->request->data['Contact']['echeance'] = date('Y-m-d', strtotime('+2 month'));
+ $this->request->data['Contact']['echeance'] = date('Y-m-d', strtotime($this->Duree->echeance() . ' month'));
if ($this->Contact->sauvegarde($this->request->data)) {
- $this->Session->setFlash(__d('flash','enregistrement reussi'),'flash_custom');
+ $this->Session->setFlash(__d('flash', 'enregistrement reussi'), 'flash_custom');
$this->redirect(array('action' => 'success'));
}
}
// Vérifier que l'enregistrement est bien eu lieu
if ($this->Contact->sauvegarde($this->request->data)) {
- $this->Session->setFlash(__d('flash','enregistrement reussi'),'flash_custom');
+ $this->Session->setFlash(__d('flash', 'enregistrement reussi'), 'flash_custom');
$this->redirect(array('action' => 'success'));
}
'conditions' => array(
'contact_id' => $id
))));
+
+ // avec une jointure
+ $this->set('createur', $this->Contact->User->find('first', array(
+ 'recursive' => -1,
+ 'joins' => array(
+ array(
+ 'table' => 'contacts',
+ 'alias' => 'ContactJoin',
+ 'type' => 'INNER',
+ 'conditions' => array(
+ 'ContactJoin.id' => $id,
+ 'User.id = ContactJoin.usercreateur'
+ ))),
+ 'fields' => array('User.username', 'User.nom', 'User.prenom')
+ )));
}
}
public function beforeFilter() {
parent::beforeFilter();
- $this->isActif();
+ $this->isActif(); //et minreferent !
}
public function add() {
if ($this->request->is('Ajax')) {
$this->autoRender = false;
-
+
$currentUser = CakeSession::read("Auth.User.id");
-
+
//recupere l'id de l'user et on le stock dans le tableau
$this->request->data['Echange']['user_id'] = $currentUser;
} else {
$this->response->statusCode(500);
}
+ }
+ }
+ /*public function afficheAjax($id) {
-
- }
+ $this->autoRender = false;
+
+ // on recherche tous les echanges correspondant à ce contact
+ $result = $this->Echange->find('all', array(
+ 'recursive' => -1,
+ 'contain' => array('User','Type'),
+ 'conditions' => array('contact_id' => $id),
+ 'fields' => array('Echange.sujet', 'Echange.created', 'Echange.contenu', 'Type.name', 'User.nom', 'User.prenom')
+ ));
+
+
+ // on remet en forme (on skip la cle Echange)
+ // $data = Hash::extract($result, '{n}.Echange');
+
+
+
+
+
+
+
+ //$myData = array('premier'=> 'prem', 'deuxieme' => 'deux');
+ echo json_encode($result);
}
+ */
}
}
public $uses = array('Contact');
+ public $components = array('Paginator');
/**
* Renvoie sur la vue d'administration
*/
public function allContacts() {
-
- $this->set('listeContact', $this->Contact->find('all', array(
- 'recursive' => -1,
- 'contain' => array('User'),
- 'fields' => array('Contact.nom', 'Contact.prenom', 'Contact.etat_id', 'Contact.id', 'User.id', 'User.prenom', 'User.nom'),
- 'order' => array('Contact.nom')
- )));
+
+
+ $this->Paginator->settings = array(
+ 'recursive' => -1,
+ 'contain' => array('User'),
+ 'fields' => array('Contact.nom', 'Contact.prenom', 'Contact.etat_id', 'Contact.id', 'User.id', 'User.prenom', 'User.nom'),
+ 'order' => array('Contact.nom' => 'ASC'),
+ 'limit' => configure::read('pagination.nombre')
+ );
+
+ $res = $this->Paginator->paginate('Contact');
+
+ $this->set('listeContact', $res);
+
}
- /**
+
+
+ /**
* Renvoie sur la page contenant la liste des contacts suivis
*
*/
+
public function followedContacts() {
// Verifie si au moins referent
$this->minReferent();
- //tous les contacts TODO paginer !
+
$uID = CakeSession::read("Auth.User.id");
- $this->set('listeASuivre', $this->Contact->find('all', array(
+
+ $this->Paginator->settings = array(
+ 'recursive' => -1,
+ 'conditions' => array('Contact.user_id' => $uID),
+ 'fields' => array('nom', 'prenom', 'id'),
+ 'order' => array('nom' => 'ASC'),
+ 'limit' => configure::read('pagination.nombre')
+ );
+
+ $res = $this->Paginator->paginate('Contact');
+ $this->set('listeASuivre',$res);
+
+
+ /*$this->set('listeASuivre', $this->Contact->find('all', array(
'recursive' => -1,
'conditions' => array('Contact.user_id' => $uID),
'fields' => array('nom', 'prenom', 'id'),
'order' => array('nom')
- )));
+ )));*/
}
/**
}
}
+ /**
+ *
+ * @param type $uID
+ * @return type
+ *
+ * retourne les nouveau contact de moins de 5j
+ */
private function listenouveauxContacts($uID) {
// Liste des nouveaux contacts
$res = $this->Contact->find('all', array(
'recursive' => -1,
'conditions' => array(
'Contact.user_id' => $uID,
- 'NOT' => array('Contact.date_attribution' => null)),
+ 'NOT' => array(
+ 'Contact.date_attribution' => null,
+ 'Contact.date_attribution <' => date('Y-m-d', strtotime(- $this->Duree->retard() . ' days')))),
'fields' => array('nom', 'prenom', 'id', 'date_attribution'),
'order' => 'date_attribution'
));
return $res;
}
+ /**
+ *
+ * @param type $uID
+ * @return type
+ *
+ * retourne les modification de moins de 5j
+ */
private function listeModificationsContacts($uID) {
$res = $this->Contact->Modification->find('all', array(
'fields' => array('Contact.user_id', 'Contact.id', 'Contact.nom', 'Contact.prenom', 'Modification.contact_id', 'Modification.user_id', 'Modification.id', 'Modification.questions', 'Modification.created', 'Modification.estvue', 'User.nom', 'User.prenom'),
- 'conditions' => array('Contact.user_id' => $uID, 'Modification.estvue' => false),
+ 'conditions' => array(
+ 'Contact.user_id' => $uID,
+ 'Modification.estvue' => false,
+ 'NOT' => array('Modification.created <' => date('Y-m-d', strtotime(- $this->Duree->retard() . ' days')))),
'order' => 'Contact.nom'
));
return $res;
}
+ /**
+ *
+ * @param type $uID
+ * @return type
+ *
+ * retourne les échéances de moins de 5j
+ */
private function listeEcheancesContacts($uID) {
$res = $this->Contact->find('all', array(
'recursive' => -1,
'fields' => array('nom', 'prenom', 'echeance', 'id'),
- 'conditions' => array('Contact.user_id' => $uID, 'Contact.echeance <' => date('Y-m-d')),
+ 'conditions' => array(
+ 'Contact.user_id' => $uID,
+ 'Contact.echeance <' => date('Y-m-d'),
+ 'NOT' => array('Contact.echeance <' => date('Y-m-d', strtotime(- $this->Duree->retard() . ' days')))),
'order' => 'echeance'
));
$res = $this->Contact->find('all', array(
'recursive' => -1,
'fields' => array('nom', 'prenom', 'echeance', 'id'),
- 'conditions' => array('Contact.user_id' => $uID, 'Contact.echeance <' => date('Y-m-d', strtotime('-5 days'))),
+ 'conditions' => array('Contact.user_id' => $uID, 'Contact.echeance <' => date('Y-m-d', strtotime(- $this->Duree->retard() . ' days'))),
'order' => 'echeance'
));
private function listeModificationsRetard($uID) {
$res = $this->Contact->Modification->find('all', array(
'fields' => array('Contact.user_id', 'Contact.id', 'Contact.nom', 'Contact.prenom', 'Modification.contact_id', 'Modification.user_id', 'Modification.id', 'Modification.questions', 'Modification.created', 'Modification.estvue', 'User.nom', 'User.prenom'),
- 'conditions' => array('Contact.user_id' => $uID, 'Modification.estvue' => false, 'Modification.created <' => date('Y-m-d', strtotime('-5 days'))),
+ 'conditions' => array('Contact.user_id' => $uID, 'Modification.estvue' => false, 'Modification.created <' => date('Y-m-d', strtotime(- $this->Duree->retard() . ' days'))),
'order' => 'Modification.created'
));
'recursive' => -1,
'conditions' => array(
'Contact.user_id' => $uID,
- 'Contact.date_attribution <' => date('Y-m-d', strtotime('-5 days'))),
+ 'Contact.date_attribution <' => date('Y-m-d', strtotime(- $this->Duree->retard() . ' days'))),
'fields' => array('nom', 'prenom', 'id', 'date_attribution'),
'order' => 'date_attribution'
));
$this->redirect(array(
'action' => 'administrer'
));
- }else{
+ } else {
$this->Session->setFlash(__d('flash', 'contact suppress erreur'), 'flash_custom');
}
}
$this->set('listeUsers', $listeUsers);
}
- public function add($id = null) {
+ //enlever le $id =null !)
+ public function add() {
if ($this->request->is('post')) {
}
$this->Session->setFlash(__d('flash', 'user add error'), 'flash_custom');
}
+ $this->set('roles', $this->User->Role->find('list'));
+ }
+ public function view($id) {
if ($id) {
- $user = $this->User->findById($id);
+ $user = $this->User->find('first', array(
+ 'recursive' => -1,
+ 'conditions' => array('User.id' => $id)
+ ));
$this->request->data = $user;
}
+
$this->set('roles', $this->User->Role->find('list'));
}
* @author rdubourget
*/
class ModificationsController extends AppController {
-
+
public $components = array('Mail');
-
+
public function beforeFilter() {
parent::beforeFilter();
$this->isActif();
}
-
+
public function saveQuestions() {
debug($this->request->data);
$currentUser = CakeSession::read("Auth.User.id");
$this->Modification->create();
$modification = array('Modification' => array(
-
'contact_id' => $this->request->data['Contact']['id'],
'user_id' => $currentUser,
'estvue' => false,
if ($this->Modification->save($modification)) {
// envoie un email au referent
$this->Mail->emailModification($this->request->data['Contact']['id']);
- $this->response->statusCode(200);
+ $this->response->statusCode(200);
} else {
- $this->response->statusCode(500);
+ $this->response->statusCode(500);
}
-
-
-
}
}
public function vuAjax() {
if ($this->request->is('Ajax')) {
$this->autoRender = false;
- /*
- debug($this->request->data['id']);
-
- $modification = array('Modification' => array(
- 'id' => $this->request->data['id'],
- 'estvue' => true
-
- ));
- */
+ /*
+ debug($this->request->data['id']);
+
+ $modification = array('Modification' => array(
+ 'id' => $this->request->data['id'],
+ 'estvue' => true
+
+ ));
+ */
$this->Modification->id = $this->request->data['id'];
if ($this->Modification->saveField('estvue', true)) {
- $this->response->statusCode(200);
+ $this->response->statusCode(200);
} else {
- $this->response->statusCode(500);
+ $this->response->statusCode(500);
}
return response;
-
-
-
-
}
}
--- /dev/null
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of ParametrageController
+ *
+ * @author rdubourget
+ */
+class ParametrageController extends AppController {
+
+ public function beforeFilter() {
+ parent::beforeFilter();
+ $this->minCoordonnateur();
+ }
+
+ public function parametrer() {
+
+ if ($this->request->is('put')) {
+
+ if ($this->Parametrage->save($this->request->data)) {
+ $this->Session->setFlash(__d('flash', 'Modification(s) Effectuée(s)'), 'flash_custom');
+ }
+ }
+
+ $result = $this->Parametrage->find('first');
+ $this->request->data = $result;
+ //$this->Session->setFlash(__d('flash', 'Attention, change les parametres du systeme'), 'flash_custom');
+ }
+
+}
* @author rdubourget
*/
class RechercherController extends AppController {
+
public function beforeFilter() {
parent::beforeFilter();
$this->isActif();
}
+
public $uses = array('Contact');
/**
}
}
+ /**
+ * recherche par createur du contact
+ */
+ public function rechercherCreateur() {
+
+ if ($this->request->is('Post')) {
+ if (isset($this->request->data['Rechercher']['user_id'])) {
+
+ $user = $this->request->data['Rechercher']['user_id'];
+
+
+
+ $this->set('resultat', $this->recherche('usercreateur', $user, 'Contact.nom'));
+ }
+ $this->render('rechercheresult');
+ }
+ }
+
/**
* Function de recherche generique, retourne un tableau de resultat
* @param type $condition
'contain' => array('Adresse', 'User'),
'conditions' => array('Adresse.codepostal like' => $departement),
'fields' => array('Contact.id', 'Contact.nom', 'Contact.prenom', 'Contact.created', 'User.nom', 'User.prenom', 'Adresse.codepostal'),
- 'order' => 'Contact.nom'
+ 'order' => 'Contact.nom'
));
$this->set('resultat', $res);
}
$this->render('rechercheresult');
}
-
- }
+ }
}
if ($this->Auth->login()) {
return $this->redirect($this->Auth->redirect());
}
- $this->Session->setFlash(__d('flash','login erreur'),'flash_custom');
+ $this->Session->setFlash(__d('flash', 'login erreur'), 'flash_custom');
}
}
public function logout() {
- $this->Session->setFlash(__d('flash','logout'),'flash_custom');
+ $this->Session->setFlash(__d('flash', 'logout'), 'flash_custom');
return $this->redirect($this->Auth->logout());
}
-msgid ""
-msgstr ""
+msgid "entree"
+msgstr "Type d'entrée"
msgstr "Rôle"
-msgid ""
-msgstr ""
+msgid "consultation utilisateur"
+msgstr "Consultation utilisateur"
msgid ""
--- /dev/null
+msgid "contact a valider"
+msgstr "Contact(s) à valider"
+
+
+msgid "contact a attribuer"
+msgstr "Contact(s) à attribuer"
+
+msgid "tous les contacts"
+msgstr "Tous les contacts"
+
+
+msgid "liste contacts suivis"
+msgstr "Liste des contacts suivis"
+
+
+msgid "date attribution"
+msgstr "Date d'attribution"
+
+
+
+msgid "nom"
+msgstr "Nom"
+
+
+msgid "prenom"
+msgstr "Prenom"
+
+msgid "action"
+msgstr "Action"
+
+
+
+msgid "referent"
+msgstr "Référent"
+
+
+
+msgid "nouveaux contacts retard"
+msgstr "Nouveau(x) contact(s) en retard"
+
+
+msgid "modifie retard"
+msgstr "Contact(s) modifie(s) ou avec des questions en retard "
+
+msgid "modifie par"
+msgstr "Modifié par"
+
+
+msgid "date"
+msgstr "Date"
+
+msgid "date echeance"
+msgstr "Date d'échéance"
+
+
+msgid "echeance retard"
+msgstr "Echeance en retard"
+
+
+msgid "contact echeance"
+msgstr "Contact(s) avec une échéance"
+
+
+msgid "nouveau contact"
+msgstr "Nouveau(x) contact(s)"
+
+
+msgid "contact modifie"
+msgstr "contact(s) modifié(s) ou avec des questions"
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
--- /dev/null
+msgid "utilisateur"
+msgstr "Utilisateurs"
+
+
+msgid "nom"
+msgstr "Nom"
+
+msgid "prenom"
+msgstr "Prenom"
+
+
+msgid "username"
+msgstr "Username"
+
+msgid "role"
+msgstr "Rôle"
+
+
+msgid "etat"
+msgstr "Etat"
+
+msgid "action"
+msgstr "Action"
+
+
+msgid ""
+msgstr ""
+
+msgid ""
+msgstr ""
--- /dev/null
+msgid "addUser"
+msgstr "Nouvel utilisateur"
+
+msgid "desactiver"
+msgstr "Désactiver"
+
+
+msgid "activer"
+msgstr "Activer"
+
+msgid "consulter"
+msgstr "Consulter"
+
+
+msgid "supprimer"
+msgstr "Supprimer"
+
+msgid "desattribuer"
+msgstr "Désattribuer"
+
+
+msgid "valider"
+msgstr "Valider"
+
+msgid "visualiser"
+msgstr "Visualiser"
+
+
+msgid "creer"
+msgstr "Créer"
+
+msgid ""
+msgstr ""
--- /dev/null
+
+msgid "parametrage"
+msgstr "Parametrage"
+
+
+msgid "coordonnateurecouriel"
+msgstr "Adresse email du coordonnateur :"
+
+
+
+msgid "retard"
+msgstr "Retard avant rappel : "
+
+
+msgid "dureeecheance"
+msgstr "Durée entre deux échéances : "
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+msgid ""
+msgstr ""
+
+
+
+msgid ""
+msgstr ""
\ No newline at end of file
// pour un test bidon
- public function bidon($nombre){
+ public function bidon($nombre) {
if($nombre > 10){
return true;
}else{
- public function beforeSave($options = Array()) {
+ public function beforeSave($options = array()) {
$this->data['User']['password'] = AuthComponent::password($this->data['User']['password']);
return true;
}
<?php echo $this->element('Contacts/suivi'); ?>
-
</div>
<?php endif; ?>
* desactive la validation du form quand press enter
*
*/
- $(document).on("keypress", 'form', function(e) {
+
+
+
+ /**
+ * pour ajouter des personnes à charge
+ *
+ */
+ var lastRow = 0;
+
+
+ $('#ContactEditForm').bind("keyup keypress", function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
e.preventDefault();
}
});
-
-
-
-
- /**
- * pour ajouter des personnes à charge
- *
- */
- var lastRow = 0;
function addPersonne() {
lastRow++;
}
});
-
-
/**
* prevalidation du form
*
var error = 0;
var regEmail = new RegExp('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$');
var regNb = new RegExp('^[0-9]+$');
-
-
-
// verificaion si c'est un couple que le conjoint est bien renseigné
if (onglet == '#premier') {
if (isCouple()) {
$("#ConjointNom, #ConjointPrenom, #ConjointDatenaissanceDay, #ConjointDatenaissanceMonth, #ConjointDatenaissanceYear").removeAttr('required');
}
$("#ConjointNom, #ConjointPrenom, #ConjointDatenaissanceDay, #ConjointDatenaissanceMonth, #ConjointDatenaissanceYear").css('border', '1px solid #CCC');
-
// verification que l'email est valide
if (!regEmail.test($('#ContactCouriel').val())) {
$('#ContactCouriel').css('border', '2px solid red');
}
}
-
-
-
+
+
+
// Verification des champs obligatoires
$(this).focus();
}
});
-
// verification que le number en sont bien
$(":input[type='number']", onglet).each(function() {
$(this).css('border', '2px solid green');
}
});
-
-
-
-
-
-
if (error > 0) {
return false;
} else {
+
+<?php if ($this->Login->isLogged()): ?>
+ <div class ="well perso-top-buffer">
+ <?php if (isset($createur)) : ?>
+
+ <b>Utilisateur createur :</b> <br />
+ <b>Nom : </b> <?php echo $createur['User']['nom'] ?> <br />
+ <b>Prenom : </b><?php echo $createur['User']['prenom'] ?> <br />
+ <b>Username : </b><?php echo $createur['User']['username'] ?> <br />
+ <div class="perso-top-buffer"></div>
+ <?php endif; ?>
+
+ <?php
+ echo $this->Form->input('Contact.entree_id', array(
+ 'label' => __d('contact', 'entree'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ ?>
+
+
+ </div>
+<?php endif; ?>
+
+
+
+
+
<div class="panel panel-default perso-top-buffer">
<div class="panel-heading">
<h2 class="panel-title"><?php echo __d('formulaire', 'etatCivil'); ?></h2>
-
<div class ="well">
- <?php if ($this->Login->isLogged()): ?>
- <?php
- echo $this->Form->input('Contact.entree_id', array(
- 'label' => __d('contact', 'entree'),
- 'div' => array('class' => 'form-group'),
- 'class' => 'form-control'));
- ?>
- <?php endif; ?>
<fieldset>
<!-- affiche les personnes a charge si il s'agit d'un edit et que l'user est loggé-->
-<?php if ($this->request->data && $this->Login->isLogged()) : ?>
+ <?php if ($this->request->data && $this->Login->isLogged()) : ?>
<ul>
<?php foreach ($personneACharge as $personne): ?>
<li><?php echo $personne['Personneacharge']['age'] ?> ans</li>
- <?php endforeach; ?>
+ <?php endforeach; ?>
</ul>
-<?php endif; ?>
+ <?php endif; ?>
<?php
- echo $this->Form->button(__d('formulaire','precedent'), array(
+ echo $this->Form->button(__d('formulaire', 'precedent'), array(
'type' => 'button',
'onclick' => 'page(1)',
'class' => 'btn btn-primary'));
<div class="btn-group">
<?php
- echo $this->Form->button(__d('formulaire','precedent'), array(
+ echo $this->Form->button(__d('formulaire', 'precedent'), array(
'type' => 'button',
'onclick' => 'page(0)',
'class' => 'btn btn-primary'));
?>
<?php
- echo $this->Form->button(__d('formulaire','suivant'), array(
+ echo $this->Form->button(__d('formulaire', 'suivant'), array(
'type' => 'button',
'onclick' => 'page(2,\'#deuxieme\')',
'class' => 'btn btn-primary'));
<!-- Bouton pour aller à l'onglet suivant-->
<?php
- echo $this->Form->button(__d('formulaire','suivant'), array(
+ echo $this->Form->button(__d('formulaire', 'suivant'), array(
'type' => 'button',
'onclick' => 'page(1,\'#premier\')',
'class' => 'btn btn-primary'));
<td>
<!-- Modifiable seulement si coordonnateur ou le referent du contact-->
<?php if ($role_id == Configure::read('Constante.coordonnateurId') || $this->Login->isreferent($this->request->data['User']['id'])) : ?>
- <button id="bt_change_etat" class="btn btn-lg btn-danger " >
- <span class="glyphicon glyphicon-ok"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'valider') ?>">
+ <button id="bt_change_etat" class="btn btn-lg btn-danger " >
+ <span class="glyphicon glyphicon-ok"></span>
+ </button>
+ </span>
<?php endif; ?>
</td>
</tr>
</td>
<td>
<?php if ($role_id == Configure::read('Constante.coordonnateurId')): ?>
- <button id="bt_change_user" class="btn btn-lg btn-danger ">
+ <span title="<?php echo __d('hoverMouse', 'valider') ?>">
+ <button id="bt_change_user" class="btn btn-lg btn-danger ">
- <span class="glyphicon glyphicon-ok"></span>
- </button>
+ <span class="glyphicon glyphicon-ok"></span>
+ </button>
+ </span>
<?php endif ?>
</td>
<?php echo $nombreEchanges ?> <?php echo __d('formulaire', 'echange(s)'); ?>
</td>
<td>
- <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modal-historique-echange">
- <span class="glyphicon glyphicon-eye-open"></span>
- </button>
- <?php if ($this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
- <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#modal-echange">
- <span class="glyphicon glyphicon-comment"></span>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modal-historique-echange">
+ <span class="glyphicon glyphicon-eye-open"></span>
</button>
+ </span>
+ <?php if ($this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
+ <span title="<?php echo __d('hoverMouse', 'creer') ?>">
+ <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#modal-echange">
+ <span class="glyphicon glyphicon-comment"></span>
+ </button>
+ </span>
<?php endif; ?>
</td>
</tr>
<?php echo __d('formulaire', 'modifications questions'); ?>
</td>
<td>
- <?php echo $nombreModifNonVues ?><?php echo __d('formulaire', 'non vue(s)'); ?>
+ <?php echo $nombreModifNonVues ?>
+ <?php echo __d('formulaire', 'non vue(s)'); ?>
</td>
<td>
<?php if ($this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
- <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modal-historique-question">
- <span class="glyphicon glyphicon-eye-open"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modal-historique-question">
+ <span class="glyphicon glyphicon-eye-open"></span>
+ </button>
+ </span>
<?php endif; ?>
<?php if (!$this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
- <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#modal-question">
- <span class="glyphicon glyphicon-comment"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'creer') ?>">
+ <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#modal-question">
+ <span class="glyphicon glyphicon-comment"></span>
+ </button>
+ </span>
<?php endif; ?>
</td>
</tr>
-
+ <tr>
+ <td></td>
+ <td></td>
+ <td> <!-- supression du contact uniquement pour les coordonnateurs-->
+ <?php if ($role_id == Configure::read('Constante.coordonnateurId')): ?>
+ <span title="<?php echo __d('hoverMouse', 'supprimer') ?>">
+ <button class="btn btn-danger btn-lg" id="bt-supprimer"
+ onclick="<?php echo 'suppress(' . $this->request->data['Contact']['id'] . ')'; ?>" >
+ <span class="glyphicon glyphicon-trash"></span>
+ </button>
+ </span>
+ <?php endif; ?></td>
+ </tr>
</table>
- <!-- supression du contact uniquement pour les coordonnateurs-->
- <?php if ($role_id == Configure::read('Constante.coordonnateurId')): ?>
- <button class="btn btn-danger" id="bt-supprimer"
- onclick="<?php echo 'suppress(' . $this->request->data['Contact']['id'] . ')'; ?>" >
- <?php echo __d('formulaire', 'supprimer contact'); ?>
- </button>
- <?php endif; ?>
+
--- /dev/null
+<!--<html ng-app>
+ <script src="http://code.angularjs.org/angular-1.0.0.min.js"></script>
+
+<div ng-controller="SearchCtrl">
+
+
+ <div class="panel panel-info perso-top-buffer">
+ <div class="panel-heading">
+ <h3 class="panel-title">Fiche de suivi</h3>
+ </div>
+ <div class="panel-body">
+
+
+<?php /*
+
+
+ <table class="table table-striped">
+ date creation / echeance
+ <tr>
+ <td>
+ <b><?php echo __d('formulaire', 'dateCreaContact'); ?></b><br />
+ <?php echo $this->Time->format($dateCreation, '%d-%m-%Y', 'invalid'); ?> <br />
+ </td>
+ <td>
+ <b>Date prochaine echeance</b> <br />
+ <?php echo $this->Time->format($dateEcheance, '%d-%m-%Y', 'invalid'); ?> <br />
+ </td>
+ <td></td>
+
+ </tr>
+
+ etat du contact
+ <tr>
+ <td><?php echo __d('formulaire', 'etat'); ?></td>
+ <td>
+
+ <?php
+ echo $this->Form->create('Contact', array(
+ 'id' => 'change_etat',
+ 'onsubmit' => 'return false'));
+
+ echo $this->Form->input('Contact.id');
+
+ // Modifiable seulement si coordonnateur ou le referent du contact
+ if ($role_id == Configure::read('Constante.coordonnateurId') || $this->Login->isreferent($this->request->data['User']['id'])) {
+ echo $this->Form->input('Contact.etat_id', array(
+ 'label' => false,
+ 'options' => array(null => 'aucun', $etats),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ } else {
+ echo $this->Form->input('Contact.etat_id', array(
+ 'label' => false,
+ 'options' => array(null => 'aucun', $etats),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control',
+ 'disabled' => 'disabled'));
+ }
+
+
+ echo $this->Form->end();
+ ?>
+ </td>
+ <td>
+ Modifiable seulement si coordonnateur ou le referent du contact
+ <?php if ($role_id == Configure::read('Constante.coordonnateurId') || $this->Login->isreferent($this->request->data['User']['id'])) : ?>
+ <button id="bt_change_etat" class="btn btn-lg btn-danger " >
+ <span class="glyphicon glyphicon-ok"></span>
+ </button>
+ <?php endif; ?>
+ </td>
+ </tr>
+
+ atribution referent
+ <tr>
+ <td><?php echo __d('formulaire', 'choix referent'); ?></td>
+ <td>
+ <?php
+ echo $this->Form->create('Contact', array(
+ 'id' => 'change_user',
+ 'onsubmit' => 'return false'));
+
+ echo $this->Form->input('Contact.id');
+
+
+ // si non coordonnateur on ne peut pas le changer
+ if ($role_id == Configure::read('Constante.coordonnateurId')) {
+
+ echo $this->Form->input('Contact.user_id', array(
+ 'label' => false,
+ 'options' => array(null => 'aucun', $users),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ } else {
+ echo $this->Form->input('Contact.user_id', array(
+ 'label' => false,
+ 'options' => array(null => 'aucun', $users),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control',
+ 'disabled' => 'disabled'));
+ }
+
+
+ echo $this->Form->end();
+ ?>
+ </td>
+ <td>
+ <?php if ($role_id == Configure::read('Constante.coordonnateurId')): ?>
+ <button id="bt_change_user" class="btn btn-lg btn-danger ">
+
+ <span class="glyphicon glyphicon-ok"></span>
+ </button>
+
+ <?php endif ?>
+ </td>
+ </tr>
+
+
+ Echanges
+ <tr>
+ <td>
+ <?php echo __d('formulaire', 'echanges'); ?>
+ </td>
+ <td>
+ <?php echo $nombreEchanges ?> <?php echo __d('formulaire', 'echange(s)'); ?>
+ </td>
+ <td>
+ <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modal-historique-echange">
+ <span class="glyphicon glyphicon-eye-open"></span>
+ </button>
+ <?php if ($this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
+ <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#modal-echange">
+ <span class="glyphicon glyphicon-comment"></span>
+ </button>
+ <?php endif; ?>
+ </td>
+ </tr>
+
+ modifications / questions
+ <tr>
+ <td>
+ <?php echo __d('formulaire', 'modifications questions'); ?>
+ </td>
+ <td>
+ <?php echo $nombreModifNonVues ?>
+ <?php echo __d('formulaire', 'non vue(s)'); ?>
+ </td>
+ <td>
+ <?php if ($this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
+ <button class="btn btn-success btn-lg" data-toggle="modal" data-target="#modal-historique-question">
+ <span class="glyphicon glyphicon-eye-open"></span>
+ </button>
+ <?php endif; ?>
+ <?php if (!$this->Login->isReferent($this->request->data['Contact']['user_id'])): ?>
+ <button class="btn btn-warning btn-lg" data-toggle="modal" data-target="#modal-question">
+ <span class="glyphicon glyphicon-comment"></span>
+ </button>
+ <?php endif; ?>
+ </td>
+ </tr>
+
+
+
+ </table>
+
+ supression du contact uniquement pour les coordonnateurs
+ <?php if ($role_id == Configure::read('Constante.coordonnateurId')): ?>
+ <button class="btn btn-danger" id="bt-supprimer"
+ onclick="<?php echo 'suppress(' . $this->request->data['Contact']['id'] . ')'; ?>" >
+ <?php echo __d('formulaire', 'supprimer contact'); ?>
+ </button>
+ <?php endif; ?>
+
+
+
+
+
+
+
+
+
+ Popup de nouvel echange
+ <div class="modal fade" id="modal-echange" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel"><?php echo __d('formulaire', 'echange'); ?></h4>
+ </div>
+ <div class="modal-body">
+
+
+ <?php
+ echo $this->Form->create('Echange', array(
+ 'onsubmit' => ' return false',
+ 'id' => 'echange-form-pop'));
+
+ echo $this->Form->input('Contact.id');
+
+ echo $this->Form->input('Echange.type_id', array(
+ 'label' => __d('echange', 'type'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ echo $this->Form->input('Echange.sujet', array(
+ 'label' => __d('echange', 'sujet'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ echo $this->Form->input('Echange.contenu', array(
+ 'label' => __d('echange', 'contenu'),
+ 'rows' => configure::read('Contante.hContenu'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+
+ echo $this->Form->end();
+ ?>
+
+
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary" id="echange-pop" data-dismiss="modal">Enregistrer</button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+
+
+
+ Popup historique des echanges
+ <div class="modal fade" id="modal-historique-echange" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel"><?php echo 'Historique des echanges'; ?></h4>
+ </div>
+ <div class="modal-body">
+
+
+ <div id="liste-echange">
+ <?php foreach ($listeEchange as $echange) : ?>
+ <div class="well perso-top-buffer">
+ <fieldset>
+ <legend><?php echo $echange['Echange']['sujet'] ?></legend>
+ <b><?php echo __d('formulaire', 'date'); ?> </b>
+ <?php echo $this->Time->format($echange['Echange']['created'], '%d-%m-%Y', 'invalid'); ?> <br />
+ <b><?php echo __d('formulaire', 'auteur'); ?></b>
+ <?php echo $echange['User']['nom']; ?>
+ <?php echo $echange['User']['prenom']; ?> <br/>
+ <b><?php echo __d('formulaire', 'type-echange'); ?> </b>
+ <?php echo $echange['Type']['name']; ?> <br/>
+
+ <div class="well"><?php echo nl2br($echange['Echange']['contenu']); ?></div>
+ </fieldset>
+ </div>
+ <?php endforeach; ?>
+ </div>
+
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+
+
+
+
+
+ ///////////////////// modification !!!!!!!!!!
+
+
+
+ Popup historique des echanges
+ <div class="modal fade" id="modal-historique-echange-ajax" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel"><?php echo 'Historique des echanges'; ?></h4>
+ </div>
+ <div class="modal-body">
+
+
+
+
+
+ <div ng-repeat="res in result">
+
+ <div class="well perso-top-buffer">
+ <fieldset>
+ <legend>{{res.Echange.sujet}}</legend>
+ <b><?php echo __d('formulaire', 'date'); ?> </b>
+ {{res.Echange.created}} <br />
+ <b><?php echo __d('formulaire', 'auteur'); ?></b>
+ {{res.User.nom}}
+ {{res.User.prenom}} <br/>
+ <b><?php echo __d('formulaire', 'type-echange'); ?> </b>
+ {{res.Type.name}}
+
+ <div class="well">{{res.Echange.contenu}}</div>
+ </fieldset>
+ </div>
+
+ </div>
+
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+
+
+
+
+
+
+
+
+
+ Popup nouvelle question
+ <div class="modal fade" id="modal-question" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel"><?php echo __d('formulaire', 'questions'); ?></h4>
+ </div>
+ <div class="modal-body">
+
+
+ <?php
+ echo $this->Form->create('Modification', array(
+ 'onsubmit' => 'return false',
+ 'id' => 'modification-form-pop'));
+ echo $this->Form->input('Contact.id');
+ echo $this->Form->input('questions', array(
+ 'label' => false,
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control',
+ 'rows' => configure::read('Contante.hContenu')));
+ echo $this->Form->end();
+ ?>
+
+
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary" id="modification-pop" data-dismiss="modal">Enregistrer</button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+
+
+
+
+
+
+ Popup historique des questions
+ <div class="modal fade" id="modal-historique-question" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel"><?php echo 'Historique des questions'; ?></h4>
+ </div>
+ <div class="modal-body">
+
+
+
+ <div id="liste-modification">
+ <?php foreach ($listeQuestions as $question) : ?>
+ <?php $modifId = $question['Modification']['id']; ?>
+ <div class="well perso-top-buffer" id="question<?php echo $modifId ?>">
+ <fieldset>
+
+ <b><?php echo __d('formulaire', 'date'); ?> </b>
+ <?php echo $this->Time->format($question['Modification']['created'], '%d-%m-%Y', 'invalid'); ?> <br />
+ <b><?php echo __d('formulaire', 'auteur'); ?></b>
+ <?php echo $question['User']['nom']; ?>
+ <?php echo $question['User']['prenom']; ?> <br/>
+
+
+
+ <div class="well"><?php echo nl2br($question['Modification']['questions']); ?></div>
+
+ <?php
+ if ($question['Modification']['estvue']) {
+ echo 'message vu';
+ } else {
+ ?>
+ <div class ="pull-right" >
+ <button type="button" class="btn btn-primary" onClick="clickVu(<?php echo $modifId; ?>)">Vu</button>
+ </div>
+ <?php
+ }
+ ?>
+ </fieldset>
+ </div>
+ <?php endforeach; ?>
+
+ </div>
+
+
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+
+
+ </div>
+ </div>
+
+
+ <input type="button" class="btn btn-danger" ng-click="search()" data-toggle="modal" data-target="#modal-historique-echange-ajax">
+ <div ng-model="result">
+
+ <pre>
+ {{result}}
+ </pre>
+
+ </div>
+</div>
+
+
+
+
+/*
+ test angular
+ function SearchCtrl($scope, $http) {
+ $scope.essai = {"premier": "un", "deuxieme":"deux"};
+ $monUrl = '<?php echo Router::url(array('controller' => 'Echanges', 'action' => 'afficheAjax')); ?>/' + 5;
+ $scope.search = function() {
+
+ $http({
+ method: 'POST',
+ url: $monUrl
+ }).success(function(data, status) {
+ $scope.status = status;
+ $scope.data = data;
+ $scope.result = data; // Show result from server in our <pre></pre> element
+ });
+
+ };
+ }
+
+
+*/ ?>
+
+*/-->
\ No newline at end of file
<div class="panel-heading" id="a_valider">
<h3 class="panel-title">
- Contact à valider
+ <?php echo __d('gestion', 'contact a valider'); ?>
+
<span class="badge pull-right">
<?php echo $countAValider ?>
</span>
<table class="table table-striped" id="table_a_valider">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeAValider as $AValider): ?>
<h3 class="panel-title" id="a_attribuer">
- Contact à attribuer
+ <?php echo __d('gestion', 'contact a attribuer'); ?>
<span class="badge pull-right">
<?php echo $countAAttribuer ?>
</span>
<div class="panel-body">
<table class="table table-striped" id="table_a_attribuer">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeAAttribuer as $AAttribuer): ?>
+
<div class="panel panel-info perso-top-buffer">
<div class="panel-heading">
- <h3 class="panel-title">tous les contacts</h3>
+ <h3 class="panel-title"><?php echo __d('gestion', 'tous les contacts'); ?></h3>
</div>
<div class="panel-body">
+ <span class="pull-right">
+ <h4><?php echo $this->Paginator->numbers(); ?></h4>
+ </span>
<table class="table table-striped">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Référent</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'referent'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
+
</tr>
<?php foreach ($listeContact as $contact): ?>
<tr>
<?php echo $contact['User']['nom']; ?>
</td>
<td>
- <button onclick = "location.href = '<?php echo $this->Html->url(array('controller' => 'Contacts', 'action' => 'edit', $contact['Contact']['id'])); ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php echo $this->Html->url(array('controller' => 'Contacts', 'action' => 'edit', $contact['Contact']['id'])); ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
</tr>
<div class="panel panel-info perso-top-buffer">
<div class="panel-heading">
- <h3 class="panel-title">Liste des contacts suivis</h3>
+ <h3 class="panel-title"><?php echo __d('gestion', 'liste contacts suivis'); ?></h3>
</div>
<div class="panel-body">
+ <span class="pull-right">
+ <h4><?php echo $this->Paginator->numbers(); ?></h4>
+ </span>
<table class="table table-striped">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeASuivre as $aSuivre) : ?>
<tr>
<td><?php echo $aSuivre['Contact']['nom'] ?></td>
<td><?php echo $aSuivre['Contact']['prenom'] ?></td>
<td>
- <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Contacts',
- 'action' => 'edit',
- $aSuivre['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Contacts',
+ 'action' => 'edit',
+ $aSuivre['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
</tr>
-<?php endforeach; ?>
+ <?php endforeach; ?>
</table>
<div class="panel panel-danger perso-top-buffer">
<div class="panel-heading">
<h3 class="panel-title" id="nouveau-retard">
- Nouveaux contacts > 5 jours
+ <?php echo __d('gestion', 'nouveaux contacts retard'); ?>
<span class="badge pull-right">
<?php echo $countNouveauRetard ?>
<table class="table table-striped" id="nouveau-retard-table">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Date d'attribution</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'date attribution'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeNouveauRetard as $nouveauRetard) : ?>
<tr>
<td><?php echo $this->Time->format($nouveauRetard['Contact']['date_attribution'], '%d-%m-%Y', 'invalid'); ?></td>
<!-- consulter() confirme qu'on a vu le contact et renvoie vers sa fiche-->
<td>
-
- <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Gestion',
- 'action' => 'consulter',
- $nouveauRetard['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Gestion',
+ 'action' => 'consulter',
+ $nouveauRetard['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
</tr>
<div class="panel panel-danger perso-top-buffer-lg">
<div class="panel-heading">
<h3 class="panel-title" id="modifie-retard">
- Modifiés ou questions > 5 jours
+ <?php echo __d('gestion', 'modifie retard'); ?>
<span class="badge pull-right">
<?php echo $countModifRetard ?>
</span>
<div class="panel-body">
<table class="table table-striped" id="modifie-retard-table">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Modifié par</th>
- <th>date</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'modife par'); ?></th>
+ <th><?php echo __d('gestion', 'date'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeModifRetard as $retardModif) : ?>
<tr>
<td><?php echo $retardModif['User']['prenom'] ?> <?php echo $retardModif['User']['nom'] ?></td>
<td><?php echo $this->Time->format($retardModif['Modification']['created'], '%d-%m-%Y', 'invalid'); ?></td>
<td>
-
- <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Contacts',
- 'action' => 'edit',
- $retardModif['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
-
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Contacts',
+ 'action' => 'edit',
+ $retardModif['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
<div class="panel panel-danger perso-top-buffer-lg">
<div class="panel-heading">
<h3 class="panel-title" id="echeance-retard">
- Echéances > 5 jours
+ <?php echo __d('gestion', 'echeance retard'); ?>
<span class="badge pull-right">
<?php echo $countEcheanceRetard ?>
</span>
<table class="table table-striped" id="echeance-retard-table">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
-
- <th>date échéance</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'date echeance'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeEcheanceRetard as $retardEcheance) : ?>
<tr>
<td><?php echo $retardEcheance['Contact']['prenom'] ?></td>
<td><?php echo $this->Time->format($retardEcheance['Contact']['echeance'], '%d-%m-%Y', 'invalid'); ?></td>
- <td>
- <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Contacts',
- 'action' => 'edit',
- $retardEcheance['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <td>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Contacts',
+ 'action' => 'edit',
+ $retardEcheance['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
<div class="panel panel-warning perso-top-buffer-lg">
<div class="panel-heading">
<h3 class="panel-title" id="echeance">
- Contacts arrivant à une échéance
+ <?php echo __d('gestion', 'contact echeance'); ?>
<span class="badge pull-right">
<?php echo $countEcheance ?>
</span>
<div class="panel-body">
<table class="table table-striped" id="echeance-table">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
-
- <th>date</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'date'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeEcheance as $echeance) : ?>
<tr>
<td><?php echo $this->Time->format($echeance['Contact']['echeance'], '%d-%m-%Y', 'invalid'); ?></td>
<td>
- <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Contacts',
- 'action' => 'edit',
- $echeance['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Contacts',
+ 'action' => 'edit',
+ $echeance['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
</tr>
<div class="panel panel-success perso-top-buffer-lg">
<div class="panel-heading">
<h3 class="panel-title" id="nouveau">
- Nouveaux contacts
+ <?php echo __d('gestion', 'nouveau contact'); ?>
<span class="badge pull-right">
<?php echo $countNouveau ?>
</span>
<div class="panel-body">
<table class="table table-striped" id="nouveau-table">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Date d'attribution</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'date attribution'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeNouveaux as $nouveau) : ?>
<tr>
<td><?php echo $nouveau['Contact']['prenom'] ?></td>
<td><?php echo $this->Time->format($nouveau['Contact']['date_attribution'], '%d-%m-%Y', 'invalid'); ?></td>
<!-- consulter() confirme qu'on a vu le contact et renvoie vers sa fiche-->
- <td> <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Gestion',
- 'action' => 'consulter',
- $nouveau['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <td>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Gestion',
+ 'action' => 'consulter',
+ $nouveau['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
</tr>
<div class="panel panel-success perso-top-buffer-lg">
<div class="panel-heading">
<h3 class="panel-title" id="modifie">
- Contacts modifiés ou avec des questions
+ <?php echo __d('gestion', 'contact modifie'); ?>
<span class="badge pull-right">
<?php echo $countModifie ?>
</span>
<div class="panel-body">
<table class="table table-striped" id="modifie-table">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Modifié par</th>
- <th>date</th>
- <th>Action</th>
+ <th><?php echo __d('gestion', 'nom'); ?></th>
+ <th><?php echo __d('gestion', 'prenom'); ?></th>
+ <th><?php echo __d('gestion', 'modife par'); ?></th>
+ <th><?php echo __d('gestion', 'date'); ?></th>
+ <th><?php echo __d('gestion', 'action'); ?></th>
</tr>
<?php foreach ($listeContactModifies as $modifie) : ?>
<tr>
<td><?php echo $modifie['User']['prenom'] ?> <?php echo $modifie['User']['nom'] ?></td>
<td><?php echo $this->Time->format($modifie['Modification']['created'], '%d-%m-%Y', 'invalid'); ?></td>
<td>
- <button onclick = "location.href = '<?php
- echo $this->Html->url(array(
- 'controller' => 'Contacts',
- 'action' => 'edit',
- $modifie['Contact']['id']));
- ?>';" class="btn btn-default btn-lg">
- <span class="glyphicon glyphicon-eye-open"></span> Visualiser
- </button>
+ <span title="<?php echo __d('hoverMouse', 'visualiser') ?>">
+ <button onclick = "location.href = '<?php
+ echo $this->Html->url(array(
+ 'controller' => 'Contacts',
+ 'action' => 'edit',
+ $modifie['Contact']['id']));
+ ?>';" class="btn btn-default btn-lg">
+ <span class="glyphicon glyphicon-eye-open"></span> Visualiser
+ </button>
+ </span>
</td>
</tr>
});
-
-
+
+
$('#nouveau-retard').click(function() {
change('#nouveau-retard-table');
});
-
-
+
+
$('#modifie-retard').click(function() {
change('#modifie-retard-table');
});
-
- $('#echeance-retard').click(function() {
+
+ $('#echeance-retard').click(function() {
change('#echeance-retard-table');
});
-
+
<div class="well">
<fieldset>
- <legend><?php echo __d('formUser', 'creationUser'); ?></legend>
+ <legend><?php echo __d('formUser', 'consultation utilisateur'); ?></legend>
<?php echo $this->Form->create('User', array('url' => array(
'controller'=>'GestionUser',
<div class="pull-right">
- <button id="bt-ajouter" class="btn btn-lg btn-danger"
- onclick="location.href = '<?php echo $this->Html->url(array('action' => 'add')); ?>';" >
- <span class="glyphicon glyphicon-plus"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'addUser') ?>">
+ <button id="bt-ajouter" class="btn btn-lg btn-danger"
+ onclick="location.href = '<?php echo $this->Html->url(array('action' => 'add')); ?>';" >
+ <span class="glyphicon glyphicon-plus"></span>
+ </button>
+ </span>
</div><br />
<div class="panel panel-info perso-top-buffer">
<div class="panel-heading">
<h3 class="panel-title">
- Utilisateurs
+ <?php echo __d('gestionUser', 'utilisateurs') ?>
</h3>
</div>
<div class="panel-body">
<table class="table table-striped">
<tr>
- <th>Nom</th>
- <th>Prenom</th>
- <th>Username</th>
- <th>Role</th>
- <th>Etat</th>
- <th>Action</th>
+ <th><?php echo __d('gestionUser', 'nom') ?></th>
+ <th><?php echo __d('gestionUser', 'prenom') ?></th>
+ <th><?php echo __d('gestionUser', 'username') ?></th>
+ <th><?php echo __d('gestionUser', 'role') ?></th>
+ <th><?php echo __d('gestionUser', 'etat') ?></th>
+ <th><?php echo __d('gestionUser', 'action') ?></th>
</tr>
<?php foreach ($listeUsers as $user): ?>
<tr>
<td><?php echo $user['Role']['name']; ?></td>
<td>
<?php if ($user['User']['estactif']): ?>
- <button class="btn btn-success"
- onclick="<?php echo 'toggleActif(' . $user['User']['id'] . ')'; ?>" >
- <span class="glyphicon glyphicon-play"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'desactiver') ?>">
+ <button class="btn btn-success"
+ onclick="<?php echo 'toggleActif(' . $user['User']['id'] . ')'; ?>" >
+ <span class="glyphicon glyphicon-play"></span>
+ </button>
+ </span>
<?php else : ?>
- <button class="btn btn-warning"
- onclick="<?php echo 'toggleActif(' . $user['User']['id'] . ')'; ?>">
- <span class="glyphicon glyphicon-pause"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'activer') ?>">
+ <button class="btn btn-warning"
+ onclick="<?php echo 'toggleActif(' . $user['User']['id'] . ')'; ?>">
+ <span class="glyphicon glyphicon-pause"></span>
+ </button>
+ </span>
<?php endif ?>
-
+
</td>
<td>
- <button class="btn btn-success" onclick= >
- <span class="glyphicon glyphicon-eye-open"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'consulter') ?>">
+ <button id="bt-ajouter" class="btn btn-success"
+ onclick="location.href = '<?php echo $this->Html->url(array('action' => 'view', $user['User']['id'])); ?>';" >
+ <span class="glyphicon glyphicon-eye-open"></span>
+ </button>
+ </span>
- <button class="btn btn-danger " id="bt-supprimer"
- onclick="<?php echo 'suppress(' . $user['User']['id'] . ')'; ?>" >
- <span class="glyphicon glyphicon-remove"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'supprimer') ?>">
+ <button class="btn btn-danger " id="bt-supprimer"
+ onclick="<?php echo 'suppress(' . $user['User']['id'] . ')'; ?>" >
+ <span class="glyphicon glyphicon-trash"></span>
+ </button>
+ </span>
- <button id="bt-desattribuer" class="btn btn-warning"
- onclick="<?php echo 'desatrib(' . $user['User']['id'] . ')'; ?>">
- <span class="glyphicon glyphicon-refresh"></span>
- </button>
+ <span title="<?php echo __d('hoverMouse', 'desattribuer') ?>">
+ <button id="bt-desattribuer" class="btn btn-warning"
+ onclick="<?php echo 'desatrib(' . $user['User']['id'] . ')'; ?>">
+ <span class="glyphicon glyphicon-refresh"></span>
+ </button>
+ </span>
</td>
</tr>
function desatrib(id) {
var r = confirm("voulez vous vraiment enlever tous ses contacts à cet utilisateur ?");
- if (r == true){
+ if (r == true) {
desatribAjax(id);
}
- else{
+ else {
return 0;
}
}
-
+
function desatribAjax(id) {
-
+
$.ajax({
type: 'POST',
url: '<?php echo Router::url(array('controller' => 'GestionUser', 'action' => 'desaffectAjax')); ?>',
function suppress(id) {
var r = confirm("voulez vous vraiment supprimer cet utilisateur ?");
- if (r == true){
+ if (r == true) {
window.location.href = "<?php echo Router::url(array('controller' => 'GestionUser', 'action' => 'remove')); ?>/" + id;
}
- else{
+ else {
return 0;
}
}
-
-
- function toggleActif(id) {
-
+
+
+ function toggleActif(id) {
+
var r = confirm("voulez vous changer l'etat de cet utilisateur ?");
- if (r == true){
+ if (r == true) {
window.location.href = "<?php echo Router::url(array('controller' => 'GestionUser', 'action' => 'toggleActif')); ?>/" + id;
}
- else{
+ else {
return 0;
}
}
-
+
--- /dev/null
+<?php debug($this->request->data);
+debug ($roles);
+?>
+
+
+
+<div class='row perso-top-buffer'>
+ <div class="col-md-offset-2 col-md-8">
+ <div class="well">
+
+ <fieldset>
+ <legend><?php echo __d('formUser', 'consultation utilisateur'); ?></legend>
+
+ <?php echo $this->Form->create('User', array('url' => array(
+ 'controller'=>'GestionUser',
+ 'action' => 'view'
+ ))); ?>
+
+ <?php echo $this->Form->input('User.id'); ?>
+ <div class="row">
+ <div class="col-md-6">
+ <?php
+ echo $this->Form->input('role_id', array(
+ 'label' => __d('formUser', 'role'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ ?>
+ </div>
+ <div class="col-md-6">
+ <?php
+ echo $this->Form->input('username', array(
+ 'label' => __d('formUser', 'name'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ ?>
+ </div>
+ </div>
+
+ mettre un liens qui propose de creer un nouveau password !
+
+
+ <div class="row">
+ <div class="col-md-6">
+ <?php
+ echo $this->Form->input('nom', array(
+ 'label' => __d('formUser', 'nom'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ ?>
+ </div>
+ <div class="col-md-6">
+ <?php
+ echo $this->Form->input('prenom', array(
+ 'label' => __d('formUser', 'prenom'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ ?>
+ </div>
+ </div>
+
+
+ <div class="row">
+ <div class="col-md-8">
+ <?php
+ echo $this->Form->input('couriel', array(
+ 'label' => __d('formUser', 'couriel'),
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+ ?>
+ </div>
+ <div class="col-md-4">
+ <?php echo $this->Form->input('estactif'); ?>
+ </div>
+ </div>
+
+
+
+
+ <?php
+ echo $this->Form->end(array(
+ 'label' => 'Modifier',
+ 'class' => 'btn btn-warning btn-lg'));
+ ?>
+
+
+
+ </fieldset>
+ </div>
+ </div>
+</div>
\ No newline at end of file
-<?php
-// const COORDONNATEUR = 1;
-//const REFERENT = 2;
-?>
<!DOCTYPE html>
<html>
echo $this->Html->meta('icon');
?>
+
<?php
echo $this->Html->script(array('jquery', 'bootstrap'));
echo $this->Html->css(array('bootstrap'));
<ul class="nav navbar-nav">
<!-- si le role de l'user est coordonnateur-->
<?php if ($role_id == Configure::read('Constante.coordonnateurId')) : ?>
- <li><?php
- echo $this->Html->link('Administrer', array(
- 'controller' => 'Gestion',
- 'action' => 'administrer'));
- ?>
- </li>
- <li ><?php
- echo $this->Html->link('Utilisateurs', array(
- 'controller' => 'GestionUser',
- 'action' => 'gestion'));
- ?>
- </li>
- <li ><?php
- echo $this->Html->link('Statistiques', array(
- 'controller' => 'Statistiques',
- 'action' => 'stat'))
- ?>
- </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#" >
+ <span class="caret"></span>
+ <?php echo "Administration"; ?>
+ </a>
+ <ul class="dropdown-menu">
+ <li><?php
+ echo $this->Html->link('Administrer', array(
+ 'controller' => 'Gestion',
+ 'action' => 'administrer'));
+ ?>
+ </li>
+ <li ><?php
+ echo $this->Html->link('Utilisateurs', array(
+ 'controller' => 'GestionUser',
+ 'action' => 'gestion'));
+ ?>
+ </li>
+ <li ><?php
+ echo $this->Html->link('Statistiques', array(
+ 'controller' => 'Statistiques',
+ 'action' => 'stat'))
+ ?>
+ </li>
+ <li ><?php
+ echo $this->Html->link('Parametrage', array(
+ 'controller' => 'Parametrage',
+ 'action' => 'parametrer'))
+ ?>
+ </li>
+ </ul>
+ </li>
+
+
<?php endif; ?>
<!-- si on a le role de referent ou coodonnateur-->
<script type="text/javascript">
+
+ // pour selectionner l'onglet actif
$(document).ready(function() {
var url = window.location;
$('ul.nav a[href="' + url + '"]').parent().addClass('active');
--- /dev/null
+<?php
+// const COORDONNATEUR = 1;
+//const REFERENT = 2;
+?>
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <?php echo $this->Html->charset(); ?>
+ <title>
+ <?php //echo $cakeDescription ?>:
+ <?php echo $title_for_layout; ?>
+ </title>
+ <?php
+ echo $this->Html->meta('icon');
+ ?>
+
+
+ <?php
+ echo $this->Html->script(array('jquery', 'bootstrap'));
+ echo $this->Html->css(array('bootstrap'));
+ echo $this->Html->css(array('perso'));
+ ?>
+ </head>
+
+
+ <body class='perso-background'>
+
+
+ <!--provisoire, pour la connction des users-->
+ <!--visible seulement si on n'est pas authentifié-->
+ <?php if (CakeSession::read("Auth.User.id") == null) : ?>
+ <div class="">
+ <?php
+ echo $this->Html->link('se connecter', array('controller' => 'Users', 'action' => 'login'));
+ ?>
+ </div>
+ <?php endif ?>
+
+
+ <!--visible seulement si on est authentifié-->
+ <?php if (CakeSession::read("Auth.User.id") > 0) : ?>
+ <nav role="navigation" class="navbar navbar-default navbar-static-top">
+
+
+ <div class="navbar-header">
+ <button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand"><b>Reseau Accueil</b></span>
+ </div>
+ <!-- Collection of nav links and other content for toggling -->
+ <div id="navbarCollapse" class="collapse navbar-collapse">
+ <ul class="nav navbar-nav">
+ <!-- si le role de l'user est coordonnateur-->
+ <?php if ($role_id == Configure::read('Constante.coordonnateurId')) : ?>
+ <li><?php
+ echo $this->Html->link('Administrer', array(
+ 'controller' => 'Gestion',
+ 'action' => 'administrer'));
+ ?>
+ </li>
+ <li ><?php
+ echo $this->Html->link('Utilisateurs', array(
+ 'controller' => 'GestionUser',
+ 'action' => 'gestion'));
+ ?>
+ </li>
+ <li ><?php
+ echo $this->Html->link('Statistiques', array(
+ 'controller' => 'Statistiques',
+ 'action' => 'stat'))
+ ?>
+ </li>
+
+ <?php endif; ?>
+ <!-- si on a le role de referent ou coodonnateur-->
+ <?php if ($role_id <= Configure::read('Constante.referentId')) : ?>
+ <li ><?php
+ echo $this->Html->link('Tableau de bord', array(
+ 'controller' => 'Gestion',
+ 'action' => 'suivre'));
+ ?>
+ </li>
+
+ <li ><?php
+ echo $this->Html->link('Mes contacts', array(
+ 'controller' => 'Gestion',
+ 'action' => 'followedContacts'));
+ ?>
+ </li>
+
+ <?php endif; ?>
+
+ <li ><?php
+ echo $this->Html->link('Tous les contacts', array(
+ 'controller' => 'Gestion',
+ 'action' => 'allContacts'));
+ ?>
+ </li>
+ <li ><?php
+ echo $this->Html->link('Rechercher', array(
+ 'controller' => 'Rechercher',
+ 'action' => 'rechercher'));
+ ?>
+ </li>
+
+ <li ><?php
+ echo $this->Html->link('Nouveau', array(
+ 'controller' => 'Contacts',
+ 'action' => 'add'));
+ ?>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <!-- <li><a href="#">Logout</a></li>-->
+
+ <?php if ($utilisateur) { ?>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#" >
+ <?php echo $utilisateur['User']['nom']; ?>
+ <?php echo $utilisateur['User']['prenom']; ?>
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><?php echo $this->Html->link('Logout', array('controller' => 'Users', 'action' => 'logout')); ?></li>
+ </ul>
+ </li>
+ <?php } ?>
+
+ </ul>
+ </div>
+
+ </nav>
+
+
+ <?php endif; ?>
+
+
+
+
+
+
+
+
+ <div class='container'>
+ <div id="content">
+ <?php echo $this->Session->flash(); ?>
+
+ <?php echo $this->fetch('content'); ?>
+
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <?php echo $this->element('sql_dump'); ?>
+ </div>
+ </div>
+
+ </div>
+
+
+
+ </body>
+
+
+
+</html>
+
+
+<script type="text/javascript">
+
+ // pour selectionner l'onglet actif
+ $(document).ready(function() {
+ var url = window.location;
+ $('ul.nav a[href="' + url + '"]').parent().addClass('active');
+ $('ul.nav a').filter(function() {
+ return this.href == url;
+ }).parent().addClass('active');
+ });
+
+
+</script>
\ No newline at end of file
<title><?php echo $page_title; ?></title>
<?php if (Configure::read('debug') == 0): ?>
-<meta http-equiv="Refresh" content="<?php echo $pause; ?>;url=<?php echo $url; ?>"/>
+<meta http-equiv="Refresh" content="<?php echo $pause; ?>;
+ url=<?php echo $url; ?>"/>
<?php endif; ?>
<style><!--
P { text-align:center; font:bold 1.1em sans-serif }
--></style>
</head>
<body>
-<p><a href="<?php echo $url; ?>"><?php echo $message; ?></a></p>
+<p><a href="<?php echo $url; ?>">
+ <?php echo $message; ?></a></p>
</body>
</html>
--- /dev/null
+
+<div class="row perso-top-buffer">
+ <div class="col-md-offset-3 col-md-6">
+ <div class="panel panel-danger">
+ <div class="panel-heading">
+ <h3 class="panel-title"><?php echo __d('parametrage','parametrage') ?></h3>
+ </div>
+ <div class="panel-body">
+
+
+ <?php
+ echo $this->Form->create('Parametrage', array('url' => array(
+ 'controller'=>'Parametrage',
+ 'action' => 'parametrer'
+ )));
+
+ echo $this->Form->input('id');
+
+ echo $this->Form->input('coordonnateurcouriel', array(
+ 'label' => __d('parametrage','coordonnateurecouriel'),
+ 'class' => 'form-control',
+ 'div' => array('class' => 'form-group')
+ ));
+ ?>
+
+
+
+ <?php
+ echo $this->Form->input('dureeretardjours', array(
+ 'label' => __d('parametrage','retard'),
+ //'class' => 'form-control',
+ 'size' => 3,
+ 'div' => array('class' => 'form-group'),
+ 'after' => ' jours'
+ ));
+ ?>
+
+
+ <?php
+ echo $this->Form->input('dureeecheancemois', array(
+ 'label' => __d('parametrage','dureeecheance'),
+ //'class' => 'form-control',
+ 'size' => 3,
+ 'div' => array('class' => 'form-group'),
+ 'after' => 'mois'
+ ));
+ ?>
+
+
+
+ <?php
+ echo $this->Form->end(array(
+ 'label' => 'valider',
+ 'class' => 'btn btn-warning btn-lg pull-right',
+ ));
+ ?>
+
+ </div>
+ </div>
+
+
+ </div>
+</div>
\ No newline at end of file
<label>Tous les contacts inscrits depuis le : </label>
<div class="row">
- <div class="col-md-3">
+ <div class="col-md-4">
<?php echo $this->Form->day('depuisLe', array('empty' => "Jour", 'div' => array('class' => 'form-group'), 'class' => 'form-control')); ?>
</div>
- <div class="col-md-3">
+ <div class="col-md-4">
<?php echo $this->Form->month('depuisLe', array('empty' => "Mois", 'div' => array('class' => 'form-group'), 'class' => 'form-control')); ?>
</div>
- <div class="col-md-3">
+ <div class="col-md-4">
<?php echo $this->Form->year('depuisLe', date('Y') - 100, date('Y') - 0, array('empty' => "Année", 'div' => array('class' => 'form-group'), 'class' => 'form-control')); ?>
</div>
</div>
'action' => 'rechercherReferent'))));
echo $this->Form->input('user_id', array(
- 'label' => 'référent',
+ 'label' => 'Référent',
'div' => array('class' => 'form-group'),
'class' => 'form-control'));
'controller' => 'Rechercher',
'action' => 'rechercherString'))));
echo $this->Form->input('chaine', array(
- 'label' => 'entrez le debut du nom',
+ 'label' => 'Entrez le debut du nom',
'div' => array('class' => 'form-group'),
'class' => 'form-control'));
echo $this->Form->end(array(
</div>
-<!--recherche par departement-->
+
<div class="row perso-top-buffer">
+ <!--recherche par createur-->
+ <div class="col-md-6">
+ <div class="well">
+ <!--par referent-->
+ <?php
+ echo $this->Form->create('Rechercher', array(
+ 'url' => (array(
+ 'controller' => 'Rechercher',
+ 'action' => 'rechercherCreateur'))));
+
+ echo $this->Form->input('user_id', array(
+ 'label' => 'Créateur',
+ 'div' => array('class' => 'form-group'),
+ 'class' => 'form-control'));
+
+ echo $this->Form->end(array(
+ 'label' => 'valider',
+ 'class' => 'btn btn-success btn-lg'));
+ ?>
+ </div>
+ </div>
+ <!--recherche par departement-->
<div class="col-md-6">
<div class="well">
<?php
echo $this->Form->input('departement', array(
'div' => array('class' => 'form-group'),
'label' => array(
- 'text' => 'entrez numero du département',
+ 'text' => 'Entrez numero du département',
'class' => 'col-sm-5 control-label'),
'between' => '<div class="col-sm-4">',
'after' => '</div>',
?>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
+
+
+
.dropdown-menu > li > a:focus {
color: #262626;
text-decoration: none;
- background-color: #f5f5f5;
+ background-color: red; //red #f5f5f5
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
}
.perso-background{
- background-image: url('./../img/linedpaper.png');
+ background-image: url('./../img/gplaypattern.png'); //linedpaper gplaypattern grey grid_@2X noisy_grid_@2X strange_bullseyes_@2X whitey_@2X
}
-
-
/* navbar */
.navbar-default {
background-image: linear-gradient(#54B4EB, #2FA4E7 60%, #1D9CE5);//rgba(120, 210, 255, 1);
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #fff;
- background-color: #178ACC;;
+ background-color: #178ACC;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
color: #555;
- background-color: #D5D5D5;
+ background-color: #178ACC; //#D5D5D5
}
/* caret */
.navbar-default .navbar-nav > .dropdown > a .caret {
}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ color: #262626;
+ text-decoration: none;
+ background-color: #178ACC;
+}