diff options
| author | Christian Fowler <spider@viovio.com> | 2007-01-06 06:22:12 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2007-01-06 06:22:12 +0000 |
| commit | 0d913f57582229279916b9ff29645389e4b13a2c (patch) | |
| tree | 9fec2c3f10f9338aa9aafe26708d64ff7e7487d2 /templates | |
| parent | 5d8919dbedc84426f122338d5c05d39fc8804a75 (diff) | |
| download | newsletters-0d913f57582229279916b9ff29645389e4b13a2c.tar.gz newsletters-0d913f57582229279916b9ff29645389e4b13a2c.tar.bz2 newsletters-0d913f57582229279916b9ff29645389e4b13a2c.zip | |
massive clean up to newsletters - improve usability for listing, editing, creating, and subscriptions
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_list_newsletters.tpl | 56 | ||||
| -rw-r--r-- | templates/admin_newsletters.tpl | 24 | ||||
| -rw-r--r-- | templates/header_inc.tpl | 8 | ||||
| -rw-r--r-- | templates/list_editions_inc.tpl | 6 | ||||
| -rw-r--r-- | templates/menu_newsletters.tpl | 3 | ||||
| -rw-r--r-- | templates/newsletters.tpl | 24 |
6 files changed, 84 insertions, 37 deletions
diff --git a/templates/admin_list_newsletters.tpl b/templates/admin_list_newsletters.tpl new file mode 100644 index 0000000..affa88b --- /dev/null +++ b/templates/admin_list_newsletters.tpl @@ -0,0 +1,56 @@ +{if !$newsletters || $gContent->isValid() || $smarty.request.new} + {include file="bitpackage:newsletters/edit_newsletter.tpl"} +{else} +{strip} +<div class="floaticon">{bithelp}</div> + +<div class="edit newsletters"> + <div class="header"> + <h1>{tr}Newsletter Settings{/tr}</h1> + </div> + + <div class="body"> + + {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="Unsubscribed" isort=users offset=$offset}</th> + <th>{tr}Actions{/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={$nl.nl_id}">{$nl.title}</a></td> + <td>{$nl.data}</td> + <td>{$nl.created|bit_short_date}</td> + <td>{$nl.last_sent|bit_short_date}</td> + <td><a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletter_subscriptions.php?nl_id={$nl.nl_id}">{$nl.unsub_count}({$nl.confirmed})</a></td> + <td style="text-align:right;"> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?nl_id={$nl.nl_id}">{biticon ipackage=liberty iname=new iexplain="New Edition"}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletters.php?&nl_id={$nl.nl_id}">{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} + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletters.php?remove=1&nl_id={$nl.nl_id}">{biticon ipackage=liberty iname=delete iexplain=Remove}</a> + </td> + </tr> + {foreachelse} + <tr class="norecords"> + <td colspan="7">{tr}No Records Found{/tr}</td> + </tr> + {/foreach} + </table> + + {if $gBitUser->hasPermission('bit_p_create_newsletters')} + <a href="{$smarty.server.php_self}?new=1">Create new newsletter</a> + {/if} + + {pagination} + </div><!-- end .body --> +</div><!-- end .___ --> +{/strip} +{/if} diff --git a/templates/admin_newsletters.tpl b/templates/admin_newsletters.tpl deleted file mode 100644 index da060d6..0000000 --- a/templates/admin_newsletters.tpl +++ /dev/null @@ -1,24 +0,0 @@ -{strip} -{form legend="Newsletter Features"} - <input type="hidden" name="page" value="{$page}" /> - - {if !$gBitSystem->getConfig( 'kernel_server_name' )} - {formfeedback error="Server name is not defined!"} - {tr}You must <a href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=server">define the server name</a> for proper background operation of the mail script.{/tr} - {/if} - - {foreach from=$formNewsletterFeatures key=item item=output} - <div class="row"> - {formlabel label=`$output.label` for=$item} - {forminput} - <input type="text" name="{$item}" value="{$gBitSystem->getConfig($item,$output.default)}" id="{$item}" /> - {formhelp note=`$output.note` page=`$output.page`} - {/forminput} - </div> - {/foreach} - - <div class="row submit"> - <input type="submit" name="featuresTabSubmit" value="{tr}Change preferences{/tr}" /> - </div> -{/form} -{/strip} diff --git a/templates/header_inc.tpl b/templates/header_inc.tpl new file mode 100644 index 0000000..9fc2065 --- /dev/null +++ b/templates/header_inc.tpl @@ -0,0 +1,8 @@ +{* $Header: /cvsroot/bitweaver/_bit_newsletters/templates/header_inc.tpl,v 1.2 2007/01/06 06:22:12 spiderr Exp $ *} +{strip} +{* this can totally screw up commerce. need to activate this only when rendering a newsletter to be mailed +{if $gBitSystem->isPackageActive( 'newsletters' )} + <base href="{$smarty.const.BIT_BASE_URI}" /> +{/if} +*} +{/strip} diff --git a/templates/list_editions_inc.tpl b/templates/list_editions_inc.tpl index f4f6b62..bd5511e 100644 --- a/templates/list_editions_inc.tpl +++ b/templates/list_editions_inc.tpl @@ -8,11 +8,6 @@ </div> <h2><a href="{$ed.display_url}">{$ed.title|escape}</a></h2> - <p> - {$ed.parsed|truncate:200:'...'} - <br /> - {tr}in{/tr} <a href="{$smarty.const.NEWSLETTERS_PKG_URL}?nl_content_id={$ed.nl_content_id}">{$ed.newsletter_title}</a> - </p> </li> {foreachelse} <li class="item norecords"> @@ -20,4 +15,3 @@ </li> {/foreach} </ul> - diff --git a/templates/menu_newsletters.tpl b/templates/menu_newsletters.tpl index 7eaf4dc..0fb754d 100644 --- a/templates/menu_newsletters.tpl +++ b/templates/menu_newsletters.tpl @@ -2,8 +2,7 @@ <ul> <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php">{tr}List Newsletters{/tr}</a></li> {if $gBitUser->hasPermission( 'p_newsletters_create' )} - <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletters.php">{tr}Admin Newsletters{/tr}</a></li> - <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletters.php?new=1">{tr}Create Newsletter{/tr}</a></li> + <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?new=1">{tr}Create Newsletter{/tr}</a></li> {/if} <li><a class="item" href="{$smarty.const.NEWSLETTERS_PKG_URL}edition.php">{tr}List Editions{/tr}</a></li> {if $gBitUser->hasPermission( 'p_newsletters_create_editions' )} diff --git a/templates/newsletters.tpl b/templates/newsletters.tpl index 66e82a0..fbb17dd 100644 --- a/templates/newsletters.tpl +++ b/templates/newsletters.tpl @@ -1,7 +1,9 @@ {strip} <div class="display newsletters"> <div class="header"> - <h1>{tr}Newsletters{/tr}</h1> + {if count($newsletters) > 1} + <h1>{tr}Newsletters{/tr}</h1> + {/if} </div> <div class="body"> @@ -72,17 +74,29 @@ <div class="floaticon"> {if $subs.$nlId.unsubscribe_all || $subs.$nlId.unsubscribe_date} <strong>{biticon ipackage="icons" iname="dialog-cancel" iexplain="Success" iforce="icon"}{tr}Unsubscribed{/tr}: {$subs.$nlId.unsubscribe_date|bit_short_date}</strong><br/> - <a href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php?nl_id={$nl.nl_id}&sub=1">{tr}Subscribe{/tr}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}sub.php?nl_id={$nl.nl_id}&sub=1">{tr}Subscribe{/tr}</a> {elseif $subs.$nlId} <strong>{biticon ipackage="icons" iname="dialog-ok" iexplain="Success" iforce="icon"}{tr}Subscribed{/tr}: {$subs.$nlId.subscribed_date|bit_short_date}</strong><br/> - <a href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php?nl_id={$nl.nl_id}&unsub=1">{tr}Unsubscribe{/tr}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}sub.php?nl_id={$nl.nl_id}&unsub=1">{tr}Unsubscribe{/tr}</a> {else} - <a href="{$smarty.const.NEWSLETTERS_PKG_URL}index.php?nl_id={$nl.nl_id}&sub=1">{tr}Subscribe{/tr}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}sub.php?nl_id={$nl.nl_id}&sub=1">{tr}Subscribe{/tr}</a> + {/if} + {if $gBitUser->hasPermission('p_newsletters_create')} + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?nl_id={$nl.nl_id}">{biticon ipackage="icons" iname="document-new" iexplain="New Edition"}</a> + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?&nl_id={$nl.nl_id}">{biticon ipackage="icons" iname="accessories-text-editor" 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|escape}&object_type={$smarty.const.BITNEWSLETTER_CONTENT_TYPE_GUID}&permType=newsletters&object_id={$nlId}">{biticon ipackage="icons" iname="emblem-shared" iexplain=Permissions}</a>{if $nl.individual eq 'y'}){/if} + <a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?remove=1&nl_id={$nl.nl_id}">{biticon ipackage="icons" iname="edit-delete" iexplain=Remove}</a> {/if} </div> <h1>{$nl.title|escape}</h1> {$nl.data} - <div><a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition.php?nl_id={$nl.nl_id}">{tr}Editions{/tr}</a></div> + <ul class="data"> + {foreach from=$nl.editions item=ed key=edId} + <li class="item"><h2><a href="{$ed.display_url}">{$ed.title}</a></h2><span class="date">{$ed.event_time|bit_short_date}</span></li> + {foreachelse} + <li class="norecords">{tr}No editions.{/tr}</li> + {/foreach} + </ul> </li> {/if} {foreachelse} |
