]> git.agnieray.net Git - galette.git/commitdiff
Merge branch 'hotfix/0.7.2.8' into develop
authorJohan Cwiklinski <johan@x-tnd.be>
Wed, 19 Dec 2012 18:28:38 +0000 (19:28 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Wed, 19 Dec 2012 18:28:38 +0000 (19:28 +0100)
Conflicts:
galette/includes/galette.inc.php
galette/includes/smarty.inc.php
galette/lib/Galette/Repository/Members.php

1  2 
galette/ajouter_contribution.php
galette/ajouter_transaction.php
galette/includes/smarty.inc.php
galette/lib/Galette/Entity/Adherent.php
galette/lib/Galette/Entity/Group.php
galette/lib/Galette/Repository/Members.php
galette/templates/default/ajouter_contribution.tpl
galette/templates/default/gestion_adherents.tpl

Simple merge
Simple merge
index d83314a8f9b2afd1412cb5defcd9a457cf99f3a1,a135784894c9d90e05665e7987939380fc9d5188..c7b2bfca4f1b41822e5e7bc89483da537cc9e267
@@@ -67,3 -61,27 +67,26 @@@ $tpl->registerPlugin
      'memberName',
      'getMemberName'
  );
 -?>
+ $s = new Galette\Entity\Status();
+ $statuses_list = $s->getList();
+ /**
+  * Return status label
+  *
+  * @param array $params Parameters
+  *
+  * @return string
+  */
+ function getStatusLabel($params)
+ {
+     extract($params);
+     global $statuses_list;
+     return $statuses_list[$id];
+ }
+ $tpl->registerPlugin(
+     'function',
+     'statusLabel',
+     'getStatusLabel'
+ );
index 312bee714efbb59f35166e62e3e99df10b22e14e,b021b8cd160aed326c10d1344e82cb8aa1c050d4..716e4b6a450a091b20ef7a675305f1ff552d5bd5
@@@ -156,304 -176,11 +176,11 @@@ class Adheren
          *   (int)position,
          *   (int)category
          * )
-         *
-         * I'd prefer a static private variable for this...
-         * But call to the _T function does not seem to be allowed there :/
          */
