Add contact menu
This commit is contained in:
parent
1a9ee94394
commit
3ee92ea7d5
4 changed files with 38 additions and 5 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ class contact extends Fiche
|
|||
|
||||
if ( $all_contact == 0 ) return "";
|
||||
$r=$bar;
|
||||
$r.='<table border="0" width="95%">
|
||||
<TR style="background-color:lightgrey;">
|
||||
$r.='<table id="contact_tb" class="sortable">
|
||||
<TR>
|
||||
<th>Quick Code</th>
|
||||
<th>Nom</th>
|
||||
<th>Prénom</th>
|
||||
|
|
@ -123,8 +123,7 @@ class contact extends Fiche
|
|||
}
|
||||
$r.="<TR>";
|
||||
$qcode=$contact->strAttribut(ATTR_DEF_QUICKCODE);
|
||||
$r.='<TD><A HREF="javascript:void(0)" onclick="this.ipopup=\'ipopcard\';this.qcode=(\''.$qcode.'\');fill_ipopcard(this);">'.$qcode.
|
||||
"</A></TD>";
|
||||
$r.='<TD>'.HtmlInput::card_detail($qcode)."</TD>";
|
||||
$r.="<TD>".$contact->strAttribut(ATTR_DEF_NAME)."</TD>";
|
||||
$r.="<TD>".$contact->strAttribut(ATTR_DEF_FIRST_NAME)."</TD>";
|
||||
$r.="<TD>".$l_company_name."</TD>";
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ if ($low_action == "list")
|
|||
<?php
|
||||
echo dossier::hidden();
|
||||
$a = (isset($_GET['query'])) ? $_GET['query'] : "";
|
||||
printf(_('Recherche') . ' <input class="input_text" type="text" name="query" value="%s">', $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 .
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue