diff --git a/html/admin/sql/patch/upgrade107.sql b/html/admin/sql/patch/upgrade107.sql index a2485b9f2..1c7f218e5 100644 --- a/html/admin/sql/patch/upgrade107.sql +++ b/html/admin/sql/patch/upgrade107.sql @@ -283,6 +283,23 @@ create trigger opd_limit_description before update or insert on op_predef for ea update menu_ref set me_menu = 'Trésorerie' where me_code='MENUFIN'; +create or replace function do_insert() returns void +as +$$ +declare + nCount integer; +begin + select count(*) into nCount from menu_ref where me_file='contact.inc.php'; + if nCount = 0 then + insert into menu_ref(ME_CODE,me_menu,me_file,me_description,me_type) values ('CONTACT','Contact','contact.inc.php','Liste des contacts','ME'); + end if; +end; +$$ +language plpgsql; + +select do_insert(); + +drop function do_insert(); update version set val=108; diff --git a/include/class_contact.php b/include/class_contact.php index ff4486403..9d6393527 100644 --- a/include/class_contact.php +++ b/include/class_contact.php @@ -79,8 +79,8 @@ class contact extends Fiche if ( $all_contact == 0 ) return ""; $r=$bar; - $r.='
| Quick Code | Nom | Prénom | @@ -123,8 +123,7 @@ class contact extends Fiche } $r.="||
|---|---|---|---|---|
| '.$qcode. - " | "; + $r.=''.HtmlInput::card_detail($qcode)." | "; $r.="".$contact->strAttribut(ATTR_DEF_NAME)." | "; $r.="".$contact->strAttribut(ATTR_DEF_FIRST_NAME)." | "; $r.="".$l_company_name." | "; diff --git a/include/contact.inc.php b/include/contact.inc.php index fdb173e02..3c734e67a 100644 --- a/include/contact.inc.php +++ b/include/contact.inc.php @@ -71,7 +71,7 @@ if ($low_action == "list") ', $a); + printf(_('Recherche') . HtmlInput::filter_table("contact_tb", "0,1,2,3,4,5,6", 1)); $sel_card = new ISelect('cat'); $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . ' where frd_id=' . FICHE_TYPE_CONTACT . diff --git a/sql/upgrade.sql b/sql/upgrade.sql index e69de29bb..5ba9aa130 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -0,0 +1,17 @@ +create or replace function do_insert() returns void +as +$$ +declare + nCount integer; +begin + select count(*) into nCount from menu_ref where me_file='contact.inc.php'; + if nCount = 0 then + insert into menu_ref(ME_CODE,me_menu,me_file,me_description,me_type) values ('CONTACT','Contact','contact.inc.php','Liste des contacts','ME'); + end if; +end; +$$ +language plpgsql; + +select do_insert(); + +drop function do_insert(); \ No newline at end of file