-         $this->_fields = array(
-             'id_adh' => array(
-                 'label'    => _T("Identifiant:"),
-                 'propname' => 'id',
-                 'required' => true,
-                 'visible'  => FieldsConfig::HIDDEN,
-                 'position' => 0,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'id_statut' => array(
-                 'label'    => _T("Status:"),
-                 'propname' => 'status',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 1,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'nom_adh' => array(
-                 'label'    => _T("Name:"),
-                 'propname' => 'name',
-                 'required' => true ,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 2,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'prenom_adh' => array(
-                 'label'    => _T("First name:"),
-                 'propname' => 'surname',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 3,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'societe_adh' => array(
-                 'label'    => _T("Company name:"),
-                 'propname' => 'company_name',
-                 'required' => false ,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 4,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'pseudo_adh' => array(
-                 'label'    => _T("Nickname:"),
-                 'propname' => 'nickname',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 5,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'titre_adh' => array(
-                 'label'    => _T("Title:"),
-                 'propname' => 'politeness',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 6,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'ddn_adh' => array(
-                 'label'    => _T("Birth date:"),
-                 'propname' => 'birthdate',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 7,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'adresse_adh' => array(
-                 'label'    => _T("Address:"),
-                 'propname' => 'adress',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 8,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             /** TODO remove second adress... */
-             'adresse2_adh' => array(
-                 'label'    => _T("Address (continuation)"),
-                 'propname' => 'adress_continuation',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 9,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'cp_adh' => array(
-                 'label'    => _T("Zip Code:"),
-                 'propname' => 'zipcode',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 10,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'ville_adh' => array(
-                 'label'    => _T("City:"),
-                 'propname' => 'town',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 11,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'pays_adh' => array(
-                 'label'    => _T("Country:"),
-                 'propname' => 'country',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 12,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'tel_adh' => array(
-                 'label'    => _T("Phone:"),
-                 'propname' => 'phone',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 13,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'gsm_adh' => array(
-                 'label'    => _T("Mobile phone:"),
-                 'propname' => 'gsm',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 14,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'email_adh' => array(
-                 'label'    => _T("E-Mail:"),
-                 'propname' => 'email',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 15,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'url_adh' => array(
-                 'label'    => _T("Website:"),
-                 'propname' => 'website',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 16,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'icq_adh' => array(
-                 'label'    => _T("ICQ:"),
-                 'propname' => 'icq',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 17,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'msn_adh' => array(
-                 'label'    => _T("MSN:"),
-                 'propname' => 'msn',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 18,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'jabber_adh' => array(
-                 'label'    => _T("Jabber:"),
-                 'propname' => 'jabber',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 19,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'info_adh' => array(
-                 'label'    => _T("Other informations (admin):"),
-                 'propname' => 'other_infos_admin',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 20,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'info_public_adh' => array(
-                 'label'    => _T("Other informations:"),
-                 'propname' => 'others_infos',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 21,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'prof_adh' => array(
-                 'label'    => _T("Profession:"),
-                 'propname' => 'job',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 22,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'login_adh' => array(
-                 'label'    => _T("Username:"),
-                 'propname' => 'login',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 23,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'mdp_adh' => array(
-                 'label'    => _T("Password:"),
-                 'propname' => 'password',
-                 'required' => true,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 24,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'date_crea_adh' => array(
-                 'label'    => _T("Creation date:"),
-                 'propname' => 'creation_date',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 25,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'date_modif_adh' => array(
-                 'label'    => _T("Modification date:"),
-                 'propname' => 'modification_date',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 26,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'activite_adh' => array(
-                 'label'    => _T("Account:"),
-                 'propname' => 'active',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 27,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'bool_admin_adh' => array(
-                 'label'    => _T("Galette Admin:"),
-                 'propname' => 'admin',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 28,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'bool_exempt_adh' => array(
-                 'label'    => _T("Freed of dues:"),
-                 'propname' => 'due_free',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 29,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'bool_display_info' => array(
-                 'label'    => _T("Be visible in the members list:"),
-                 'propname' => 'appears_in_list',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 30,
-                 'category' => FieldsCategories::ADH_CATEGORY_GALETTE
-             ),
-             'date_echeance' => array(
-                 'label'    => _T("Due date:"),
-                 'propname' => 'due_date',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 31,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'pref_lang' => array(
-                 'label'    => _T("Language:"),
-                 'propname' => 'language',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 32,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'lieu_naissance' => array(
-                 'label'    => _T("Birthplace:"),
-                 'propname' => 'birth_place',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 33,
-                 'category' => FieldsCategories::ADH_CATEGORY_IDENTITY
-             ),
-             'gpgid' => array(
-                 'label'    => _T("Id GNUpg (GPG):"),
-                 'propname' => 'gnupgid',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 34,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             ),
-             'fingerprint' => array(
-                 'label'    => _T("fingerprint:"),
-                 'propname' => 'fingerprint',
-                 'required' => false,
-                 'visible'  => FieldsConfig::VISIBLE,
-                 'position' => 35,
-                 'category' => FieldsCategories::ADH_CATEGORY_CONTACT
-             )
-         );
+         $this->_fields = $members_fields;
  
          //disabled fields override
 -        $locfile = WEB_ROOT . 'config/disabled_fields.php';
 +        $locfile = GALETTE_CONFIG_PATH . 'disabled_fields.php';
          if ( file_exists($locfile) ) {
              include $locfile;
              if ( isset($loc_disabled_fields)
Simple merge
index 532eab1665453523ab00ab8efb71461852d9222b,d63ab5bd8bb806e1d94c3eb2bf2129d62c726978..f709dc9b7bdacd50b4724bc7ec58cc4864f7cb6e
@@@ -486,9 -484,13 +496,14 @@@ class Member
  
              $result = $select->query();
              $members = array();
 -            foreach ( $result->fetchAll() as $o) {
 +            $res = $result->fetchAll();
-             foreach ( $res as $o) {
-                 $members[] = new Adherent($o);
++            foreach ( $res as $o ) {
+                 $deps = array(
+                     'picture'   => false,
+                     'groups'    => false,
+                     'dues'      => false
+                 );
+                 $members[] = new Adherent($o, $deps);
              }
              return $members;
          } catch (\Exception $e) {