From 8cd94400f4cf4cab25b33da2015a4d89bd9c70bd Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 3 Oct 2013 20:12:56 +0200 Subject: [PATCH] support multiple URLs --- inc/fields.php | 2 +- templates/entry_edit.tpl | 13 ++++++++++--- templates/entry_show.tpl | 6 +++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/inc/fields.php b/inc/fields.php index 25e0508..0c236be 100644 --- a/inc/fields.php +++ b/inc/fields.php @@ -38,7 +38,7 @@ $FIELDS = array( 'homephone' => 'homePhone', 'homestreet' => 'homePostalAddress', 'photo' => 'jpegPhoto', - 'url' => 'labeledURI', + '_url' => 'labeledURI', 'note' => 'description', 'manager' => 'manager', // aka. key account '_mail' => 'mail', diff --git a/templates/entry_edit.tpl b/templates/entry_edit.tpl index ddad5dc..b8f3ff8 100644 --- a/templates/entry_edit.tpl +++ b/templates/entry_edit.tpl @@ -216,13 +216,20 @@

{$lang.communication}

-{if $fields.url} +{if $fields._url} + {foreach from=$entry.url|smarty:nodefaults item=url} - {$lang.url}: - + {$lang.url} {counter}: + + + {/foreach} + + {$lang.url} {counter}: + {/if} {if $fields._mail} + {counter start=0} {foreach from=$entry.mail|smarty:nodefaults item=mail} {$lang.mail} {counter}: diff --git a/templates/entry_show.tpl b/templates/entry_show.tpl index b10b45f..4960893 100644 --- a/templates/entry_show.tpl +++ b/templates/entry_show.tpl @@ -141,7 +141,11 @@ {if $entry.url} {$lang.url}: - {$entry.url|http} + + {foreach from=$entry.url item=url} + {$url|http}
+ {/foreach} + {/if} {if $entry.mail} -- 2.39.5