diff options
| author | Lester Caine <lsces@lsces.co.uk> | 2011-03-10 16:49:18 +0000 |
|---|---|---|
| committer | Lester Caine <lsces@lsces.co.uk> | 2011-03-10 16:49:18 +0000 |
| commit | 2268c66a7a7e1f4117c12190fa427df068b84750 (patch) | |
| tree | b43f90da935d1c88f849fc4e1df3302785f9280e | |
| parent | e1c3f7ee10f35a903c5590ff26f517ab33e9c4e8 (diff) | |
| download | contact-2268c66a7a7e1f4117c12190fa427df068b84750.tar.gz contact-2268c66a7a7e1f4117c12190fa427df068b84750.tar.bz2 contact-2268c66a7a7e1f4117c12190fa427df068b84750.zip | |
Add simple text xref templates. xref_ext entry can handle up to 250 character strings
| -rw-r--r-- | templates/edit_xref_text.tpl | 69 | ||||
| -rw-r--r-- | templates/view_xref_text.tpl | 58 |
2 files changed, 127 insertions, 0 deletions
diff --git a/templates/edit_xref_text.tpl b/templates/edit_xref_text.tpl new file mode 100644 index 0000000..dfde0bd --- /dev/null +++ b/templates/edit_xref_text.tpl @@ -0,0 +1,69 @@ +{strip} +<div class="floaticon">{bithelp}</div> +<div class="edit contact_xref"> + <div class="header"> + <h1>{tr}Edit {/tr}{$xrefInfo.template_title|escape}: {$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="Details"} + {legend legend="Contents"} + <div class="row"> + {formlabel label="`$xrefInfo.template_title` Number" for="xkey_ext"} + {forminput} + <input type="text" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" /> + {formhelp note="Simple free format text entries like email or web addresses."} + {/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" /> + Ignore Date <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" /> + Ignore Date <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/view_xref_text.tpl b/templates/view_xref_text.tpl new file mode 100644 index 0000000..8a48b94 --- /dev/null +++ b/templates/view_xref_text.tpl @@ -0,0 +1,58 @@ +{strip} +<div class="view contact_xref"> + <div class="header"> + <h1>{$xrefInfo.template_title|escape}: {$xref_title|escape} for {$title|escape}</h1> + </div> + + <div class="body"> + {legend legend="Contents"} + <div class="row"> + {formlabel label="`$xrefInfo.template_title`" for="xkey_ext"} + {forminput} + {if $xrefInfo.xkey_ext } + {$xrefInfo.xkey_ext|escape} + {else} + Not yet set + {/if} + {formhelp note="`$xrefInfo.template_title` simple text entry."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="`$xrefInfo.template_title` 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} + {$xrefInfo.start_date|bit_long_datetime} + {/if} + {formhelp note="This `$xrefInfo.template_title` number 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} + {$xrefInfo.end_date|bit_long_datetime} + {/if} + {formhelp note="This `$xrefInfo.template_title` number finishes on this date."} + {/forminput} + </div> + {/legend} + <a class="item" href="{$smarty.const.CONTACT_PKG_URL}index.php?content_id={$xrefInfo.content_id}">{tr}Return{/tr}</a> + </div><!-- end .body --> +</div><!-- end .article --> +{/strip} |
