summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-02 15:02:38 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-02 15:02:38 +0100
commite88544380267e3539fd28a6cefea844fb75e684a (patch)
treef5a6f7be7307e935e8d51f1594b62af5d209e846 /templates
parent3e8fc0c354098cdc615401d7d0d04cf5225035d3 (diff)
downloadcontact-e88544380267e3539fd28a6cefea844fb75e684a.tar.gz
contact-e88544380267e3539fd28a6cefea844fb75e684a.tar.bz2
contact-e88544380267e3539fd28a6cefea844fb75e684a.zip
Rename list.php → list_contacts.php; add odd/even row pairs to list
list_contacts.php: modern replacement with clean code, no dead session logic, referencing list.tpl. list.php: now a thin redirect for backward compatibility. list.tpl: alternate odd/even class on each contact's row pair. All internal references (display_contact, index, load_emails, menu, admin_xref_types) updated to list_contacts.php. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/admin_xref_types.tpl2
-rwxr-xr-xtemplates/list.tpl5
-rwxr-xr-xtemplates/menu_contact.tpl2
3 files changed, 5 insertions, 4 deletions
diff --git a/templates/admin_xref_types.tpl b/templates/admin_xref_types.tpl
index 41eb9c1..7b6b792 100755
--- a/templates/admin_xref_types.tpl
+++ b/templates/admin_xref_types.tpl
@@ -57,7 +57,7 @@
<td>
<h3>
- <a href="{$smarty.const.CONTACT_PKG_URL}list.php?source={$xref_types[type].source}">{$xref_types[type].cross_ref_title}</a>
+ <a href="{$smarty.const.CONTACT_PKG_URL}list_contacts.php?source={$xref_types[type].source}">{$xref_types[type].cross_ref_title}</a>
&nbsp; <small>[ {$xref_types[type].num_entries} ]</small>
</h3>
diff --git a/templates/list.tpl b/templates/list.tpl
index fed9c8a..e6cdcc3 100755
--- a/templates/list.tpl
+++ b/templates/list.tpl
@@ -18,7 +18,8 @@
<th>{smartlink ititle="Address" isort="street" ihash=$listInfo.ihash|default:''}</th>
</tr>
{section name=content loop=$listcontacts}
- <tr class="first">
+ {if $smarty.section.content.rownum % 2 != 0}{assign var=rowclass value="odd"}{else}{assign var=rowclass value="even"}{/if}
+ <tr class="first {$rowclass}">
<td class="alignleft">
<a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}">
{$listcontacts[content].title}
@@ -38,7 +39,7 @@
{$listcontacts[content].town},&nbsp;{/if}
{$listcontacts[content].postcode}</td>
</tr>
- <tr class="second">
+ <tr class="second {$rowclass}">
<td>{$item.display_link|default:'Not Set'}</td>
<td>{assign var=content_type_guid value=$item.content_type_guid|default:'bitpage'}{$gLibertySystem->getContentTypeName($content_type_guid|default:'bitpage')}</td>
<td>
diff --git a/templates/menu_contact.tpl b/templates/menu_contact.tpl
index 0f362ba..646e72a 100755
--- a/templates/menu_contact.tpl
+++ b/templates/menu_contact.tpl
@@ -1,7 +1,7 @@
{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.php">{booticon ipackage="icons" iname="icon-telephone" iexplain="List contacts" ilocation=menu}</a></li>
+ <li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}list_contacts.php">{booticon ipackage="icons" iname="icon-telephone" 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}add_person.php">{booticon ipackage="icons" iname="icon-telephone-edit" iexplain="Add Person" ilocation=menu}</a></li>
<li><a class="item" href="{$smarty.const.CONTACT_PKG_URL}add_business.php">{booticon ipackage="icons" iname="icon-telephone-edit" iexplain="Add Business" ilocation=menu}</a></li>