diff options
| author | Lester Caine <lsces@lsces.co.uk> | 2010-10-18 13:24:54 +0100 |
|---|---|---|
| committer | Lester Caine <lsces@lsces.co.uk> | 2010-10-18 13:24:54 +0100 |
| commit | 02ae040e029923d2283fcbb34c10ecc65e98bc4a (patch) | |
| tree | ac7bf4df915edbd1d4594add40f337c971dc50ef /templates | |
| parent | 4924349722bf63833f4898a9bc91ccb329f4a2e6 (diff) | |
| download | contact-02ae040e029923d2283fcbb34c10ecc65e98bc4a.tar.gz contact-02ae040e029923d2283fcbb34c10ecc65e98bc4a.tar.bz2 contact-02ae040e029923d2283fcbb34c10ecc65e98bc4a.zip | |
Major overhaul of contact. Main problem was moving from the older bw formats of working up to the latest standards. Using gContent and pageInfo hashes directly in templates. Other rebuilds have gone on.
This is still work in progress and a full user manual will be added.
Diffstat (limited to 'templates')
27 files changed, 759 insertions, 202 deletions
diff --git a/templates/add_xref.tpl b/templates/add_xref.tpl new file mode 100644 index 0000000..4aabc53 --- /dev/null +++ b/templates/add_xref.tpl @@ -0,0 +1,93 @@ +{strip} +<div class="floaticon">{bithelp}</div> +<div class="edit contact_xref"> + <div class="header"> + <h1>{tr}Add Contact Xref{/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="Reference Details"} + {legend legend="XRef Contents"} + <div class="row"> + {formlabel label="Cross Reference 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="Cross Reference Link" for="xref"} + {forminput} + <input type="text" name="xref" id="xref" value="{$xrefInfo.xref|escape}" /> + {formhelp note="Link to other contact/content entries."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Key" for="xkey"} + {forminput} + <input type="text" name="xkey" id="xkey" value="{$xrefInfo.xkey|escape}" /> + {formhelp note="ID Key use to access data in other systems identified by the xref type."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Text" for="xkey_ext"} + {forminput} + <input type="text" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" /> + {formhelp note="Variable text element such as url or email address."} + {/forminput} + </div> + + {formlabel label="Reference 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" /> + <input type="checkbox" name="ignore_start_date" {if $xrefInfo.ignore_start_date}checked{/if} /> + {formlabel label="Start Date" for=""} + {forminput} + {html_select_date prefix="start_" time=$xrefInfo.start_date start_year="-5" end_year="+10"} {tr}at{/tr} + <span dir="ltr">{html_select_time prefix="start_" time=$xrefInfo.start_date display_seconds=false} {$siteTimeZone}</span> + {formhelp note="This xref record becomes valid on this date."} + {/forminput} + </div> + + <div class="row"> + <input type="hidden" name="endDateInput" value="1" /> + <input type="checkbox" name="ignore_end_date" {if $xrefInfo.ignore_end_date}checked{/if} /> + {formlabel label="End Date" for=""} + {forminput} + {html_select_date prefix="end_" time=$xrefInfo.end_date start_year="-5" end_year="+10"} {tr}at{/tr} + <span dir="ltr">{html_select_time prefix="end_" time=$xrefInfo.end_date display_seconds=false} {$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}" /> + <input type="submit" name="fAddXref" value="{tr}Save{/tr}" /> + </div> + {/jstabs} + {/form} + </div><!-- end .body --> +</div><!-- end .article --> +{/strip} diff --git a/templates/admin_contact.tpl b/templates/admin_contact.tpl index 11f98b6..1babbec 100644 --- a/templates/admin_contact.tpl +++ b/templates/admin_contact.tpl @@ -16,5 +16,4 @@ <input type="submit" name="contactlistfeatures" value="{tr}Change preferences{/tr}" /> </div> {/form} - -{/strip} +{/strip}
\ No newline at end of file diff --git a/templates/comments.tpl b/templates/comments.tpl new file mode 100644 index 0000000..1e2fdef --- /dev/null +++ b/templates/comments.tpl @@ -0,0 +1,29 @@ +{if $gBitUser->hasPermission( 'p_liberty_post_comments' ) || $gBitUser->hasPermission( 'p_liberty_read_comments' ) } + {strip} + <div class="display comment"> + <div class="header"> + <h2>{tr}Notes{/tr}</h2> + </div> + + <div class="body"> + {include file="bitpackage:liberty/comments_display_option_bar.tpl"} + + {if $gBitUser->hasPermission( 'p_liberty_post_comments' )} + <div class="row"> + {form enctype="multipart/form-data" action="`$comments_return_url`#editcomments" id="editcomment-form"} + <input type="submit" name="post_comment_request" value="{tr}Add Note{/tr}" onclick="LibertyComment.attachForm('comment_{$gContent->mContentId}', '{$gContent->mContentId}', {if $gContent->mContentId}{$gContent->mContentId}{elseif $commentsParentId}{$commentsParentId}{else}null{/if})"/> + {/form} + </div> + {/if} + + <div id="comment_{$gContent->mContentId}"></div> + {foreach name=comments_loop key=key item=item from=$comments} + {displaycomment comment="$item"} + {/foreach} + <div id="comment_{$gContent->mContentId}_footer"></div> + + {libertypagination ihash=$commentsPgnHash} + </div><!-- end .body --> + </div><!-- end .comment --> + {/strip} +{/if} diff --git a/templates/comments_edit.tpl b/templates/comments_edit.tpl new file mode 100644 index 0000000..a6dc14f --- /dev/null +++ b/templates/comments_edit.tpl @@ -0,0 +1,11 @@ +{if $gBitUser->hasPermission( 'p_liberty_post_comments' ) } + {strip} + <div class="display comment"> + <div class="body"{if !( $post_comment_request || $post_comment_preview )} id="editcomments"{/if}> + <div id="edit_comments" {if $comments_ajax}style="display:none"{/if}> + {include file="bitpackage:contact/comments_post_inc.tpl" post_title="Post Note"} + </div> + </div><!-- end .body --> + </div><!-- end .comment --> + {/strip} +{/if} diff --git a/templates/comments_post_inc.tpl b/templates/comments_post_inc.tpl new file mode 100644 index 0000000..69de357 --- /dev/null +++ b/templates/comments_post_inc.tpl @@ -0,0 +1,87 @@ +{if !$hide || $post_comment_request || $smarty.request.post_comment_preview} + <a name="editcomments"></a> + + {if $post_comment_preview && !$preview_override} + <h2>{tr}{$post_title} Preview{/tr}</h2> + <div class="preview"> + {include file='bitpackage:liberty/display_comment.tpl' comment=$postComment} + </div><!-- end .preview --> + {/if} + + {form enctype="multipart/form-data" action="`$comments_return_url`#editcomments" id="editcomment-form"} + {formfeedback hash=$formfeedback} + + + {if $post_comment_request || $smarty.request.post_comment_preview || $comments_ajax} + {legend legend=$post_title} + <input type="hidden" name="post_comment_reply_id" value="{$post_comment_reply_id}" /> + <input type="hidden" name="post_comment_id" value="{$post_comment_id}" /> + <input type="hidden" name="comments_return_url" value="{$comments_return_url}" /> + + {* This is a little extra value for the funky case when bw learns browser has js at the same time a preview is asked for + This will keep comment in non-js mode until previewing is done. Things get messy without this *} + {if !$gBitThemes->isJavascriptEnabled() || $no_js_preview == "y"} + <input type="hidden" name="no_js_preview" value="y" /> + {/if} + + <div class="row"> + {formlabel label="Title" for="comments-title"} + {forminput} + <input type="text" size="50" name="comment_title" id="comments-title" value="{$postComment.title|escape:html}" /> + {formhelp note=""} + {/forminput} + </div> + + {if !$gBitUser->isRegistered()} + <div class="row" id="post-login"> + {formlabel label="Login" for="login-email"} + {forminput} + <div style="display:inline-block;padding-right:20px;"> + <input type="text" size="20" name="login_email" id="login-email" value="{$smarty.request.login_email|escape:html}" /> + <div class="label">{tr}Username or Email{/tr}</div> + </div> + <div style="display:inline-block"> + <input type="password" size="8" name="login_password" id="login-password" value="{$smarty.request.login_password|escape:html}" /> + <div class="label">{tr}Password{/tr}</div> + </div> + <div class="formhelp">{tr}If you are already registered with <strong>{$gBitSystem->mConfig.site_title|default:"this site"}</strong> please enter your login details above.{/tr}</div> + {/forminput} + </div> + <div class="row" style="display:none" id="post-anon"> + {formlabel label="Your Name" for="comments-name"} + {forminput} + <input type="text" size="50" name="comment_name" id="comments-name" value="{$postComment.anon_name|escape:html}" /> + {formhelp note=""} + {/forminput} + </div> + {captcha variant="row" id="post-captcha" style="display:none"} + <div class="row"> + {forminput} + <input type="checkbox" name="anon_post" id="anon-post" value="y" onchange="BitBase.toggleElementDisplay('post-login','block');BitBase.toggleElementDisplay('post-anon','block');BitBase.toggleElementDisplay('post-captcha','block');" /> {tr}Anonymous Post{/tr} + {formhelp note=""} + {/forminput} + </div> + {/if} + + {textarea id="commentpost" name="comment_data" rows=$gBitSystem->getConfig('comments_default_post_lines', 6)}{$postComment.data}{/textarea} + + {* @TODO perm check more accurately should be on root content object *} + {if $gBitSystem->isFeatureActive( 'comments_allow_attachments' ) && $gBitUser->hasPermission('p_liberty_attach_attachments') } + {* @TODO make edit_storage_list.tpl work with comments attachments - it is nested in edit_storage.tpl - for now bypass it, remove mime code when edit_storage.tpl can be used directly*} + {* include file="bitpackage:liberty/edit_storage.tpl" *} + {if $gLibertySystem->isPluginActive( $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER )} + {foreach from=$gLibertySystem->getAllMimeTemplates('upload') item=tpl} + {include file=$tpl} + {/foreach} + {/if} + {/if} + + <div class="row submit"> + <input type="submit" name="post_comment_preview" value="{tr}Preview{/tr}" {if $comments_ajax}onclick="LibertyComment.previewComment(); return false;"{/if}/> + <input type="submit" name="post_comment_submit" value="{tr}Post{/tr}" {if $comments_ajax}onclick="LibertyComment.postComment(); return false;"{/if}/> + <input type="submit" name="post_comment_cancel" value="{tr}Cancel{/tr}" {if $comments_ajax}onclick="LibertyComment.cancelComment(true); return false;"{/if}/> + </div> + {/legend} + {/if} + {/form} +{/if} diff --git a/templates/contact_action_bar.tpl b/templates/contact_action_bar.tpl index d5554a2..2e7a75d 100644 --- a/templates/contact_action_bar.tpl +++ b/templates/contact_action_bar.tpl @@ -1,7 +1,7 @@ <div class="navbar"> {if $show_page eq 'y'} - {if $gBitSystem->isFeatureActive('feature_sample_attachments')} - {if $gBitUser->hasPermission('bit_p_sample_view_attachments') or $gBitUser->hasPermission('bit_p_sample_admin_attachments') or $gBitUser->hasPermission('bit_p_sample_attach_files')} + {if $gBitSystem->isFeatureActive('contact_attachments')} + {if $gBitUser->hasPermission('p_contact_view_attachments') or $gBitUser->hasPermission('p_contact_admin_attachments') or $gBitUser->hasPermission('p_contact_attach_files')} <a href="javascript:document.location='#attachments';flip('attzone{if $atts_show eq 'y'}open{/if}');">{if $atts_count eq 0}{tr}attach file{/tr}{elseif $atts_count eq 1}{tr}1 attachment{/tr}{else}{$atts_count} {tr}attachments{/tr}{/if}</a> {else} {if $atts_count eq 1}{tr}1 attachment{/tr}{else}{$atts_count} {tr}attachments{/tr}{/if} @@ -10,7 +10,7 @@ {/if} </div> -{if $gBitSystem->isFeatureActive('feature_sample_comments')} +{if $gBitSystem->isFeatureActive('contact_comments')} <div class="navbar comment"> {if $comments_cant > 0} <a href="javascript:document.location='#comments';flip('comzone{if $comments_show eq 'y'}open{/if}');">{if $comments_cant eq 1}{tr}1 comment{/tr}{else}{$comments_cant} {tr}comments{/tr}{/if}</a> diff --git a/templates/contact_date_bar.tpl b/templates/contact_date_bar.tpl index 06b14a0..d7f1e17 100644 --- a/templates/contact_date_bar.tpl +++ b/templates/contact_date_bar.tpl @@ -5,15 +5,16 @@ {if $print_page ne 'y'} {if !$lock} {if $gBitUser->hasPermission('p_edit_contact')} - <a href="edit.php?content_id={$contactInfo.content_id}" {if $beingEdited eq 'y'}{popup_init src="`$gBitLoc.THEMES_PKG_URL`overlib.js"}{popup text="$semUser" width="-1"}{/if}>{biticon ipackage="icons" iname="accessories-text-editor" iexplain="edit"}</a> + {smartlink ititle="Add additional crossref record" ifile="add_xref.php" ibiticon="icons/bookmark-new" content_id=$pageInfo.content_id xref_type=-1} + {smartlink ititle="Edit Contact" ifile="edit.php" ibiticon="icons/accessories-text-editor" content_id=$pageInfo.content_id} {/if} {/if} - <a title="{tr}print{/tr}" href="print.php?content_id={$contactInfo.content_id}">{biticon ipackage="icons" iname="document-print" iexplain="print"}</a> + <a title="{tr}print{/tr}" href="print.php?content_id={$pageInfo.content_id}">{biticon ipackage="icons" iname="document-print" iexplain="print"}</a> {if $gBitUser->hasPermission('p_remove_contact')} - <a title="{tr}remove this contact{/tr}" href="remove_contact.php?content_id={$contactInfo.content_id}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a> + <a title="{tr}remove this contact{/tr}" href="remove_contact.php?content_id={$pageInfo.content_id}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a> {/if} {/if} {* end print_page *} </div> {*end .floaticon *} <div class="date"> - {tr}Created by{/tr} {displayname user=$contactInfo.creator_user user_id=$contactInfo.user_id real_name=$contactInfo.creator_real_name}, {tr}Last modification by{/tr} {displayname user=$contactInfo.modifier_user user_id=$contactInfo.modifier_user_id real_name=$contactInfo.modifier_real_name} on {$contactInfo.last_modified|bit_long_datetime} + {tr}Created by{/tr} {displayname user=$pageInfo.creator_user user_id=$pageInfo.user_id real_name=$pageInfo.creator_real_name}, {tr}Last modification by{/tr} {displayname user=$pageInfo.modifier_user user_id=$pageInfo.modifier_user_id real_name=$pageInfo.modifier_real_name} on {$pageInfo.last_modified|bit_long_datetime} </div> diff --git a/templates/contact_display.tpl b/templates/contact_display.tpl index 8fe5ab3..d1b612f 100644 --- a/templates/contact_display.tpl +++ b/templates/contact_display.tpl @@ -1,17 +1,17 @@ <div class="body"> <div class="content"> {include file="bitpackage:liberty/storage_thumbs.tpl"} - Title: {$contactInfo.prefix}<br /> - Forename: {$contactInfo.forename}<br /> - Surname: {$contactInfo.surname}<br /> - Suffix: {$contactInfo.suffix}<br /> + Title: {$pageInfo.prefix}<br /> + Forename: {$pageInfo.forename}<br /> + Surname: {$pageInfo.surname}<br /> + Suffix: {$pageInfo.suffix}<br /> <br /> - Organisation: {$contactInfo.organisation}<br /> + Organisation: {$pageInfo.organisation}<br /> <br /> - NI Number:{$contactInfo.nino} Date of Birth:{$contactInfo.dob} Date of eighteenth:{$contactInfo.eighteenth} Date of Death:{$contactInfo.dod} <br /> + NI Number:{$pageInfo.nino} Date of Birth:{$pageInfo.dob} Date of eighteenth:{$pageInfo.eighteenth} Date of Death:{$pageInfo.dod} <br /> <br /> - Note: {$contactInfo.note}<br /> + Note: {$pageInfo.note}<br /> Memo:<br /> - {$contactInfo.data}<br /> + {$pageInfo.data}<br /> </div><!-- end .content --> </div><!-- end .body --> diff --git a/templates/contact_header.tpl b/templates/contact_header.tpl index 2b35e6e..adbe577 100644 --- a/templates/contact_header.tpl +++ b/templates/contact_header.tpl @@ -5,14 +5,16 @@ </div> {* end category *} {/if} - <h1>{$contactInfo.content_id} - - {if isset($contactInfo.organisation) && ($contactInfo.organisation <> '') } - {$contactInfo.organisation} + <h1>{$pageInfo.content_id} - + {if isset($pageInfo.organisation) && ($pageInfo.organisation <> '') } + {$pageInfo.organisation} + {elseif isset($pageInfo.surname) && ($pageInfo.surname <> '') } + {$pageInfo.prefix} + {$pageInfo.forename} + {$pageInfo.surname} {else} - {$contactInfo.prefix} - {$contactInfo.forename} - {$contactInfo.surname} + {$pageInfo.title} {/if}</h1> - <div class="description">{$contactInfo.description}</div> + <div class="description">{$pageInfo.description}</div> </div> {* end .header *} diff --git a/templates/display_address.tpl b/templates/display_address.tpl index d6a1d58..a2a7620 100644 --- a/templates/display_address.tpl +++ b/templates/display_address.tpl @@ -1,32 +1,32 @@ <div class="row"> - {formlabel label="Address" for="lpi"} + {formlabel label="$header" for="lpi"} {forminput} - {if isset($contactInfo.sao) && ($contactInfo.sao <> '') } - {$contactInfo.sao}, {/if} - {if isset($contactInfo.pao) && ($contactInfo.pao <> '') } - {$contactInfo.pao},<br />{/if} - {if isset($contactInfo.number) && ($contactInfo.number <> '') } - {$contactInfo.number},<br />{/if} - {if isset($contactInfo.street) && ($contactInfo.street <> '') } - {$contactInfo.street},<br />{/if} - {if isset($contactInfo.locality) && ($contactInfo.locality <> '') } - {$contactInfo.locality}, {/if} - {if isset($contactInfo.town) && ($contactInfo.town <> '') } - {$contactInfo.town}, {/if} - {if isset($contactInfo.county) && ($contactInfo.county <> '') } - {$contactInfo.county}, {/if} - {$contactInfo.postcode} + {if isset($pageInfo.sao) && ($pageInfo.sao <> '') } + {$pageInfo.sao}, {/if} + {if isset($pageInfo.pao) && ($pageInfo.pao <> '') } + {$pageInfo.pao},<br />{/if} + {if isset($pageInfo.number) && ($pageInfo.number <> '') } + {$pageInfo.number},<br />{/if} + {if isset($pageInfo.street) && ($pageInfo.street <> '') } + {$pageInfo.street},<br />{/if} + {if isset($pageInfo.locality) && ($pageInfo.locality <> '') } + {$pageInfo.locality}, {/if} + {if isset($pageInfo.town) && ($pageInfo.town <> '') } + {$pageInfo.town}, {/if} + {if isset($pageInfo.county) && ($pageInfo.county <> '') } + {$pageInfo.county}, {/if} + {$pageInfo.postcode} {/forminput} </div> - {if isset($contactInfo.x_coordinate) && ($contactInfo.x_coordinate <> '') } + {if isset($pageInfo.x_coordinate) && ($pageInfo.x_coordinate <> '') } <div class="row"> {formlabel label="Visual Centre Coordinates" for="street_start_x"} {forminput} - Easting: {$contactInfo.x_coordinate|escape} Northing: {$contactInfo.y_coordinate|escape} - <<a href="http://www.multimap.com/maps/?map={$contactInfo.prop_lat},{$contactInfo.prop_lng}|17|4&loc=GB:{$contactInfo.prop_lat}:{$contactInfo.prop_lng}:17" title="{$contactInfo.title}"> + Easting: {$pageInfo.x_coordinate|escape} Northing: {$pageInfo.y_coordinate|escape} + <<a href="http://www.multimap.com/maps/?map={$pageInfo.prop_lat},{$pageInfo.prop_lng}|17|4&loc=GB:{$pageInfo.prop_lat}:{$pageInfo.prop_lng}:17" title="{$pageInfo.title}"> Multimap </a>><br /> - {$contactInfo.rpa|escape} + {$pageInfo.rpa|escape} {/forminput} </div> {/if} diff --git a/templates/display_contact.tpl b/templates/display_contact.tpl index b58327b..bd4f850 100644 --- a/templates/display_contact.tpl +++ b/templates/display_contact.tpl @@ -1,43 +1,53 @@ <div class="body"> <div class="content"> - {if isset($contactInfo.usn) && ($contactInfo.usn <> '') } + {include file="bitpackage:contact/display_type_header.tpl"} + + {if isset($pageInfo.usn) && ($pageInfo.usn <> '') } <div class="row"> {formlabel label="USN" for="usn"} {forminput} - {$contactInfo.usn|escape} + {$pageInfo.usn|escape} {/forminput} </div> {/if} - {if isset($contactInfo.organisation) && ($contactInfo.organisation <> '') } + {if isset($pageInfo.organisation) && ($pageInfo.organisation <> '') } <div class="row"> {formlabel label="Organisation" for="organisation"} {forminput} - {$contactInfo.organisation|escape} + {$pageInfo.organisation|escape} {/forminput} </div> {/if} - {if isset($contactInfo.dob) && ($contactInfo.dob <> '') } + {if isset($pageInfo.dob) && ($pageInfo.dob <> '') } <div class="row"> {formlabel label="Date of Birth" for="dob"} {forminput} - {$contactInfo.dob|bit_long_date} + {$pageInfo.dob|bit_long_date} {/forminput} </div> {/if} - {if isset($contactInfo.nino) && ($contactInfo.nino <> '') } + {if isset($pageInfo.nino) && ($pageInfo.nino <> '') } <div class="row"> {formlabel label="National Insurance Number" for="nino"} {forminput} - {$contactInfo.nino|escape} + {$pageInfo.nino|escape} {/forminput} </div> {/if} - {include file="bitpackage:contact/display_address.tpl"} + {include file="bitpackage:contact/display_address.tpl" header="Contact Address"} + + <div class="row"> + {formlabel label="General Notes" for="data"} + {forminput} + {$pageInfo.data} + {/forminput} + </div> + {jstabs} - {include file="bitpackage:contact/list_xref.tpl"} - {include file="bitpackage:contact/list_ticket.tpl"} - {include file="bitpackage:contact/list_appoint.tpl"} + {section name=type loop=$pageInfo.type} + {include file="bitpackage:contact/list_xref_generic.tpl" source=$pageInfo.type[type].source source_title=$pageInfo.type[type].title} + {/section} {/jstabs} </div><!-- end .content --> </div><!-- end .body --> diff --git a/templates/display_type_header.tpl b/templates/display_type_header.tpl new file mode 100644 index 0000000..0fd6285 --- /dev/null +++ b/templates/display_type_header.tpl @@ -0,0 +1,9 @@ +<div class="row"> + {formlabel label="Content Types" for=content_types} + {forminput} + {foreach from=$pageInfo.contact_types key=type_id item=type} + {if isset($type.content_id) }{$type.cross_ref_title}<br/> {/if} + {/foreach} + {/forminput} +</div> + diff --git a/templates/edit.tpl b/templates/edit.tpl index 43e95dd..c0fb5e7 100644 --- a/templates/edit.tpl +++ b/templates/edit.tpl @@ -7,9 +7,9 @@ <div class="header"> <h1> {* this weird dual assign thing is cause smarty wont interpret backticks to object in assign tag - spiderr *} - {if $contactInfo.content_id} + {if $pageInfo.content_id} {assign var=editLabel value="{tr}Edit{/tr} $conDescr"} - {tr}{tr}Edit{/tr} {$contactInfo.title}{/tr} + {tr}{tr}Edit{/tr} {$pageInfo.title}{/tr} {else} {assign var=editLabel value="{tr}Create{/tr} $conDescr"} {tr}{$editLabel}{/tr} @@ -33,88 +33,85 @@ {jstabs} {jstab title="$editLabel Body"} {legend legend="`$editLabel` Details"} - <input type="hidden" name="content_id" value="{$contactInfo.content_id}" /> + <input type="hidden" name="content_id" value="{$pageInfo.content_id}" /> <div class="row"> {formfeedback warning=`$errors.names`} {formfeedback warning=`$errors.store`} {formlabel label="$conDescr Contact" for="contentno"} - {if !$contactInfo.contact_id} + {if !$pageInfo.contact_id} {forminput} New Contact Entry {/forminput} {else} {forminput} - Edit Contact Entry No : {$contactInfo.contact_id} + Edit Contact Entry No : {$pageInfo.contact_id} {/forminput} {/if} + </div> - {formlabel label="Contact Type" for="contact_type"} - {forminput} - {html_options name="$contactInfo.contact_type_list[$contactInfo.contact_type]" options=$contactInfo.contact_type_list selected=`$contactInfo.contact_type`} - {formhelp note="Users of only this group can view the content of this category."} - {/forminput} + {include file="bitpackage:contact/edit_type_header.tpl"} - </div> - <div class="row"> +{* <div class="row"> {formlabel label="Title" for="prefix"} {forminput} - <input size="60" type="text" name="prefix" id="prefix" value="{$contactInfo.prefix|escape}" /> + <input size="60" type="text" name="prefix" id="prefix" value="{$pageInfo.prefix|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Forename" for="forename"} {forminput} - <input size="60" type="text" name="forename" id="forename" value="{$contactInfo.forename|escape}" /> + <input size="60" type="text" name="forename" id="forename" value="{$pageInfo.forename|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Surname" for="surname"} {forminput} - <input size="60" type="text" name="surname" id="surname" value="{$contactInfo.surname|escape}" /> + <input size="60" type="text" name="surname" id="surname" value="{$pageInfo.surname|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Suffix" for="suffix"} {forminput} - <input size="60" type="text" name="suffix" id="suffix" value="{$contactInfo.suffix|escape}" /> + <input size="60" type="text" name="suffix" id="suffix" value="{$pageInfo.suffix|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Organisation" for="organisation"} {forminput} - <input size="60" type="text" name="organisation" id="organisation" value="{$contactInfo.organisation|escape}" /> + <input size="60" type="text" name="organisation" id="organisation" value="{$pageInfo.organisation|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="NI Number" for="nino"} {forminput} - <input size="10" type="text" name="nino" id="nino" value="{$contactInfo.nino|escape}" /> + <input size="10" type="text" name="nino" id="nino" value="{$pageInfo.nino|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Date of Birth" for="dob"} {forminput} - <input size="10" type="text" name="dob" id="dob" value="{$contactInfo.dob|escape}" /> + <input size="10" type="text" name="dob" id="dob" value="{$pageInfo.dob|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Date of eighteen" for="eighteenth"} {forminput} - <input size="10" type="text" name="eighteenth" id="eighteenth" value="{$contactInfo.eighteenth|escape}" /> + <input size="10" type="text" name="eighteenth" id="eighteenth" value="{$pageInfo.eighteenth|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Date of Death" for="dod"} {forminput} - <input size="10" type="text" name="dod" id="dod" value="{$contactInfo.dod|escape}" /> + <input size="10" type="text" name="dod" id="dod" value="{$pageInfo.dod|escape}" /> {/forminput} </div> +*} <div class="row"> {formlabel label="Note" for="description"} {forminput} - <input size="60" type="text" name="description" id="description" value="{$contactInfo.description|escape}" /> + <input size="60" type="text" name="description" id="description" value="{$pageInfo.description|escape}" /> {/forminput} </div> {/legend} @@ -127,16 +124,14 @@ {jstab title="Contact Notes"} {legend legend="Notes Body"} <div class="row"> - {forminput} - <textarea id="{$textarea_id}" name="edit" rows="{$rows|default:20}" cols="{$cols|default:80}">{$contactInfo.data|escape:html}</textarea> - {/forminput} + {textarea rows=30 noformat=1}{$pageInfo.edit}{/textarea} </div> {if $page ne 'SandBox'} <div class="row"> {formlabel label="Comment" for="comment"} {forminput} - <input size="50" type="text" name="comment" id="comment" value="{$contactInfo.comment}" /> + <input size="50" type="text" name="comment" id="comment" value="{$pageInfo.comment}" /> {formhelp note="Add a comment to illustrate your most recent changes."} {/forminput} </div> @@ -151,11 +146,11 @@ {include file=$serviceEditTpls.categorization} {/legend} {/if} + {include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_mini_tpl"} + {/jstab} {/jstabs} - {include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_mini_tpl"} - <div class="row submit"> <input type="submit" name="fCancel" value="{tr}Cancel{/tr}" /> <input type="submit" name="fSaveContact" value="{tr}Save{/tr}" /> @@ -165,4 +160,4 @@ </div><!-- end .body --> </div><!-- end .admin --> -{/strip} +{/strip}
\ No newline at end of file diff --git a/templates/edit_contact.tpl b/templates/edit_contact.tpl index d159c2b..0a83405 100644 --- a/templates/edit_contact.tpl +++ b/templates/edit_contact.tpl @@ -17,14 +17,14 @@ {if $preview} <h2>Preview - {$pageInfo.title}</h2> <div class="preview"> - {include file="bitpackage:contact/contact_display.tpl" page=`$contactInfo.content_id`} + {include file="bitpackage:contact/contact_display.tpl" page=`$pageInfo.content_id`} </div> {/if} <div class="header"> <h1> - {if $contactInfo.content_id} - {tr}{tr}Edit - {/tr} {$contactInfo.title}{/tr} + {if $pageInfo.content_id} + {tr}{tr}Edit - {/tr} {$pageInfo.title}{/tr} {else} {tr}Create New Record{/tr} {/if} @@ -33,57 +33,59 @@ <div class="body"> {form legend="Edit/Create Contact Record" enctype="multipart/form-data" id="editpageform"} - <input type="hidden" name="content_id" value="{$contactInfo.content_id}" /> + <input type="hidden" name="content_id" value="{$pageInfo.content_id}" /> - <div class="row"> + {include file="bitpackage:contact/edit_type_header.tpl"} + +{* <div class="row"> {formlabel label="Title" for="title"} {forminput} - <input size="60" type="text" name="prefix" id="prefix" value="{$contactInfo.prefix|escape}" /> + <input size="60" type="text" name="prefix" id="prefix" value="{$pageInfo.prefix|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Forename" for="forename"} {forminput} - <input size="60" type="text" name="forename" id="forename" value="{$contactInfo.forename|escape}" /> + <input size="60" type="text" name="forename" id="forename" value="{$pageInfo.forename|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Surname" for="surname"} {forminput} - <input size="60" type="text" name="surname" id="surname" value="{$contactInfo.surname|escape}" /> + <input size="60" type="text" name="surname" id="surname" value="{$pageInfo.surname|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Suffix" for="suffix"} {forminput} - <input size="60" type="text" name="suffix" id="suffix" value="{$contactInfo.suffix|escape}" /> + <input size="60" type="text" name="suffix" id="suffix" value="{$pageInfo.suffix|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="Organisation" for="organisation"} {forminput} - <input size="60" type="text" name="organisation" id="organisation" value="{$contactInfo.organisation|escape}" /> + <input size="60" type="text" name="organisation" id="organisation" value="{$pageInfo.organisation|escape}" /> {/forminput} </div> <div class="row"> {formlabel label="NI Number" for="nino"} {forminput} - <input size="10" type="text" name="nino" id="nino" value="{$contactInfo.nino|escape}" /> + <input size="10" type="text" name="nino" id="nino" value="{$pageInfo.nino|escape}" /> {/forminput} </div> +*} <div class="row"> {formlabel label="Note" for="description"} {forminput} - <input size="60" type="text" name="description" id="description" value="{$contactInfo.description|escape}" /> + <input size="60" type="text" name="description" id="description" value="{$pageInfo.description|escape}" /> {/forminput} </div> - <div class="row"> {formlabel label="Memo" for="$textarea_id"} {forminput} <input type="hidden" name="rows" value="{$rows}" /> <input type="hidden" name="cols" value="{$cols}" /> - <textarea id="{$textarea_id}" name="edit" rows="{$rows|default:20}" cols="{$cols|default:80}">{if !$preview}{$contactInfo.data|escape}{else}{$edit}{/if}</textarea> + <textarea id="{$textarea_id}" name="edit" rows="{$rows|default:20}" cols="{$cols|default:80}">{if !$preview}{$pageInfo.data|escape}{else}{$edit}{/if}</textarea> {/forminput} </div> diff --git a/templates/edit_type_header.tpl b/templates/edit_type_header.tpl new file mode 100644 index 0000000..dd526b5 --- /dev/null +++ b/templates/edit_type_header.tpl @@ -0,0 +1,10 @@ +<div class="row"> + {formlabel label="Content Types" for=content_types} + {forminput} + {foreach from=$pageInfo.contact_types key=type_id item=type} + <input type="checkbox" name="contact_types[{$type_id}]" value={$type.source} {if isset($type.content_id) } checked="checked"{/if} /> {$type.cross_ref_title}<br/> + {/foreach} + {/forminput} + {formhelp note=""} +</div> + diff --git a/templates/edit_xref.tpl b/templates/edit_xref.tpl new file mode 100644 index 0000000..7a9bd16 --- /dev/null +++ b/templates/edit_xref.tpl @@ -0,0 +1,85 @@ +{strip} +<div class="floaticon">{bithelp}</div> +<div class="edit contact_xref"> + <div class="header"> + <h1>{tr}Edit Contact Xref{/tr}: {$title|escape}-{$xref_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_id" value="{$xrefInfo.xref_id}" /> + + {jstabs} + {jstab title="Reference Details"} + {legend legend="XRef Contents"} + <div class="row"> + {formlabel label="Cross Reference Link" for="xref"} + {forminput} + <input type="text" name="xref" id="xref" value="{$xrefInfo.xref|escape}" /> + {formhelp note="Link to other contact/content entries."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Key" for="xkey"} + {forminput} + <input type="text" name="xkey" id="xkey" value="{$xrefInfo.xkey|escape}" /> + {formhelp note="ID Key use to access data in other systems identified by the xref type."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Text" for="xkey_ext"} + {forminput} + <input type="text" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" /> + {formhelp note="Variable text element such as url or email address."} + {/forminput} + </div> + + {formlabel label="Reference 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" /> + <input type="checkbox" name="ignore_start_date" {if $xrefInfo.ignore_start_date eq "y"}checked{/if} /> + {formlabel label="Start Date" for=""} + {forminput} + {html_select_date prefix="start_" time=$xrefInfo.start_date start_year="-5" end_year="+10"} {tr}at{/tr} + <span dir="ltr">{html_select_time prefix="start_" time=$xrefInfo.start_date display_seconds=false} {$siteTimeZone}</span> + {formhelp note="This xref record becomes valid on this date."} + {/forminput} + </div> + + <div class="row"> + <input type="hidden" name="endDateInput" value="1" /> + <input type="checkbox" name="ignore_end_date" {if $xrefInfo.ignore_end_date eq "y"}checked{/if} /> + {formlabel label="End Date" for=""} + {forminput} + {html_select_date prefix="end_" time=$xrefInfo.end_date start_year="-5" end_year="+10"} {tr}at{/tr} + <span dir="ltr">{html_select_time prefix="end_" time=$xrefInfo.end_date display_seconds=false} {$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}" /> + <input type="submit" name="fSaveXref" value="{tr}Save{/tr}" /> + </div> + {/jstabs} + {/form} + </div><!-- end .body --> +</div><!-- end .article --> +{/strip} diff --git a/templates/edit_xref_type.tpl b/templates/edit_xref_type.tpl new file mode 100644 index 0000000..4e481ae --- /dev/null +++ b/templates/edit_xref_type.tpl @@ -0,0 +1,60 @@ +{* $Header$ *} + +{strip} +<div class="floaticon">{bithelp}</div> + +<div class="admin articles"> + <div class="header"> + <h1>{tr}Admin Xref Type List{/tr}</h1> + </div> + + <div class="body"> + {form legend="Edit an Xref Type" enctype="multipart/form-data"} + <input type="hidden" name="topic_id" value="{$gContent->mTopicId}" /> + + {formfeedback success=$gContent->mSuccess error=$gContent->mErrors} + + <div class="row"> + {formlabel label="Topic Name" for="topic_name"} + {forminput} + <input type="text" id="topic_name" name="topic_name" value="{$gContent->mInfo.topic_name}" /> + {formhelp note=""} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Topic Enabled" for="topic_enabled"} + {forminput} + <input type="checkbox" id="topic_enabled" name="active_topic" {if $gContent->mInfo.active_topic == 'y'}checked="checked"{/if} /> + {formhelp note=""} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Upload Image" for="t-image"} + {forminput} + <input name="upload" id="t-image" type="file" /> + {formhelp note=""} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Current Image"} + {forminput} + {if $gContent->mInfo.has_topic_image eq 'y'} + <img src="{$gContent->mInfo.topic_image_url}" /> <br/> + <a href="{$smarty.server.PHP_SELF}?topic_id={$gContent->mTopicId}&fRemoveTopicImage=1">Remove Topic Image</a> + {else} + {tr}No Image found{/tr} + {/if} + {formhelp note=""} + {/forminput} + </div> + + <div class="row submit"> + <input type="submit" name="fSubmitSaveTopic" value="{tr}Update Topic{/tr}" /> + </div> + {/form} + </div><!-- end .body --> +</div><!-- end .admin --> +{/strip} diff --git a/templates/list.tpl b/templates/list.tpl index 3a0b23e..fc42052 100644 --- a/templates/list.tpl +++ b/templates/list.tpl @@ -29,36 +29,44 @@ <li class="item {cycle values='odd,even'}"> <a href="display_contact.php?content_id={$listcontacts[content].content_id}" title="ci_{$listcontacts[content].content_id}"> {$listcontacts[content].content_id} - - {$listcontacts[content].prefix} - {$listcontacts[content].forename} - {$listcontacts[content].surname} + {if isset($listcontacts[content].surname) && ($listcontacts[content].surname <> '') } + {$listcontacts[content].prefix} + {$listcontacts[content].forename} + {$listcontacts[content].surname} + {else} + {$listcontacts[content].title} + {/if} </a> {if isset($listcontacts[content].organisation) && ($listcontacts[content].organisation <> '') }Company: {$listcontacts[content].organisation} {/if} {if isset($listcontacts[content].dob) && ($listcontacts[content].dob <> '') }DOB: {$listcontacts[content].dob} {/if} {if isset($listcontacts[content].nino) && ($listcontacts[content].nino <> '') }NI: {$listcontacts[content].nino} {/if} + {if $gBitSystem->isFeatureActive( 'contact_list_last_modified' ) }Edited: {$listcontacts[content].last_modified|bit_short_date} {/if} <div class="footer"> {if isset($listcontacts[content].uprn) && ($listcontacts[content].uprn <> '') }UPRN: {$listcontacts[content].uprn} {/if} - {tr}Address{/tr}: - {if isset($listcontacts[content].sao) && ($listcontacts[content].sao <> '') } - {$listcontacts[content].sao}, {/if} - {if isset($listcontacts[content].pao) && ($listcontacts[content].pao <> '') } - {$listcontacts[content].pao}, {/if} - {if isset($listcontacts[content].number) && ($listcontacts[content].number <> '') } - {$listcontacts[content].number}, {/if} - {if isset($listcontacts[content].street) && ($listcontacts[content].street <> '') } - {$listcontacts[content].street}, {/if} - {if isset($listcontacts[content].locality) && ($listcontacts[content].locality <> '') } - {$listcontacts[content].locality}, {/if} - {if isset($listcontacts[content].town) && ($listcontacts[content].town <> '') } - {$listcontacts[content].town}, {/if} - {if isset($listcontacts[content].county) && ($listcontacts[content].county <> '') } - {$listcontacts[content].county}, {/if} - {$listcontacts[content].postcode} - {tr}Links{/tr}: {$listcontacts[content].links|default:0} - {tr}Enquiries{/tr}: {$listcontacts[content].enquiries|default:0} + {if isset($listcontacts[content].postcode) && ($listcontacts[content].postcode <> '') } + {tr}Address{/tr} - + {if isset($listcontacts[content].sao) && ($listcontacts[content].sao <> '') } + {$listcontacts[content].sao}, {/if} + {if isset($listcontacts[content].pao) && ($listcontacts[content].pao <> '') } + {$listcontacts[content].pao}, {/if} + {if isset($listcontacts[content].number) && ($listcontacts[content].number <> '') } + {$listcontacts[content].number}, {/if} + {if isset($listcontacts[content].street) && ($listcontacts[content].street <> '') } + {$listcontacts[content].street}, {/if} + {if isset($listcontacts[content].locality) && ($listcontacts[content].locality <> '') } + {$listcontacts[content].locality}, {/if} + {if isset($listcontacts[content].town) && ($listcontacts[content].town <> '') } + {$listcontacts[content].town}, {/if} + {if isset($listcontacts[content].county) && ($listcontacts[content].county <> '') } + {$listcontacts[content].county}, {/if} + {$listcontacts[content].postcode} + {/if} + <br /> + {tr}Refs{/tr}: {$listcontacts[content].refs|default:0} + {tr}Tasks{/tr}: {$listcontacts[content].tasks|default:0} + {tr}Addresses{/tr}: {$listcontacts[content].addresses|default:0} </div> - <div class="clear"></div> </li> {sectionelse} diff --git a/templates/list_appoint.tpl b/templates/list_appoint.tpl deleted file mode 100644 index 8f4b3d0..0000000 --- a/templates/list_appoint.tpl +++ /dev/null @@ -1,48 +0,0 @@ - - - {assign var=ticketscnt value=$contactInfo.tickets|@count} - {jstab title="Appointments ($ticketscnt)"} - {legend legend="Appointments"} - <div class="row"> - {formlabel label="Tickets" for="ticket"} - {forminput} - <table> - <caption>{tr}List of appointments{/tr}</caption> - <thead> - <tr> - <th>Data</th> - <th>TAG</th> - <th>Note</th> - </tr> - </thead> - <tbody> - {section name=ticket loop=$contactInfo.tickets} - <tr class="{cycle values="even,odd"}" title="{$contactInfo.ticket[ticket].title|escape}"> - <td> - {$contactInfo.tickets[ticket].ticket_ref|bit_long_date} - {$contactInfo.tickets[ticket].ticket_no} - </td> - <td> - {$contactInfo.tickets[ticket].tags|escape} - </td> - <td> - <span class="actionicon"> - {smartlink ititle="View" ifile="view_ticket.php" ibiticon="icons/accessories-text-editor" ticket_id=$contactInfo.tickets[ticket].ticket_id} - </span> - <label for="ev_{$contactInfo.tickets[ticket].ticket_no}"> - {$contactInfo.tickets[ticket].staff_id} - </label> - </td> - </tr> - {sectionelse} - <tr class="norecords"> - <td colspan="3"> - {tr}No records found{/tr} - </td> - </tr> - {/section} - </tbody> - </table> - {/forminput} - </div> - {/legend} - {/jstab} diff --git a/templates/list_contact_type.tpl b/templates/list_contact_type.tpl new file mode 100644 index 0000000..94e6b44 --- /dev/null +++ b/templates/list_contact_type.tpl @@ -0,0 +1,28 @@ +{if isset( $pageInfo.xref_type ) } + <div class="row"> + <table> + <thead> + <tr> + <th>Contact Type</th> + <th>Updated</th> + <th> :</th> + </tr> + </thead> + <tbody> + {section name=xref loop=$pageInfo.xref_type} + <tr class="{cycle values="even,odd"}" title="{$list[county].title|escape}"> + <td> + {$pageInfo.xref0[xref].source_title|escape} + </td> + <td>
+ {$pageInfo.xref0[xref].last_update_date|bit_short_date}
+ </td>
+ <td> + {smartlink ititle="Add additional contact types" ifile="add_xref.php" ibiticon="icons/bookmark-new" content_id=$pageInfo.content_id} + </td> + </tr> + {/section} + </tbody> + </table> + </div> +{/if}
\ No newline at end of file diff --git a/templates/list_ticket.tpl b/templates/list_ticket.tpl index b800875..6cd84df 100644 --- a/templates/list_ticket.tpl +++ b/templates/list_ticket.tpl @@ -1,6 +1,6 @@ - {assign var=ticketscnt value=$contactInfo.tickets|@count} + {assign var=ticketscnt value=$pageInfo.tickets|@count} {jstab title="Ticket History ($ticketscnt)"} {legend legend="Ticket History"} <div class="row"> @@ -16,20 +16,20 @@ </tr> </thead> <tbody> - {section name=ticket loop=$contactInfo.tickets} - <tr class="{cycle values="even,odd"}" title="{$contactInfo.ticket[ticket].title|escape}"> + {section name=ticket loop=$pageInfo.tickets} + <tr class="{cycle values="even,odd"}" title="{$pageInfo.ticket[ticket].title|escape}"> <td> - {$contactInfo.tickets[ticket].ticket_ref|bit_long_date} - {$contactInfo.tickets[ticket].ticket_no} + {$pageInfo.tickets[ticket].ticket_ref|bit_long_date} - {$pageInfo.tickets[ticket].ticket_no} </td> <td> - {$contactInfo.tickets[ticket].tags|escape} + {$pageInfo.tickets[ticket].tags|escape} </td> <td> <span class="actionicon"> - {smartlink ititle="View" ifile="view_ticket.php" ibiticon="icons/accessories-text-editor" ticket_id=$contactInfo.tickets[ticket].ticket_id} + {smartlink ititle="View" ifile="view_ticket.php" ibiticon="icons/accessories-text-editor" ticket_id=$pageInfo.tickets[ticket].ticket_id} </span> - <label for="ev_{$contactInfo.tickets[ticket].ticket_no}"> - {$contactInfo.tickets[ticket].staff_id} + <label for="ev_{$pageInfo.tickets[ticket].ticket_no}"> + {$pageInfo.tickets[ticket].staff_id} </label> </td> </tr> diff --git a/templates/list_xref.tpl b/templates/list_xref.tpl index 77a0be1..4ea4e43 100644 --- a/templates/list_xref.tpl +++ b/templates/list_xref.tpl @@ -1,5 +1,5 @@ - {assign var=xrefcnt value=$contactInfo.xref|@count} + {assign var=xrefcnt value=$pageInfo.xref|@count} {jstab title="Cross reference ($xrefcnt)"} {legend legend="Information References"} <div class="row"> @@ -12,37 +12,41 @@ <th>Information</th> <th>Data</th> <th>Property</th> - <th>Updated</th> + {if $gBitSystem->isFeatureActive( 'contact_list_last_modified' )} + <th>Updated</th> + {/if} <th>Reference</th> </tr> </thead> <tbody> - {section name=xref loop=$contactInfo.xref} + {section name=xref loop=$pageInfo.xref} <tr class="{cycle values="even,odd"}" title="{$list[county].title|escape}"> <td> - {$contactInfo.xref[xref].source_title|escape} + {$pageInfo.xref[xref].source_title|escape} </td> <td> - {$contactInfo.xref[xref].data|escape} + {$pageInfo.xref[xref].data|escape} </td> <td> - {if isset($contactInfo.xref[xref].usn) && ($contactInfo.xref[xref].usn <> '') } - {$contactInfo.xref[xref].usn|escape} - {smartlink ititle="Link to" ifile="../property/display_property.php" ibiticon="icons/accessories-text-editor" property_id=$contactInfo.xref[xref].usn} + {if isset($pageInfo.xref[xref].usn) && ($pageInfo.xref[xref].usn <> '') } + {$pageInfo.xref[xref].usn|escape} + {smartlink ititle="Link to" ifile="../property/display_property.php" ibiticon="icons/accessories-text-editor" property_id=$pageInfo.xref[xref].usn} {/if} </td> - <td>
- {$contactInfo.xref[xref].last_update_date|bit_long_date}
- </td>
+ {if $gBitSystem->isFeatureActive( 'contact_list_last_modified' )} + <td>
+ {$pageInfo.xref[xref].last_update_date|bit_long_date}
+ </td>
+ {/if} <td> <span class="actionicon"> - {smartlink ititle="View" ifile="view_xref.php" ibiticon="icons/view-fullscreen" source=$contactInfo.xref[xref].source xref=$contactInfo.xref[xref].cross_reference} + {smartlink ititle="View" ifile="view_xref.php" ibiticon="icons/view-fullscreen" source=$pageInfo.xref[xref].source xref=$pageInfo.xref[xref].cross_reference} </span> <span class="actionicon"> - {smartlink ititle="Edit" ifile="edit_xref.php" ibiticon="icons/accessories-text-editor" source=$contactInfo.xref[xref].source xref=$contactInfo.xref[xref].cross_reference} + {smartlink ititle="Edit" ifile="edit_xref.php" ibiticon="icons/accessories-text-editor" source=$pageInfo.xref[xref].source xref=$pageInfo.xref[xref].cross_reference} </span> - <label for="ev_{$contactInfo.xref[xref].cross_reference}"> - {$contactInfo.xref[xref].cross_reference} + <label for="ev_{$pageInfo.xref[xref].cross_reference}"> + {$pageInfo.xref[xref].cross_reference} </label> </td> </tr> diff --git a/templates/list_xref_generic.tpl b/templates/list_xref_generic.tpl new file mode 100644 index 0000000..c4c7fbe --- /dev/null +++ b/templates/list_xref_generic.tpl @@ -0,0 +1,73 @@ +{* if isset( $pageInfo.$source ) *} + {assign var=xrefcnt value=$pageInfo.$source|@count} + {jstab title="$source_title ($xrefcnt)"} + {legend legend=$source_title} + <div class="row"> + <table> + <thead> + <tr> + <th>ID</th> + <th>Link</th> + <th>Data</th> + <th>Note</th> + {if $gBitSystem->isFeatureActive( 'contact_list_last_modified' )} + <th>Updated</th> + {/if} + <th>Edit</th> + </tr> + </thead> + <tbody> + {section name=xref loop=$pageInfo.$source} + <tr class="{cycle values="even,odd"}" title="{$pageInfo.title|escape}"> + <td> + {$pageInfo.$source[xref].source_title|escape} + </td> + <td> + {if isset($pageInfo.$source[xref].xref) && ($pageInfo.$source[xref].xref <> '') } + {$pageInfo.$source[xref].xref|escape} + {smartlink ititle="Link to" ifile="display_contact.php" ibiticon="icons/accessories-text-editor" content_id=$pageInfo.$source[xref].xref} + {else} + ------ + {/if} + </td> + <td> + {$pageInfo.$source[xref].xkey|escape} {$pageInfo.$source[xref].xkey_ext|escape} + </td> + <td> + {$pageInfo.$source[xref].data|escape} + </td> + {if $gBitSystem->isFeatureActive( 'contact_list_last_modified' )} + <td> + {$pageInfo.xref[xref].last_update_date|bit_long_date} + </td> + {/if} + <td> + <span class="actionicon"> + {if $gBitUser->hasPermission( 'p_contact_view_detail' )} + {smartlink ititle="View" ifile="view_xref.php" ibiticon="icons/view-fullscreen" xref_id=$pageInfo.$source[xref].xref_id} + {/if} + {if $gBitUser->hasPermission( 'p_contact_update' )} + {smartlink ititle="Edit" ifile="edit_xref.php" ibiticon="icons/accessories-text-editor" xref_id=$pageInfo.$source[xref].xref_id} + {/if} + {if $gBitUser->hasPermission( 'p_contact_expunge' )} + {smartlink ititle="Delete" ifile="edit_xref.php" ibiticon="icons/edit-delete" xref_id=$pageInfo.$source[xref].xref_id expunge=1} + {/if} + </span> + </td> + </tr> + {sectionelse} + <tr class="norecords"> + <td colspan="3"> + {tr}No {$source} records found{/tr} + </td> + </tr> + {/section} + </tbody> + </table> + </div> + <div> + {smartlink ititle="Add additional detail record" ifile="add_xref.php" ibiticon="icons/bookmark-new" content_id=$pageInfo.content_id xref_type=1} + </div> + {/legend} + {/jstab} +{* /if *}
\ No newline at end of file diff --git a/templates/menu_contact_admin.tpl b/templates/menu_contact_admin.tpl index a7ab2da..dc941f0 100644 --- a/templates/menu_contact_admin.tpl +++ b/templates/menu_contact_admin.tpl @@ -1,5 +1,7 @@ {strip} <ul> <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=contact">{tr}Contact Manager List Settings{/tr}</a></li> + <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=contacttype">{tr}Contact Type List{/tr}</a></li> + <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=contactxref">{tr}Contact Xref List{/tr}</a></li> </ul> {/strip} diff --git a/templates/page_display.tpl b/templates/page_display.tpl index fd860d9..572332f 100644 --- a/templates/page_display.tpl +++ b/templates/page_display.tpl @@ -1,25 +1,25 @@ {strip} -<div class="body"{if $users_double_click eq 'y' and $dblclickedit eq 'y' and $gBitUser->hasPermission( 'bit_p_edit' )} ondblclick="location.href='{$smarty.const.CONTACT_PKG_URL}edit.php?content_id={$contentInfo.content_id}';"{/if}> +<div class="body"{if $users_double_click eq 'y' and $dblclickedit eq 'y' and $gBitUser->hasPermission( 'bit_p_edit' )} ondblclick="location.href='{$smarty.const.CONTACT_PKG_URL}edit.php?content_id={$pageInfo.content_id}';"{/if}> <div class="header"> - {tr}<h1>Project-{$contentInfo.project_name}{/tr}{tr} Version-{$contentInfo.revision}</h1>{/tr} + {tr}<h1>Project-{$pageInfo.project_name}{/tr}{tr} Version-{$pageInfo.revision}</h1>{/tr} </div> - {if $contentInfo.status=='C' } + {if $pageInfo.status=='C' } <div class="date"> - {tr}Closed by {displayname user=$contentInfo.closed_user user_id=$contentInfo.closed_user_id real_name=$contentInfo.closed_real_name} on {$contentInfo.closed|bit_short_datetime}{/tr} + {tr}Closed by {displayname user=$pageInfo.closed_user user_id=$pageInfo.closed_user_id real_name=$pageInfo.closed_real_name} on {$pageInfo.closed|bit_short_datetime}{/tr} </div> {/if} - {if $contentInfo.status=='O' } + {if $pageInfo.status=='O' } <div class="date"> - {tr}Incident Report Open - Priority {$contentInfo.priority} {/tr} + {tr}Incident Report Open - Priority {$pageInfo.priority} {/tr} </div> {/if} - {if $contentInfo.status=='X' } + {if $pageInfo.status=='X' } <div class="date"> {tr}Incident Report Cancelled{/tr} </div> {/if} <div class="header"> - {tr}<h1>{$contentInfo.title}</h1>{/tr} + {tr}<h1>{$pageInfo.title}</h1>{/tr} </div> <div class="content"> {$parsed} diff --git a/templates/show_contact.tpl b/templates/show_contact.tpl index 116635a..c7ddbf0 100644 --- a/templates/show_contact.tpl +++ b/templates/show_contact.tpl @@ -1,6 +1,20 @@ <div class="display contact"> - {include file="bitpackage:contact/contact_header.tpl"} {include file="bitpackage:contact/contact_date_bar.tpl"} -{include file="bitpackage:contact/display_contact.tpl"} +{if $gContent->isCommentable()} + {include file="bitpackage:contact/comments_edit.tpl"} +{/if} +{jstabs} + {jstab title="General"} + {include file="bitpackage:contact/display_contact.tpl"} + {/jstab} + {jstab title="Local Notes"} + {if $gContent->isCommentable()} + {include file="bitpackage:contact/comments.tpl"} + {/if} + {/jstab} + {jstab title="Documents"} + Link to private fisheye document gallery + {/jstab} +{/jstabs} </div> {* end .contact *} diff --git a/templates/view_xref.tpl b/templates/view_xref.tpl new file mode 100644 index 0000000..cfaa468 --- /dev/null +++ b/templates/view_xref.tpl @@ -0,0 +1,83 @@ +{strip} +<div class="edit contact_xref"> + <div class="header"> + <h1>{tr}Contact Xref{/tr}: {$xref_title|escape} for {$title|escape}</h1> + </div> + + <div class="body"> + {legend legend="XRef Contents"} + <div class="row"> + {formlabel label="Cross Reference Link" for="xref"} + {forminput} + {if $xrefInfo.xref} + {$xrefInfo.xref|escape} + {else} + + {/if} + {formhelp note="Link to other contact/content entries."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Key" for="xkey"} + {forminput} + {if $xrefInfo.xref} + {$xrefInfo.xkey|escape} + {else} + + {/if} + {formhelp note="ID Key use to access data in other systems identified by the xref type."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Text" for="xkey_ext"} + {forminput} + {if $xrefInfo.xref_ext} + {$xrefInfo.xkey_ext|escape} + {else} + + {/if} + {formhelp note="Variable text element such as url or email address."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Reference Notes" for="data"} + {forminput} + {$xrefInfo.data|escape} + {formhelp note="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."} + {/forminput} + </div> + {/legend} + + {legend legend="Start and Stop Dates"} + <div class="row"> + {formlabel label="Start Date" for=""} + {forminput} + {if $xrefInfo.ignore_start_date eq "y"} + No start date set + {else} + {html_select_date prefix="start_" time=$xrefInfo.start_date start_year="-5" end_year="+10"} {tr}at{/tr} + <span dir="ltr">{html_select_time prefix="start_" time=$xrefInfo.start_date display_seconds=false} {$siteTimeZone}</span> + {/if} + {formhelp note="This xref record becomes valid on this date."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="End Date" for=""} + {forminput} + {if $xrefInfo.ignore_end_date eq "y"} + No end date set + {else} + {html_select_date prefix="end_" time=$xrefInfo.end_date start_year="-5" end_year="+10"} {tr}at{/tr} + <span dir="ltr">{html_select_time prefix="end_" time=$xrefInfo.end_date display_seconds=false} {$siteTimeZone}</span> + {formhelp note="This xref record finishes on this date."} + {/if} + {/forminput} + </div> + {/legend} + </div><!-- end .body --> +</div><!-- end .article --> +{/strip} |
