diff options
| author | Christian Fowler <spider@viovio.com> | 2005-12-16 06:34:55 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2005-12-16 06:34:55 +0000 |
| commit | 91544f9367c2ad73932af17e92cba8f8eaf58519 (patch) | |
| tree | 11fdc037e039b4cbf86db7ac1e649e6d43f7d569 /templates | |
| parent | 5c976e0f6488cd1cdd13d06abe4c99bf5bc40f99 (diff) | |
| download | newsletters-91544f9367c2ad73932af17e92cba8f8eaf58519.tar.gz newsletters-91544f9367c2ad73932af17e92cba8f8eaf58519.tar.bz2 newsletters-91544f9367c2ad73932af17e92cba8f8eaf58519.zip | |
get mailing working - things actually send now. still lots of debug stuff strewn about
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_newsletters.tpl | 124 | ||||
| -rw-r--r-- | templates/edit_newsletter.tpl | 141 | ||||
| -rw-r--r-- | templates/menu_newsletters_admin.tpl | 2 |
3 files changed, 133 insertions, 134 deletions
diff --git a/templates/admin_newsletters.tpl b/templates/admin_newsletters.tpl index d68d824..2806a7b 100644 --- a/templates/admin_newsletters.tpl +++ b/templates/admin_newsletters.tpl @@ -1,113 +1,27 @@ {strip} -<div class="floaticon">{bithelp}</div> +{form} + {jstabs} + {jstab title="Newsletter Features"} + {legend legend="Newsletter Features"} + <input type="hidden" name="page" value="{$page}" /> -<div class="edit newsletters"> - <div class="header"> - <h1>{tr}Newsletter Settings{/tr}</h1> - </div> - - <div class="body"> - {if !$newsletters || $gContent->isValid() || $smarty.request.new} - {form legend="Create / Edit Newsletters"} - {if $individual eq 'y'} - <a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$gContent->mInfo.name}&object_type=newsletter&permType=newsletters&object_id={$gContent->mInfo.nl_id}">{tr}There are individual permissions set for this newsletter{/tr}</a><br /><br /> - {/if} - <input type="hidden" name="nl_id" value="{$gContent->mNlId}" /> - - <div class="row"> - {formlabel label="Title" for="title"} - {forminput} - <input type="text" name="title" id="title" value="{$gContent->mInfo.title|escape}" /> - {formhelp note="Title of the newsletter."} - {/forminput} - </div> - - <div class="row"> - {formlabel label="Description" for="description"} - {forminput} - <textarea name="edit" rows="4" cols="40" id="description">{$gContent->mInfo.data|escape}</textarea> - {formhelp note="Description of the newsletter, that users know what they are getting themselves into."} - {/forminput} - </div> - - <div class="row"> - {formlabel label="Users can Subscribe" for="allow_user_sub"} - {forminput} - <input type="checkbox" name="allow_user_sub" id="allow_user_sub" {if $gContent->mInfo.allow_user_sub eq 'y'}checked="checked"{/if} /> - {formhelp note="Users can subscribe to this list. Disabling this options means that you have to manually add users to the list."} - {/forminput} - </div> - - <div class="row"> - {formlabel label="Any e-mail Address" for="allow_any_sub"} - {forminput} - <input type="checkbox" name="allow_any_sub" id="allow_any_sub" {if $gContent->mInfo.allow_any_sub eq 'y'}checked="checked"{/if} /> - {formhelp note="Users may subscribe using any email address."} - {/forminput} - </div> - - <div class="row"> - {formlabel label="Append Un/Subscribe Instructions" for="unsub_msg"} - {forminput} - <input type="checkbox" name="unsub_msg" id="unsub_msg" {if $gContent->mInfo.unsub_msg eq 'y'}checked="checked"{/if} /> - {formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."} - {/forminput} - </div> - - <div class="row"> - {formlabel label="Validate e-mail Addresses" for="validate_addr"} - {forminput} - <input type="checkbox" name="validate_addr" id="validate_addr" {if $gContent->mInfo.validate_addr eq 'y'}checked="checked"{/if} /> - {formhelp note="Validate all email addresses before they are added to the list. This might result in members not being added despite working email addresses."} - {/forminput} - </div> + {foreach from=$formNewsletterFeatures key=item item=output} + <div class="row"> + {formlabel label=`$output.label` for=$item} + {forminput} + <input type="text" name="{$item}" value="{$gBitSystem->getPreference($item,$output.default)}" id=$item /> + {formhelp note=`$output.note` page=`$output.page`} + {/forminput} + </div> + {/foreach} <div class="row submit"> - <input type="submit" name="cancel" value="{tr}Cancel{/tr}" /> - <input type="submit" name="save" value="{tr}Save{/tr}" /> + <input type="submit" name="featuresTabSubmit" value="{tr}Change preferences{/tr}" /> </div> - {/form} - - {else} - - {minifind} - - <table class="data"> - <caption>{tr}Newsletters{/tr}</caption> - <tr> - <th>{smartlink ititle="Name" isort=name offset=$offset}</th> - <th>{smartlink ititle="Description" isort=description offset=$offset}</th> - <th>{smartlink ititle="Created" isort=last_sent offset=$offset}</th> - <th>{smartlink ititle="Last Sent" isort=created offset=$offset}</th> - <th>{smartlink ititle="Users Unsubscribed" isort=users offset=$offset}</th> - <th>{tr}Action{/tr}</th> - </tr> - - {foreach key=nlId from=$newsletters item=nl} - <tr class="{cycle values='odd,even'}"> - <td><a href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php?nl_id={$nlId}">{$nl.title}</a></td> - <td>{$nl.data}</td> - <td>{$nl.created|bit_short_date}</td> - <td>{$nl.last_sent|bit_short_date}</td> - <td style="text-align:right;"><a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletter_subscriptions.php?nl_id={$nlId}">{$nl.users|default:0} [ {$channels[user].confirmed|default:0} ]</a></td> - <td style="text-align:right;"> - <a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?nl_id={$nlId}">{biticon ipackage=liberty iname=new iexplain="New Edition"}</a> - <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?remove=1&nl_id={$nlId}">{biticon ipackage=liberty iname=delete iexplain=Remove}</a> - <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?&nl_id={$nlId}">{biticon ipackage=liberty iname=edit iexplain=Edit}</a> - {if $channels[user].individual eq 'y'}({/if}<a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$nl.title}&object_type={$smarty.const.BITNEWSLETTER_CONTENT_TYPE_GUID}&permType=newsletters&object_id={$nlId}">{biticon ipackage=liberty iname=permissions iexplain=Permissions}</a>{if $nl.individual eq 'y'}){/if} - </td> - </tr> - {foreachelse} - <tr class="norecords"> - <td colspan="7">{tr}No Records Found{/tr}</td> - </tr> - {/foreach} - </table> + {/legend} + {/jstab} - <a href="{$smarty.server.php_self}?new=1">Create new newsletter</a> + {/jstabs} +{/form} - {pagination} - {/if} - </div><!-- end .body --> -</div><!-- end .___ --> {/strip} diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl index 84876be..d68d824 100644 --- a/templates/edit_newsletter.tpl +++ b/templates/edit_newsletter.tpl @@ -1,28 +1,113 @@ -<h2>{tr}Prepare a newsletter to be sent{/tr}</h2> -<form action="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php" method="post" id='editpageform'> -<table class="panel"> -<tr><td>{tr}Subject{/tr}:</td><td><input type="text" maxlength="250" size="40" name="title" value="{$info.subject|escape}" /></td></tr> -<tr><td>{tr}Newsletter{/tr}:</td><td> - <select name="nl_id"> - {foreach from=$newsletters item=nl key=nlId} - <option value="{$nlId|escape}" {if $nlId eq $nl_id}selected="selected"{/if}>{$nl.title}</option> - {/foreach} - </select> -</td></tr> -{if $tiki_p_use_content_templates eq 'y'} -<tr><td>{tr}Apply template{/tr}</td><td> -<select name="template_id" onchange="javascript:document.getElementById('editpageform').submit();"> -<option value="0">{tr}none{/tr}</option> -{section name=ix loop=$templates} -<option value="{$templates[ix].template_id|escape}">{$templates[ix].name}</option> -{/section} -</select> -</td></tr> -{/if} -<tr><td>{tr}Data{/tr}:</td><td><textarea name="edit" rows="25" cols="60">{$info.data|escape}</textarea></td></tr> -<tr class="panelsubmitrow"><td colspan="2"> -<input type="submit" name="preview" value="{tr}Preview{/tr}" /> <input type="submit" name="save" value="{tr}Send Newsletters{/tr}" /> -</td></tr> -</table> -</form> -{/if} +{strip} +<div class="floaticon">{bithelp}</div> + +<div class="edit newsletters"> + <div class="header"> + <h1>{tr}Newsletter Settings{/tr}</h1> + </div> + + <div class="body"> + {if !$newsletters || $gContent->isValid() || $smarty.request.new} + {form legend="Create / Edit Newsletters"} + {if $individual eq 'y'} + <a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$gContent->mInfo.name}&object_type=newsletter&permType=newsletters&object_id={$gContent->mInfo.nl_id}">{tr}There are individual permissions set for this newsletter{/tr}</a><br /><br /> + {/if} + <input type="hidden" name="nl_id" value="{$gContent->mNlId}" /> + + <div class="row"> + {formlabel label="Title" for="title"} + {forminput} + <input type="text" name="title" id="title" value="{$gContent->mInfo.title|escape}" /> + {formhelp note="Title of the newsletter."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Description" for="description"} + {forminput} + <textarea name="edit" rows="4" cols="40" id="description">{$gContent->mInfo.data|escape}</textarea> + {formhelp note="Description of the newsletter, that users know what they are getting themselves into."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Users can Subscribe" for="allow_user_sub"} + {forminput} + <input type="checkbox" name="allow_user_sub" id="allow_user_sub" {if $gContent->mInfo.allow_user_sub eq 'y'}checked="checked"{/if} /> + {formhelp note="Users can subscribe to this list. Disabling this options means that you have to manually add users to the list."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Any e-mail Address" for="allow_any_sub"} + {forminput} + <input type="checkbox" name="allow_any_sub" id="allow_any_sub" {if $gContent->mInfo.allow_any_sub eq 'y'}checked="checked"{/if} /> + {formhelp note="Users may subscribe using any email address."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Append Un/Subscribe Instructions" for="unsub_msg"} + {forminput} + <input type="checkbox" name="unsub_msg" id="unsub_msg" {if $gContent->mInfo.unsub_msg eq 'y'}checked="checked"{/if} /> + {formhelp note="Append instructions on how to subscribe / unsubscribe to ever outgoing newsletter. This is only useful when users can un / subscribe to the list themselves."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Validate e-mail Addresses" for="validate_addr"} + {forminput} + <input type="checkbox" name="validate_addr" id="validate_addr" {if $gContent->mInfo.validate_addr eq 'y'}checked="checked"{/if} /> + {formhelp note="Validate all email addresses before they are added to the list. This might result in members not being added despite working email addresses."} + {/forminput} + </div> + + <div class="row submit"> + <input type="submit" name="cancel" value="{tr}Cancel{/tr}" /> + <input type="submit" name="save" value="{tr}Save{/tr}" /> + </div> + {/form} + + {else} + + {minifind} + + <table class="data"> + <caption>{tr}Newsletters{/tr}</caption> + <tr> + <th>{smartlink ititle="Name" isort=name offset=$offset}</th> + <th>{smartlink ititle="Description" isort=description offset=$offset}</th> + <th>{smartlink ititle="Created" isort=last_sent offset=$offset}</th> + <th>{smartlink ititle="Last Sent" isort=created offset=$offset}</th> + <th>{smartlink ititle="Users Unsubscribed" isort=users offset=$offset}</th> + <th>{tr}Action{/tr}</th> + </tr> + + {foreach key=nlId from=$newsletters item=nl} + <tr class="{cycle values='odd,even'}"> + <td><a href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php?nl_id={$nlId}">{$nl.title}</a></td> + <td>{$nl.data}</td> + <td>{$nl.created|bit_short_date}</td> + <td>{$nl.last_sent|bit_short_date}</td> + <td style="text-align:right;"><a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletter_subscriptions.php?nl_id={$nlId}">{$nl.users|default:0} [ {$channels[user].confirmed|default:0} ]</a></td> + <td style="text-align:right;"> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?nl_id={$nlId}">{biticon ipackage=liberty iname=new iexplain="New Edition"}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?remove=1&nl_id={$nlId}">{biticon ipackage=liberty iname=delete iexplain=Remove}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?&nl_id={$nlId}">{biticon ipackage=liberty iname=edit iexplain=Edit}</a> + {if $channels[user].individual eq 'y'}({/if}<a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$nl.title}&object_type={$smarty.const.BITNEWSLETTER_CONTENT_TYPE_GUID}&permType=newsletters&object_id={$nlId}">{biticon ipackage=liberty iname=permissions iexplain=Permissions}</a>{if $nl.individual eq 'y'}){/if} + </td> + </tr> + {foreachelse} + <tr class="norecords"> + <td colspan="7">{tr}No Records Found{/tr}</td> + </tr> + {/foreach} + </table> + + <a href="{$smarty.server.php_self}?new=1">Create new newsletter</a> + + {pagination} + {/if} + </div><!-- end .body --> +</div><!-- end .___ --> +{/strip} diff --git a/templates/menu_newsletters_admin.tpl b/templates/menu_newsletters_admin.tpl index 7a15eb1..427af15 100644 --- a/templates/menu_newsletters_admin.tpl +++ b/templates/menu_newsletters_admin.tpl @@ -1,6 +1,6 @@ {if $gBitUser->hasPermission( 'bit_p_admin_newsletters' )} <ul> - <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php">{tr}Newsletters Settings{/tr}</a></li> + <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=newsletters">{tr}Newsletters Settings{/tr}</a></li> <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php">{tr}Send Newsletters{/tr}</a></li> </ul> {/if} |
