]> _ Git - cubeextranet.git/commitdiff
wait #2061 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 24 May 2018 12:20:20 +0000 (12:20 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 24 May 2018 12:20:20 +0000 (12:20 +0000)
inc/commons/class.common.core.php
inc/commons/class.common.droits.php
inc/extranet/Controlleur/class.extranet.droits.php
inc/extranet/Controlleur/class.extranet.url.php
inc/extranet/Controlleur/url/class.extranet.url.projet.php
inc/extranet/Controlleur/url/class.extranet.url.timereport.php

index bc8398aba977b2bb2cdf76d59bdd6c5bd3b1937b..bd8563063351724345c57ff6a3beb970df7527db 100644 (file)
@@ -1,6 +1,7 @@
 <?php\r
 \r
-class commonCore extends cubeCore {\r
+class commonCore extends cubeCore\r
+{\r
 \r
        public $grades;\r
        public $user;\r
@@ -9,7 +10,8 @@ class commonCore extends cubeCore {
        public $ws_grades;\r
        public $demandes_type;\r
 \r
-       public function __construct() {\r
+       public function __construct()\r
+       {\r
                parent::__construct();\r
                $this->dbSync();\r
 \r
@@ -29,30 +31,30 @@ class commonCore extends cubeCore {
                        cubeLang::set();\r
                }\r
 \r
-               $this->grades = array(0 => __('Client'), 1 => __('Equipier'), 2 => __('Gérant'), 3 => __('Comptable'));\r
+               $this->grades = array(0 => __('Client'), "0.5" => __('Junior'), 1 => __('Equipier'), 2 => __('Gérant'), 3 => __('Comptable'));\r
                $this->categories = array(0 => __('Non défini'), 1 => __('Gestion de projet'),\r
-                                         2 => __('Design Web'), 3 => __('Design Industriel'), 4 => __('Print'),\r
-                                         5 => __('Newsletter'), 6 => __('Développement PHP'), 7 => __('Développement Flash'),\r
-                                         8 => __('Fluidbook'), 9 => __('Formation'), 10 => __('Administratif'), 11 => __('Divers'),\r
-                                         12 => __('Intégration HTML'), 13 => __('Motion design'), 14 => __('Design graphique'),\r
-                                         15 => __('Bandeaux de pub'), 16 => __('Applications mobiles'), 17 => __('Prise de vue photo/vidéo'), 18 => __('Hébergement'));\r
+                       2 => __('Design Web'), 3 => __('Design Industriel'), 4 => __('Print'),\r
+                       5 => __('Newsletter'), 6 => __('Développement PHP'), 7 => __('Développement Flash'),\r
+                       8 => __('Fluidbook'), 9 => __('Formation'), 10 => __('Administratif'), 11 => __('Divers'),\r
+                       12 => __('Intégration HTML'), 13 => __('Motion design'), 14 => __('Design graphique'),\r
+                       15 => __('Bandeaux de pub'), 16 => __('Applications mobiles'), 17 => __('Prise de vue photo/vidéo'), 18 => __('Hébergement'));\r
                $this->projets_status = array(0 => __('En cours'), 1 => __('Terminé'));\r
                $this->devis_status = array(0 => __('Brouillon'), 1 => __('Envoyé'),\r
-                                           2 => __('Validé'), 3 => __('Refusé'));\r
+                       2 => __('Validé'), 3 => __('Refusé'));\r
                $this->demandes_status = array(0 => __('Non traitée'), 1 => __('Confiée à un revendeur'), 2 => __('Traitée'));\r
                $this->factures_status = array(0 => __('Brouillon'), 1 => __('Attente'),\r
-                                              2 => __('Payée'), 3 => __('Annulée'), 4 => __('Avoir'), 5 => __('Impayée'));\r
+                       2 => __('Payée'), 3 => __('Annulée'), 4 => __('Avoir'), 5 => __('Impayée'));\r
                $this->books_status = array(-1 => __('Brouillon'), 0 => __('Prêt'), 1 => __('Téléchargé'), 2 => __('Facturé'));\r
                $this->agences = array('Paris', 'Montpellier');\r
                $this->client_type = array(0 => __('Non défini'), 1 => __('TPE'), 2 => __('Startup'), 3 => __('PME'), 4 => __('Agence'), 5 => __('Grande entreprise'));\r
                $this->demandes_type = array(0 => __('Non défini'),\r
-                                            1 => __('Catalogue'),\r
-                                            2 => __('Magazine / Presse'),\r
-                                            3 => __('Rapport annuel'),\r
-                                            4 => __('Plaquette de société'),\r
-                                            5 => __('Brochure touristique'),\r
-                                            6 => __("Manuel d'utilisation"),\r
-                                            7 => __('Livre'));\r
+                       1 => __('Catalogue'),\r
+                       2 => __('Magazine / Presse'),\r
+                       3 => __('Rapport annuel'),\r
+                       4 => __('Plaquette de société'),\r
+                       5 => __('Brochure touristique'),\r
+                       6 => __("Manuel d'utilisation"),\r
+                       7 => __('Livre'));\r
                $this->ws_grades = array(0 => __("Pas d'accès"), 1 => __('Client'), 2 => __('Client (droits de création)'), 3 => __('Revendeur'), 4 => __('Revendeur (droits de création)'), 5 => __('Administrateur'));\r
        }\r
 \r
