summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
author"Lester Caine ext:(%22) <lester@lsces.co.uk>2011-07-04 12:29:43 +0100
committer"Lester Caine ext:(%22) <lester@lsces.co.uk>2011-07-04 12:29:43 +0100
commit0b7b69aab94fc768e31445e4d9ecfa423db840ad (patch)
treeadaed6a9aa8ce210847386dc8f50ced60b5d4873 /templates
parent6cd3b4a1f5d10e278b16f8e03f3a0546cd04bd2b (diff)
downloadcontact-0b7b69aab94fc768e31445e4d9ecfa423db840ad.tar.gz
contact-0b7b69aab94fc768e31445e4d9ecfa423db840ad.tar.bz2
contact-0b7b69aab94fc768e31445e4d9ecfa423db840ad.zip
Add direct link for creating new address entries
Diffstat (limited to 'templates')
-rw-r--r--templates/add_xref_address.tpl85
-rw-r--r--templates/display_contact.tpl7
2 files changed, 92 insertions, 0 deletions
diff --git a/templates/add_xref_address.tpl b/templates/add_xref_address.tpl
new file mode 100644
index 0000000..14818c0
--- /dev/null
+++ b/templates/add_xref_address.tpl
@@ -0,0 +1,85 @@
+{strip}
+<div class="floaticon">{bithelp}</div>
+<div class="edit contact_xref">
+ <div class="header">
+ <h1>{tr}Add Address Details{/tr}: {$title|escape}</h1>
+ </div>
+
+ {formfeedback hash=$feedback}
+ {formfeedback warning=`$errors.title`}
+
+ <div class="body">
+ {form enctype="multipart/form-data" id="writexref"}
+ <input type="hidden" name="content_id" value="{$xrefInfo.content_id}" />
+ <input type="hidden" name="xref_type" value="{$xrefInfo.xref_type}" />
+
+ {jstabs}
+ {jstab title="Address Details"}
+ {legend legend="Contents"}
+ <div class="row">
+ {formlabel label="Address Type" for="source"}
+ {forminput}
+ {html_options name="$xrefInfo.xref_type_list[$xrefInfo.source]" options=$xrefInfo.xref_type_list selected=`$xrefInfo.source`}
+ {formhelp note="Type of cross link reference to add."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="House Name/Number" for="xkey_ext"}
+ {forminput}
+ <input type="text" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" />
+ {formhelp note="House name and/or number when used with postcode, or free format full address."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Postcode" for="xkey"}
+ {forminput}
+ <input type="text" name="xkey" id="xkey" value="{$xrefInfo.xkey|escape}" />&nbsp;<input type="submit" name="fPostcode" value="{tr}Postcode Lookup{/tr}" />
+ {formhelp note="Postcode for address."}
+ {/forminput}
+ </div>
+
+ {formlabel label="`$xrefInfo.template_title` Notes" for="data"}
+ {capture assign=textarea_help}
+ {tr}Keep the text attached to reference items short and use comment records to add larger volumns of text. This should be reserved for simple notes such 'as use after 5PM' or the link.{/tr}
+ {/capture}
+ {textarea rows=5 noformat=1}{$xrefInfo.data}{/textarea}
+ {/legend}
+ {/jstab}
+
+ {jstab title="Time period"}
+ {legend legend="Start and Stop Dates"}
+ <div class="row">
+ <input type="hidden" name="startDateInput" value="1" />
+ &nbsp;Ignore Date <input type="checkbox" name="ignore_start_date" />
+ {formlabel label="Start Date" for=""}
+ {forminput}
+ {html_select_date prefix="start_" time=$xrefInfo.start_date start_year="-5" end_year="+10"} {tr}at{/tr}&nbsp;
+ <span dir="ltr">{html_select_time prefix="start_" time=$xrefInfo.start_date display_seconds=false}&nbsp;{$siteTimeZone}</span>
+ {formhelp note="This xref record becomes valid on this date."}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ <input type="hidden" name="endDateInput" value="1" />
+ &nbsp;Ignore Date <input type="checkbox" name="ignore_end_date" checked />
+ {formlabel label="End Date" for=""}
+ {forminput}
+ {html_select_date prefix="end_" time=$xrefInfo.end_date start_year="-5" end_year="+10"} {tr}at{/tr}&nbsp;
+ <span dir="ltr">{html_select_time prefix="end_" time=$xrefInfo.end_date display_seconds=false}&nbsp;{$siteTimeZone}</span>
+ {formhelp note="This xref record finishes on this date."}
+ {/forminput}
+ </div>
+ {/legend}
+ {/jstab}
+
+ <div class="row submit">
+ <input type="submit" name="fCancel" value="{tr}Cancel{/tr}" />&nbsp;
+ <input type="submit" name="fAddXref" value="{tr}Save{/tr}" />
+ </div>
+ {/jstabs}
+ {/form}
+ </div><!-- end .body -->
+</div><!-- end .article -->
+{/strip}
diff --git a/templates/display_contact.tpl b/templates/display_contact.tpl
index 2b70cfc..1c5dfbb 100644
--- a/templates/display_contact.tpl
+++ b/templates/display_contact.tpl
@@ -42,6 +42,13 @@
{/if}
{section name=address loop=$pageInfo.address}
{include file="bitpackage:contact/display_address.tpl" header=$pageInfo.address[address].source_title address=$pageInfo.address[address] locate=1}
+ {sectionelse}
+ <li class="item norecords">
+ {tr}No addresses found{/tr}
+ {if $gBitUser->hasPermission('p_edit_contact')}
+ {smartlink ititle="Add an address record" ifile="add_xref_address.php" ibiticon="icons/bookmark-new" content_id=$pageInfo.content_id}
+ {/if}
+ </li>
{/section}
<div class="row">