From d594cfbbc60b62f40a87a918ab7338068d2c478f Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 19 Sep 2013 11:47:09 +0000 Subject: [PATCH] Add a new contact field to the table and a new contact groups table. Fix the class for the title on the contact main page. --- app/contacts/app_config.php | 38 +++++++++++++++++++++++++++++++++++++ app/contacts/contacts.php | 15 ++++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/app/contacts/app_config.php b/app/contacts/app_config.php index c09abcf341..79b80f23f4 100644 --- a/app/contacts/app_config.php +++ b/app/contacts/app_config.php @@ -89,6 +89,13 @@ $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true'; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'contact_parent_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'contact_type'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the type.'; @@ -318,4 +325,35 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; $z++; + + $y = 4; //table array index + $apps[$x]['db'][$y]['table'] = 'v_contact_groups'; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'contact_groups_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign'; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains'; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'contact_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; + $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; + $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign'; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_contacts'; + $apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'contact_uuid'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = 'group_name'; + $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ''; ?> \ No newline at end of file diff --git a/app/contacts/contacts.php b/app/contacts/contacts.php index 044eb1671b..18d3b3c6ab 100644 --- a/app/contacts/contacts.php +++ b/app/contacts/contacts.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2012 + Portions created by the Initial Developer are Copyright (C) 2008-2013 the Initial Developer. All Rights Reserved. Contributor(s): @@ -62,17 +62,18 @@ require_once "resources/paging.php"; echo "\n"; echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; if (permission_exists('contacts_add')) { - echo " \n"; }
".$text['header-contacts']."
\n"; - echo " ".$text['description-contacts']."\n"; + echo "
\n"; + echo " ".$text['header-contacts']."
\n"; + echo " ".$text['description-contacts']."

\n"; echo "
\n"; - echo "
\n"; + echo " \n"; + echo "
\n"; echo " \n"; echo " \n"; - echo " \n"; echo " \n"; + echo " \n"; echo " \n"; echo "