@@ -66,7 +68,8 @@ class commonCore extends cubeCore {
         *\r
         * @return\r
         */\r
-       protected function authentifie() {\r
+       protected function authentifie()\r
+       {\r
                // On regarde si user_email et user_password ont été postées\r
                // Si c'est le cas, on les copie dans la session\r
                $_SESSION['errorLogin'] = false;\r
@@ -105,7 +108,8 @@ class commonCore extends cubeCore {
         *\r
         * @return\r
         */\r
-       public function dbSync() {\r
+       public function dbSync()\r
+       {\r
                $cache = ROOT . '/cache/DB_SYNC';\r
                $todo = ROOT . '/cache/DB_TODO';\r
                if (!file_exists($cache)) {\r
@@ -130,7 +134,7 @@ class commonCore extends cubeCore {
                $db->utilisateurs->prenom('varchar', 64, false);\r
                $db->utilisateurs->agence('varchar', 64, true);\r
                $db->utilisateurs->entreprise('integer', 0, false);\r
-               $db->utilisateurs->grade('integer', 1, false);\r
+               $db->utilisateurs->grade('float', 0, false);\r
                $db->utilisateurs->adresse('varchar', 512, false);\r
                $db->utilisateurs->code_postal('varchar', 20, false);\r
                $db->utilisateurs->ville('varchar', 64, false);\r
@@ -528,15 +532,14 @@ class commonCore extends cubeCore {
                $db->google_search_api->date('integer', 0, false);\r
                $db->google_search_api->primary('pk_google_search_api', 'request');\r
 \r
-\r
                try {\r
                        $dbi = new CubeDbStruct($this->con);\r
                        $dbi->synchronize($db);\r
                } catch (Exception $e) {\r
-                       return;\r
+\r
                }\r
 \r
-               $this->views->createView('equipiers', 'SELECT * FROM utilisateurs WHERE grade>=1');\r
+               $this->views->createView('equipiers', 'SELECT * FROM utilisateurs WHERE grade>0');\r
                $this->views->createView('gerants', 'SELECT * FROM utilisateurs WHERE grade=2');\r
                $this->views->createView('impayes_entreprises', 'SELECT SUM(total_ht) AS impaye, u.entreprise AS entreprise '\r
                        . 'FROM utilisateurs u LEFT JOIN projets p ON u.utilisateur_id=p.client LEFT JOIN factures f ON f.projet=p.projet_id '\r
@@ -682,24 +685,28 @@ class commonCore extends cubeCore {
                touch($cache);\r
        }\r
 \r
-       public function sauvePreferencesUtilisateur() {\r
+       public function sauvePreferencesUtilisateur()\r
+       {\r
                $dao = new commonDAOUtilisateur($this->con);\r
                $dao->sauvePreferences($this->user);\r
        }\r
 \r
-       public function refreshWSUsersTree() {\r
+       public function refreshWSUsersTree()\r
+       {\r
                $t = new wsUsersTree($this->con);\r
                $t->refreshWSUsersTree();\r
        }\r
 \r
-       public function loadExtranetClasses() {\r
+       public function loadExtranetClasses()\r
+       {\r
                global $__autoload;\r
                require_once(dirname(__FILE__) . '/../extranet/Metier/_common.php');\r
                require_once(dirname(__FILE__) . '/../extranet/Controlleur/_common.php');\r
                require_once(dirname(__FILE__) . '/../extranet/DAO/_common.php');\r
        }\r
 \r
-       public function loadWSClasses() {\r
+       public function loadWSClasses()\r
+       {\r
                global $__autoload;\r
                require_once(dirname(__FILE__) . '/../ws/Metier/_common.php');\r
                require_once(dirname(__FILE__) . '/../ws/Controlleur/_common.php');\r
index 0a39fe6d08ee306e58add5921e6bc02dc13a57f4..a35970618a54c0e7c15e28b17957b4cee4de2d7e 100644 (file)
@@ -31,7 +31,7 @@ class commonDroits {
 \r
        public static function dashboard($error = true) {\r
                if (MODE == 'extranet') {\r
-                       $grade = 1;\r
+                       $grade = 0.5;\r
                } elseif (MODE == 'ws') {\r
                        $grade = 5;\r
                }\r
@@ -79,6 +79,4 @@ class commonDroits {
                exit;\r
        }\r
 \r
-}\r
-\r
-?>
\ No newline at end of file
+}
\ No newline at end of file
index 9cbe230284a507440da648b7b679b90cce2825db..33d1fd7a71f32a1107789354c24a144a8a7cfdfd 100644 (file)
@@ -1,5 +1,7 @@
 <?php\r
-class extranetDroits {\r
+\r
+class extranetDroits\r
+{\r
        protected static function verifDroits($proprietaire, $client, $action = 'r', $error = true, $collegues = false)\r
        {\r
                global $core;\r
@@ -25,7 +27,7 @@ class extranetDroits {
                return false;\r
        }\r
 \r
-       public static function devis($devis, $action , $error = true)\r
+       public static function devis($devis, $action, $error = true)\r
        {\r
                return self::verifDroits($devis->createur_id, $devis->client_id, $action, $error, true);\r
        }\r
@@ -53,9 +55,11 @@ class extranetDroits {
                        $nav[__('Dashboard')] = 'dashboard';\r
                        $nav[__('Projets')] = 'projets';\r
                        $nav[__('Timereport')] = 'timereport';\r
-                       $nav[__('Devis')] = 'devis';\r
-                       $nav[__('Factures')] = 'factures';\r
-                       $nav[__('Clients')] = 'clients';\r
+                       if ($core->user->grade >= 1) {\r
+                               $nav[__('Devis')] = 'devis';\r
+                               $nav[__('Factures')] = 'factures';\r
+                               $nav[__('Clients')] = 'clients';\r
+                       }\r
                        if ($core->user->grade >= 2) {\r
                                $nav[__('Chiffres')] = 'chiffres';\r
                                $nav[__('RH')] = 'rh';\r
@@ -67,6 +71,4 @@ class extranetDroits {
                }\r
                return $nav;\r
        }\r
-}\r
-\r
-?>
\ No newline at end of file
+}
\ No newline at end of file
index 67fb7909338460b47d22d75930356b9e058a8c91..119582fa9b1e434a6aca4fbd76d5312cab254d95 100644 (file)
@@ -1,8 +1,10 @@
 <?php
 
-class extranetUrl {
+class extranetUrl
+{
 
-       public static function clients($args) {
+       public static function clients($args)
+       {
                global $core;
                cubePage::truePopup();
                cubePage::autoComplete();
@@ -26,7 +28,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeClients($dashboard = null, $settings = null) {
+       public static function listeClients($dashboard = null, $settings = null)
+       {
                global $core;
                commonDroits::min(1);
                $settings = is_null($settings) ? $core->user->getSettings('clients') : $settings;
@@ -95,7 +98,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function clientDetailCa($entreprise_id) {
+       public static function clientDetailCa($entreprise_id)
+       {
                global $core;
                $dao = new commonDAOEntreprise($core->con);
                $annees = $dao->getCaDetails($entreprise_id);
@@ -109,7 +113,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function clientDetailImpaye($entreprise_id) {
+       public static function clientDetailImpaye($entreprise_id)
+       {
                global $core;
                $dao = new extranetDAOFacture($core->con);
                $daoClient = new commonDAOEntreprise($core->con);
@@ -141,7 +146,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formClient($entreprise_id = 'new') {
+       public static function formClient($entreprise_id = 'new')
+       {
                global $core;
                commonDroits::min(1);
                $dao = new commonDAOEntreprise($core->con);
@@ -198,7 +204,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeContacts($entreprise_id) {
+       public static function listeContacts($entreprise_id)
+       {
                global $core;
                commonDroits::min(1);
                $dao = new commonDAOEntreprise($core->con);
@@ -220,7 +227,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formContact($client_id = 'new', $entreprise_id = null) {
+       public static function formContact($client_id = 'new', $entreprise_id = null)
+       {
                global $core;
                commonDroits::min(1);
 
@@ -256,7 +264,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formNotes($utilisateur_id) {
+       public static function formNotes($utilisateur_id)
+       {
                global $core;
                commonDroits::min(1);
                $dao = new commonDAOUtilisateur($core->con);
@@ -267,14 +276,17 @@ class extranetUrl {
                return $res;
        }
 
-       public static function projets($args) {
+       public static function projets($args)
+       {
                global $core;
-               commonDroits::min(1);
+               commonDroits::min(0.5);
 
                $settings = $core->user->getSettings('projets');
 
                $shortcuts = array();
-               $shortcuts[] = '<a href="#" class="popup" rel="formProjet/new">' . $core->typo->Ajouter('Créer un projet') . '</a>';
+               if ($core->user->grade >= 1) {
+                       $shortcuts[] = '<a href="# class="popup" rel="formProjet/new">' . $core->typo->Ajouter('Créer un projet') . '</a>';
+               }
 
                $filtres = array();
                $filtres[] = new commonFiltre(__('Crée par'), 'equipier', $settings['filtres']);
@@ -292,9 +304,10 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeProjets($dashboard = null, $settings = null) {
+       public static function listeProjets($dashboard = null, $settings = null)
+       {
                global $core;
-               commonDroits::min(1);
+               commonDroits::min(0.5);
                $settings = is_null($settings) ? $core->user->getSettings('projets') : $settings;
                $change = is_null($dashboard) ? 'Projet' : 'Dashboard/' . $dashboard;
 
@@ -305,9 +318,11 @@ class extranetUrl {
                $res .= '<th>' . commonUrl::orderby(__('Année'), 'annee_fin', $settings, 'sort' . $change) . '</th>';
                $res .= '<th>' . commonUrl::orderby(__('Chef'), 'chef', $settings, 'sort' . $change) . '</th>';
                $res .= '<th>' . commonUrl::orderby(__('Status'), 'status', $settings, 'sort' . $change) . '</th>';
-               $res .= '<th>' . commonUrl::orderby(__('Facturé'), 'rapport_facturation', $settings, 'sort' . $change) . '</th>';
-               $res .= '<th>' . commonUrl::orderby(__('Payé'), 'rapport_paiement', $settings, 'sort' . $change) . '</th>';
-               $res .= '<th>' . commonUrl::orderby('<abbr title="' . __('Budget') . '">B</abbr>', 'budget', $settings, 'sort' . $change) . '</th>';
+               if ($core->user->grade >= 1) {
+                       $res .= '<th>' . commonUrl::orderby(__('Facturé'), 'rapport_facturation', $settings, 'sort' . $change) . '</th>';
+                       $res .= '<th>' . commonUrl::orderby(__('Payé'), 'rapport_paiement', $settings, 'sort' . $change) . '</th>';
+                       $res .= '<th>' . commonUrl::orderby('<abbr title="' . __('Budget') . '">B</abbr>', 'budget', $settings, 'sort' . $change) . '</th>';
+               }
                $res .= '<th>' . commonUrl::orderby('<abbr title="' . __('Progression') . '">Pr</abbr>', 'progression', $settings, 'sort' . $change) . '</th>';
                $res .= '<th class="min"></th></tr>';
 
@@ -366,16 +381,18 @@ class extranetUrl {
                                $rapport_paiement = __('Trop');
                        }
 
-                       $res .= '<td>';
-                       if ($projet->status == 1 && !$rf) {
-                               $res .= '<a href="' . SITE_PATH . 'editefacture/new/' . $projet->projet_id . '" title="' . __('Créer la facture pour ce projet') . '">' . $rapport_facturation . '</a>';
-                       } else {
-                               $res .= $rapport_facturation;
-                       }
-                       $res .= '</td>';
-                       $res .= '<td>' . $rapport_paiement . '</td>';
+                       if ($core->user->grade >= 1) {
+                               $res .= '<td>';
+                               if ($projet->status == 1 && !$rf) {
+                                       $res .= '<a href="' . SITE_PATH . 'editefacture/new/' . $projet->projet_id . '" title="' . __('Créer la facture pour ce projet') . '">' . $rapport_facturation . '</a>';
+                               } else {
+                                       $res .= $rapport_facturation;
+                               }
+                               $res .= '</td>';
+                               $res .= '<td>' . $rapport_paiement . '</td>';
 
-                       $res .= '<td>' . $projet->budget . '</td>';
+                               $res .= '<td>' . $projet->budget . '</td>';
+                       }
                        // $res .= '<td>' . $projet->jours_prevus . '</td>';
                        // $res .= '<td>' . $projet->jours_consommes . '</td>';
                        $res .= '<td>' . $projet->progression . '</td>';
@@ -395,13 +412,16 @@ class extranetUrl {
                return $res;
        }
 
-       public static function projet($args) {
+       public static function projet($args)
+       {
                global $core;
-               commonDroits::min(1);
+               commonDroits::min(0.5);
 
                $shortcuts = array();
-               $shortcuts[] = '<a href="#" class="popup" rel="formTacheNormale/new/' . $args[1] . '">' . $core->typo->Ajouter('Créer une tâche') . '</a>';
-               $shortcuts[] = '<a href="#" class="popup" rel="formTacheSousTraitee/new/' . $args[1] . '">' . $core->typo->Ajouter('Créer une tâche sous-traitée') . '</a>';
+               if ($core->user->grade >= 1) {
+                       $shortcuts[] = '<a href="#" class="popup" rel="formTacheNormale/new/' . $args[1] . '">' . $core->typo->Ajouter('Créer une tâche') . '</a>';
+                       $shortcuts[] = '<a href="#" class="popup" rel="formTacheSousTraitee/new/' . $args[1] . '">' . $core->typo->Ajouter('Créer une tâche sous-traitée') . '</a>';
+               }
 
                $res = commonPage::barre(null, null, null, $shortcuts);
                $res .= commonPage::tMain();
@@ -414,9 +434,10 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeProjet($projet_id) {
+       public static function listeProjet($projet_id)
+       {
                global $core;
-               commonDroits::min(1);
+               commonDroits::min(0.5);
 
                $res = '<table class="liste">';
                $res .= '<tr><th>#</th>';
@@ -425,7 +446,9 @@ class extranetUrl {
                $res .= '<th>' . __('Année') . '</th>';
                $res .= '<th>' . __('Chef de projet') . '</th>';
                $res .= '<th>' . __('Status') . '</th>';
-               $res .= '<th><abbr title="' . __('Budget') . '">B</abbr></th>';
+               if ($core->user->grade >= 1) {
+                       $res .= '<th><abbr title="' . __('Budget') . '">B</abbr></th>';
+               }
                $res .= '<th><abbr title="' . __('Jours prévus') . '">Pl</abbr></th>';
                $res .= '<th><abbr title="' . __('Jours consommés') . '">Co</abbr></th>';
                $res .= '<th><abbr title="' . __('Progression') . '">Pr</abbr></th>';
@@ -455,7 +478,9 @@ class extranetUrl {
                } else {
                        $res .= '<td>' . $core->projets_status[$projet->status] . '</td>';
                }
-               $res .= '<td>' . $projet->budget . '</td>';
+               if ($core->user->grade >= 1) {
+                       $res .= '<td>' . $projet->budget . '</td>';
+               }
                $res .= '<td>' . $projet->jours_prevus . '</td>';
                $res .= '<td>' . $projet->jours_consommes . '</td>';
                $res .= '<td>' . $projet->progression . '</td>';
@@ -487,7 +512,10 @@ class extranetUrl {
                        } else {
                                $res .= '<td colspan="3"></td>';
                        }
-                       $res .= '<td>' . $tache->budget . '</td>';
+
+                       if ($core->user->grade >= 1) {
+                               $res .= '<td>' . $tache->budget . '</td>';
+                       }
 
                        if ($tache instanceof extranetTacheNormale) {
                                $progression = !$tache->progression ? '-' : $tache->progression . '%';
@@ -510,7 +538,11 @@ class extranetUrl {
                                }
                        }
 
-                       $res .= '<td class="action"><a href="#" class="ajax" rel="supprimeTache/' . $tache->tache_id . '" title="' . __('Supprimer cette tâche va également supprimer les timereports associés. Êtes vous certain de vouloir supprimer cette tâche ?') . '">' . cubeMedia::image(IMG . '/delete.png') . '</a></td>';
+                       $res .= '<td class="action">';
+                       if ($core->user->grade >= 1) {
+                               $res .= '<a href="#" class="ajax" rel="supprimeTache/' . $tache->tache_id . '" title="' . __('Supprimer cette tâche va également supprimer les timereports associés. Êtes vous certain de vouloir supprimer cette tâche ?') . '">' . cubeMedia::image(IMG . '/delete.png') . '</a>';
+                       }
+                       $res .= '</td>';
 
                        $res .= '</tr>';
                        $i++;
@@ -519,7 +551,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formProjet($projet_id = 'new') {
+       public static function formProjet($projet_id = 'new')
+       {
                global $core;
                commonDroits::min(1);
 
@@ -575,7 +608,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formTache($tache) {
+       public static function formTache($tache)
+       {
                global $core;
                commonDroits::min(1);
 
@@ -586,7 +620,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formTacheNormale($tache_id, $projet_id = null) {
+       public static function formTacheNormale($tache_id, $projet_id = null)
+       {
                global $core;
                commonDroits::min(1);
                $dao = new extranetDAOTache($core->con);
@@ -602,7 +637,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formTacheSousTraitee($tache_id, $projet_id = null) {
+       public static function formTacheSousTraitee($tache_id, $projet_id = null)
+       {
                global $core;
                commonDroits::min(1);
                $dao = new extranetDAOTache($core->con);
@@ -617,9 +653,10 @@ class extranetUrl {
                return $res;
        }
 
-       public static function timereport($args) {
+       public static function timereport($args)
+       {
                global $core;
-               commonDroits::min(1);
+               commonDroits::min(0.5);
                $settings = $core->user->getSettings('timereport');
                $res = '';
                if (!isset($_GET['light'])) {
@@ -639,9 +676,10 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeTimereport($dashboard = null, $settings = null) {
+       public static function listeTimereport($dashboard = null, $settings = null)
+       {
                global $core;
-               commonDroits::min(1);
+               commonDroits::min(0.5);
                // Récupère la liste des projets
                $settings = is_null($settings) ? $core->user->getSettings('timereport') : $settings;
                $change = is_null($dashboard) ? 'Timereport' : 'Dashboard/' . $dashboard;
@@ -734,7 +772,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function getClassOfDay($date) {
+       public static function getClassOfDay($date)
+       {
                $aujourdhui = cubeDate::round(null, 'd');
                $highlight = ($date == $aujourdhui);
                $we = (date('N', $date) >= 6);
@@ -747,7 +786,8 @@ class extranetUrl {
                return '';
        }
 
-       public static function devis($args) {
+       public static function devis($args)
+       {
                global $core;
                cubePage::truePopup();
                cubePage::contextMenu();
@@ -777,7 +817,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function devis_client($args) {
+       public static function devis_client($args)
+       {
                global $core;
 
                $res = commonPage::barre();
@@ -791,7 +832,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeDevis($dashboard = null, $settings = null) {
+       public static function listeDevis($dashboard = null, $settings = null)
+       {
                global $core;
 
                if ($core->user->grade == 0) {
@@ -801,7 +843,8 @@ class extranetUrl {
                }
        }
 
-       public static function contextDevis($id) {
+       public static function contextDevis($id)
+       {
                global $core;
                $res = '<div class="contextMenu" id="' . $id . '">';
                $res .= '<ul>';
@@ -819,7 +862,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeDevisEquipier($dashboard = null, $settings = null) {
+       public static function listeDevisEquipier($dashboard = null, $settings = null)
+       {
                global $core;
                commonDroits::min(1);
                $settings = is_null($settings) ? $core->user->getSettings('devis') : $settings;
@@ -894,7 +938,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeDevisClient($dashboard = null, $settings = null) {
+       public static function listeDevisClient($dashboard = null, $settings = null)
+       {
                global $core;
                cubePage::truePopup();
 
@@ -926,7 +971,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function voirdevis($args) {
+       public static function voirdevis($args)
+       {
                global $core;
                // Charge le devis
                $dao = new extranetDAODevis($core->con);
@@ -943,7 +989,8 @@ class extranetUrl {
                cubeHTTP::relayNoCache(ROOT . '/docs/devis/' . $args[1] . '.pdf');
        }
 
-       public static function editedevis($args) {
+       public static function editedevis($args)
+       {
                global $core;
                commonDroits::min(1);
                $res = commonPage::barre();
@@ -955,7 +1002,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formDevis($devis_id = 'new') {
+       public static function formDevis($devis_id = 'new')
+       {
                global $core;
                cubePage::autocomplete();
                cubePage::emptyField();
@@ -1041,7 +1089,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function previewDevis($args) {
+       public static function previewDevis($args)
+       {
                global $core;
 
                $dao = new extranetDAODevis($core->con);
@@ -1074,7 +1123,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function factures($args) {
+       public static function factures($args)
+       {
                global $core;
 
                if ($core->user->grade == 0) {
@@ -1103,7 +1153,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function factures_client($args) {
+       public static function factures_client($args)
+       {
                global $core;
                $res = commonPage::barre();
                $res .= commonPage::tMain();
@@ -1116,7 +1167,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function contextFacture($id) {
+       public static function contextFacture($id)
+       {
                global $core;
                $res = '<div class="contextMenu" id="' . $id . '">';
                $res .= '<ul>';
@@ -1140,7 +1192,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeFactures($dashboard = null, $settings = null) {
+       public static function listeFactures($dashboard = null, $settings = null)
+       {
                global $core;
                if ($core->user->grade == 0) {
                        return self::listeFacturesClient($dashboard, $settings);
@@ -1149,7 +1202,8 @@ class extranetUrl {
                }
        }
 
-       public static function listeFacturesEquipier($dashboard = null, $settings = null) {
+       public static function listeFacturesEquipier($dashboard = null, $settings = null)
+       {
                global $core;
                cubePage::truePopup();
                cubePage::contextMenu();
@@ -1245,7 +1299,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeFacturesClient($dashboard = null, $settings = null) {
+       public static function listeFacturesClient($dashboard = null, $settings = null)
+       {
                global $core;
                cubePage::truePopup();
                $settings = $core->user->getSettings('factures');
@@ -1280,7 +1335,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formFacturePaiement($facture_id) {
+       public static function formFacturePaiement($facture_id)
+       {
                global $core;
                $dao = new extranetDAOFacture($core->con);
                $facture = $dao->selectById($facture_id);
@@ -1292,7 +1348,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function voirfacture($args) {
+       public static function voirfacture($args)
+       {
                global $core;
                // Charge la facture
                $dao = new extranetDAOFacture($core->con);
@@ -1303,7 +1360,8 @@ class extranetUrl {
                cubeHTTP::relayNoCache(ROOT . '/docs/factures/' . $args[1] . '.pdf');
        }
 
-       public static function editefacture($args) {
+       public static function editefacture($args)
+       {
                global $core;
                commonDroits::min(1);
                $res = commonPage::barre();
@@ -1319,7 +1377,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formFacture($facture_id = 'new', $projet_id = null) {
+       public static function formFacture($facture_id = 'new', $projet_id = null)
+       {
                global $core;
                commonDroits::min(1);
                cubePage::autoComplete();
@@ -1449,7 +1508,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function previewFacture($args) {
+       public static function previewFacture($args)
+       {
                global $core;
                commonDroits::min(1);
                $dao = new extranetDAOFacture($core->con);
@@ -1472,7 +1532,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function formPrintFactures() {
+       public static function formPrintFactures()
+       {
                global $core;
                $last = $core->user->getLastPrint();
                $res = '';
@@ -1484,7 +1545,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function chiffres($args) {
+       public static function chiffres($args)
+       {
                global $core;
                commonDroits::min(2);
                // $res = commonPage::barre(null, null, null, array('<a href="http://www.google.com/calendar/" class="blank">' . $core->typo->Favoris(__('Gérer les charges sur Google Agenda')) . '</a>'));
@@ -1495,7 +1557,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function traduction($args) {
+       public static function traduction($args)
+       {
                global $core;
                commonDroits::min(1);
                $res = commonPage::barre();
@@ -1512,7 +1575,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function cleanTimereport($args) {
+       public static function cleanTimereport($args)
+       {
                global $core;
 
                $r = $core->con->select('SELECT * FROM timereport');
@@ -1543,7 +1607,8 @@ class extranetUrl {
                }
        }
 
-       public static function rh($args) {
+       public static function rh($args)
+       {
                global $core;
                commonDroits::min(2);
                $res = commonPage::barre();
@@ -1557,7 +1622,8 @@ class extranetUrl {
                return $res;
        }
 
-       public static function listeRh($dashboard = null, $settings = null) {
+       public static function listeRh($dashboard = null, $settings = null)
+       {
                global $core;
                commonDroits::min(2);
                $settings = is_null($settings) ? $core->user->getSettings('equipiers') : $settings;
index 98271f0ef077af7627ae52b17be9c24ac2cf1220..7d62122d6aa3604524810b4ff1d5ad3cf30b1749 100644 (file)
@@ -4,7 +4,7 @@ class extranetUrlProjet {
        public static function projets($args)\r
        {\r
                global $core;\r
-               commonDroits::min(1);\r
+               commonDroits::min(0.5);\r
 \r
                $settings = $core->user->getSettings('projets');\r
 \r
@@ -30,7 +30,7 @@ class extranetUrlProjet {
        public static function listeProjets($dashboard = null, $settings = null)\r
        {\r
                global $core;\r
-               commonDroits::min(1);\r
+               commonDroits::min(0.5);\r
                $settings = is_null($settings)?$core->user->getSettings('projets'):$settings;\r
                $change = is_null($dashboard)?'Projet':'Dashboard/' . $dashboard;\r
 \r
@@ -134,7 +134,7 @@ class extranetUrlProjet {
        public static function projet($args)\r
        {\r
                global $core;\r
-               commonDroits::min(1);\r
+               commonDroits::min(0.5);\r
 \r
                $shortcuts = array();\r
                $shortcuts[] = '<a href="#" class="popup" rel="formTacheNormale/new/' . $args[1] . '">' . $core->typo->Ajouter('Créer une tâche') . '</a>';\r
@@ -154,7 +154,7 @@ class extranetUrlProjet {
        public static function listeProjet($projet_id)\r
        {\r
                global $core;\r
-               commonDroits::min(1);\r
+               commonDroits::min(0.5);\r
 \r
                $res = '<table class="liste">';\r
                $res .= '<tr><th>#</th>';\r
index 946dad684ab1568acbe3e1daeb541406608edf4d..90c046f21e1608be967a8722dfaa7a840cc67ba0 100644 (file)
@@ -4,7 +4,7 @@ class extranetUrlTimereport {
        public static function timereport($args)\r
        {\r
                global $core;\r
-               commonDroits::min(1);\r
+               commonDroits::min(0.5);\r
                $settings = $core->user->getSettings('timereport');\r
                $filtres = array();\r
                $filtres[] = new commonFiltre(__('Participants'), 'equipier_participe', $settings['filtres']);\r
@@ -22,7 +22,7 @@ class extranetUrlTimereport {
        public static function listeTimereport($dashboard = null, $settings = null)\r
        {\r
                global $core;\r
-               commonDroits::min(1);\r
+               commonDroits::min(0.5);\r
                // Récupère la liste des projets\r
                $settings = is_null($settings)?$core->user->getSettings('timereport'):$settings;\r
                $change = is_null($dashboard)?'Timereport':'Dashboard/' . $dashboard;\r