Procházet zdrojové kódy

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.

Mark Crane před 12 roky
rodič
revize
1ce36841b7
2 změnil soubory, kde provedl 46 přidání a 7 odebrání
  1. 38 0
      app_config.php
  2. 8 7
      contacts.php

+ 38 - 0
app_config.php

@@ -89,6 +89,13 @@
 		$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
 		$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
 		$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
 		$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
 		$z++;
 		$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]['name'] = 'contact_type';
 		$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
 		$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
 		$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the type.';
 		$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]['type'] = 'text';
 		$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
 		$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
 		$z++;
 		$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'] = '';
 ?>
 ?>

+ 8 - 7
contacts.php

@@ -17,7 +17,7 @@
 
 
 	The Initial Developer of the Original Code is
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
 	Mark J Crane <[email protected]>
-	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.
 	the Initial Developer. All Rights Reserved.
 
 
 	Contributor(s):
 	Contributor(s):
@@ -62,17 +62,18 @@ require_once "resources/paging.php";
 
 
 	echo "<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n";
 	echo "<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n";
 	echo "	<tr>\n";
 	echo "	<tr>\n";
-	echo "	<td align=\"left\" valign=\"top\"><strong>".$text['header-contacts']."</strong><br>\n";
-	echo "		".$text['description-contacts']."\n";
+	echo "	<td align=\"left\" valign=\"top\">\n";
+	echo "		<span class='title'>".$text['header-contacts']."</span><br>\n";
+	echo "		".$text['description-contacts']."<br /><br />\n";
 	echo "	</td>\n";
 	echo "	</td>\n";
-	echo "	<td align=\"right\" valign=\"top\">\n";
-	echo "		<form method=\"GET\" name=\"frm_search\" action=\"\">\n";
+	echo "	<form method=\"GET\" name=\"frm_search\" action=\"\">\n";
+	echo "	<td align=\"right\" valign=\"middle\">\n";
 	echo "			<input class=\"formfld\" type=\"text\" name=\"search_all\" value=\"$search_all\">\n";
 	echo "			<input class=\"formfld\" type=\"text\" name=\"search_all\" value=\"$search_all\">\n";
 	echo "			<input class=\"btn\" type=\"submit\" name=\"submit\" value=\"".$text['button-search']."\">\n";
 	echo "			<input class=\"btn\" type=\"submit\" name=\"submit\" value=\"".$text['button-search']."\">\n";
-	echo "		</form>\n";
 	echo "	</td>\n";
 	echo "	</td>\n";
+	echo "	</form>\n";
 	if (permission_exists('contacts_add')) {
 	if (permission_exists('contacts_add')) {
-		echo "	<td align=\"right\" valign=\"top\" width=\"50px\">\n";
+		echo "	<td align=\"right\" valign=\"middle\" width=\"50px\">\n";
 		echo "		<input type='button' class='btn' name='' alt='back' onclick=\"window.location='contact_import.php'\" value='".$text['button-import']."'>\n";
 		echo "		<input type='button' class='btn' name='' alt='back' onclick=\"window.location='contact_import.php'\" value='".$text['button-import']."'>\n";
 		echo "	</td>\n";
 		echo "	</td>\n";
 	}
 	}