diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-11 19:26:25 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-11 19:26:25 +0100 |
| commit | 64aae1e41d9288a6d9709781af29b06fe6adb5ca (patch) | |
| tree | d5d5e74420cee938d7e8ff90b9e6792d5f44cc77 /templates/menu_contact.tpl | |
| parent | 27c615a0a26edb985543e520587e3043d91489f6 (diff) | |
| download | contact-64aae1e41d9288a6d9709781af29b06fe6adb5ca.tar.gz contact-64aae1e41d9288a6d9709781af29b06fe6adb5ca.tar.bz2 contact-64aae1e41d9288a6d9709781af29b06fe6adb5ca.zip | |
Introduce ContactPerson and ContactBusiness subclasses
Splits the Contact class into ContactPerson (content_type_guid='contactperson')
and ContactBusiness (content_type_guid='contactbusiness'), each using 'contact'
as the shared package-level xref schema. Replaces the $isPerson/$00 xref hack
with proper class identity via instanceof.
- ContactPerson.php, ContactBusiness.php: new subclasses
- Contact.php: loadXrefTypeList() reads type tags directly from liberty_xref;
getAvailableTypeItems() for edit form (schema-driven with pre-upgrade fallback);
getDisplayUrl() now points to display_contact.php
- Type item codes: P01/P02 (person), B01-B04 (business, B01=Service new)
- list_people.php, list_businesses.php: separate list pages per type
- list_contacts.php: combined display-layer merge of both types
- 5.0.3.php: upgrade script migrating existing data to new content types and codes
- Templates: isPerson flag from instanceof; horizontal type checkboxes; list.tpl
accepts $listTitle; menu adds People/Businesses entries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/menu_contact.tpl')
| -rwxr-xr-x | templates/menu_contact.tpl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/menu_contact.tpl b/templates/menu_contact.tpl index 56913cf..c53c197 100755 --- a/templates/menu_contact.tpl +++ b/templates/menu_contact.tpl @@ -1,8 +1,10 @@ {strip} {if $packageMenuTitle}<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>{/if} <ul class="{$packageMenuClass}"> - <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}list_contacts.php">{biticon ipackage="icons" iname="view-list" iexplain="List contacts" ilocation=menu}</a></li> - {if $gBitUser->isAdmin() || $gBitUser->hasPermission( 'p_contact_edit' ) } + <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}list_people.php">{biticon ipackage="icons" iname="view-list" iexplain="List People" ilocation=menu}</a></li> + <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}list_businesses.php">{biticon ipackage="icons" iname="view-list" iexplain="List Businesses" ilocation=menu}</a></li> + <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}list_contacts.php">{biticon ipackage="icons" iname="system-search" iexplain="All Contacts" ilocation=menu}</a></li> + {if $gBitUser->isAdmin() || $gBitUser->hasPermission( 'p_contact_update' ) } <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}add_person.php">{biticon ipackage="icons" iname="contact-new-symbolic" iexplain="Add Person" ilocation=menu}</a></li> <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}add_business.php">{biticon ipackage="icons" iname="address-book-new-symbolic" iexplain="Add Business" ilocation=menu}</a></li> {/if} |
