From 643f1d7f43ef14bb415fd69ba435035d1426a3a9 Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Sun, 11 Dec 2005 06:34:19 +0000 Subject: add edition saving and listing, almost to the point of getting send working --- templates/admin_newsletters.tpl | 8 ++-- templates/edit_edition.tpl | 93 +++++++++++++++++++++++++++++------------ templates/edit_newsletter.tpl | 28 +++++++++++++ templates/list_editions.tpl | 16 +++++++ templates/list_editions_inc.tpl | 24 +++++++++++ templates/menu_newsletters.tpl | 4 ++ templates/newsletters.tpl | 2 +- templates/send_newsletters.tpl | 68 ++++++++---------------------- templates/view_edition.tpl | 26 ++++++++++++ templates/view_newsletter.tpl | 33 +++++++++++++++ 10 files changed, 219 insertions(+), 83 deletions(-) create mode 100644 templates/edit_newsletter.tpl create mode 100644 templates/list_editions.tpl create mode 100644 templates/list_editions_inc.tpl create mode 100644 templates/view_edition.tpl create mode 100644 templates/view_newsletter.tpl (limited to 'templates') diff --git a/templates/admin_newsletters.tpl b/templates/admin_newsletters.tpl index 88c27fc..b9cd035 100644 --- a/templates/admin_newsletters.tpl +++ b/templates/admin_newsletters.tpl @@ -1,7 +1,7 @@ {strip}
{bithelp}
-
+

{tr}Newsletter Settings{/tr}

@@ -79,19 +79,17 @@ {smartlink ititle="Description" isort=description offset=$offset} {smartlink ititle="Created" isort=last_sent offset=$offset} {smartlink ititle="Last Sent" isort=created offset=$offset} - {smartlink ititle="Users [ Confirmed ]" isort=users offset=$offset} - {smartlink ititle="Editions" isort=editions offset=$offset} + {smartlink ititle="Users Unsubscribed" isort=users offset=$offset} {tr}Action{/tr} {foreach key=nlId from=$newsletters item=nl} - {$nl.title} + {$nl.title} {$nl.data} {$nl.created|bit_short_date} {$nl.last_sent|bit_short_date} {$nl.users|default:0} [ {$channels[user].confirmed|default:0} ] - {$nl.editions|default:0} {biticon ipackage=liberty iname=delete iexplain=Remove} {biticon ipackage=liberty iname=edit iexplain=Edit} diff --git a/templates/edit_edition.tpl b/templates/edit_edition.tpl index 70305d0..7b2b151 100644 --- a/templates/edit_edition.tpl +++ b/templates/edit_edition.tpl @@ -2,7 +2,7 @@
-

{tr}Prepare a newsletter to be sent{/tr}

+

{if $gContent->isValid()}{tr}Edit Edition{/tr}: {$gContent->getTitle()}{else}{tr}Create New Edition{/tr}{/if}

{if $preview eq 'y'} @@ -16,43 +16,82 @@ {/if}
- {form legend="Newsletter" id="editpageform"} -
- {formlabel label="Subject" for="subject"} - {forminput} - - {formhelp note=""} - {/forminput} -
- -
- {formlabel label="" for=""} - {forminput} - - {formhelp note=""} - {/forminput} -
+ {formfeedback success=$success error=$gContent->mErrors} + {form enctype="multipart/form-data" id="editpageform"} + + {jstabs} + {jstab title="Edition Body"} + {legend legend="Edition Body"} +
+ {formlabel label="Subject" for="subject"} + {forminput} + + {formhelp note=""} + {/forminput} +
- {if $tiki_p_use_content_templates eq 'y'}
{formlabel label="" for=""} {forminput} - + {foreach from=$newsletters item=nl key=nlId} + + {/foreach} {formhelp note=""} {/forminput}
+ + {if $gBitUser->hasPermission( 'bit_p_use_content_templates' ) && $templates} +
+ {formlabel label="Template" for=""} + {forminput} + + {formhelp note=""} + {/forminput} +
+ {/if} + + {include file="bitpackage:liberty/edit_services_inc.tpl serviceFile=content_edit_mini_tpl} + +
+ {formlabel label="Draft" for="draft"} + {forminput} + getField('is_draft')}checked="checked"{/if}" /> + {formhelp note=""} + {/forminput} +
+ +
+ {formlabel label="Body" for="body"} + {forminput} + + {formhelp note=""} + {/forminput} +
+ + {/legend} + {/jstab} + + {include file="bitpackage:liberty/edit_services_inc.tpl serviceFile=content_edit_tab_tpl} + + {if $gBitUser->hasPermission('bit_p_content_attachments')} + {jstab title="Attachments"} + {legend legend="Attachments"} + {include file="bitpackage:liberty/edit_storage.tpl"} + {/legend} + {/jstab} {/if} + {/jstabs} +
+
diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl new file mode 100644 index 0000000..84876be --- /dev/null +++ b/templates/edit_newsletter.tpl @@ -0,0 +1,28 @@ +

{tr}Prepare a newsletter to be sent{/tr}

+
+ + + +{if $tiki_p_use_content_templates eq 'y'} + +{/if} + + +
{tr}Subject{/tr}:
{tr}Newsletter{/tr}: + +
{tr}Apply template{/tr} + +
{tr}Data{/tr}:
+  +
+
+{/if} diff --git a/templates/list_editions.tpl b/templates/list_editions.tpl new file mode 100644 index 0000000..b611701 --- /dev/null +++ b/templates/list_editions.tpl @@ -0,0 +1,16 @@ +{strip} +
+
+

{tr}Newsletter Editions{/tr}

+
+ +
+ {minifind} + + {include file='bitpackage:newsletters/list_editions_inc.tpl'} + +
+ {libertypagination page=$curPage numPages=$numPages find=$find} +
+
+{/strip} diff --git a/templates/list_editions_inc.tpl b/templates/list_editions_inc.tpl new file mode 100644 index 0000000..5a783bc --- /dev/null +++ b/templates/list_editions_inc.tpl @@ -0,0 +1,24 @@ + + diff --git a/templates/menu_newsletters.tpl b/templates/menu_newsletters.tpl index dbcca5d..0d85717 100644 --- a/templates/menu_newsletters.tpl +++ b/templates/menu_newsletters.tpl @@ -1,6 +1,10 @@ {strip}