summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-12-28 23:21:25 +0000
committerChristian Fowler <spider@viovio.com>2005-12-28 23:21:25 +0000
commitc07dc79add21f2677680fcc9736b82276d2f8a72 (patch)
tree0b432d8fdf68098f0f2e783457fd646fabb09a73 /templates
parent2149b17e33d9905d16986ce86757343fabfa8211 (diff)
downloadnewsletters-c07dc79add21f2677680fcc9736b82276d2f8a72.tar.gz
newsletters-c07dc79add21f2677680fcc9736b82276d2f8a72.tar.bz2
newsletters-c07dc79add21f2677680fcc9736b82276d2f8a72.zip
lots and lots of subscription fixes, still not 100%
Diffstat (limited to 'templates')
-rw-r--r--templates/edit_newsletter.tpl2
-rw-r--r--templates/list_newsletters.tpl6
-rw-r--r--templates/newsletters.tpl2
-rw-r--r--templates/user_subscriptions.tpl18
-rw-r--r--templates/view_newsletter.tpl4
5 files changed, 15 insertions, 17 deletions
diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl
index 533b85f..4fdad39 100644
--- a/templates/edit_newsletter.tpl
+++ b/templates/edit_newsletter.tpl
@@ -12,7 +12,7 @@
{if $individual eq 'y'}
<a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$gContent->mInfo.name}&amp;object_type=newsletter&amp;permType=newsletters&amp;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}" />
+ <input type="hidden" name="nl_id" value="{$gContent->mNewsletterId}" />
<div class="row">
{formlabel label="Title" for="title"}
diff --git a/templates/list_newsletters.tpl b/templates/list_newsletters.tpl
index 3ef2960..326cf51 100644
--- a/templates/list_newsletters.tpl
+++ b/templates/list_newsletters.tpl
@@ -12,7 +12,7 @@
{if $individual eq 'y'}
<a href="{$smarty.const.KERNEL_PKG_URL}object_permissions.php?objectName=newsletter%20{$gContent->mInfo.name}&amp;object_type=newsletter&amp;permType=newsletters&amp;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}" />
+ <input type="hidden" name="nl_id" value="{$gContent->mNewsletterId}" />
<div class="row">
{formlabel label="Title" for="title"}
@@ -104,7 +104,9 @@
{/foreach}
</table>
- <a href="{$smarty.server.php_self}?new=1">Create new newsletter</a>
+ {if $gBitUser->hasPermission('bit_p_create_newsletters')}
+ <a href="{$smarty.server.php_self}?new=1">Create new newsletter</a>
+ {/if}
{pagination}
{/if}
diff --git a/templates/newsletters.tpl b/templates/newsletters.tpl
index 0ae8124..bfd9323 100644
--- a/templates/newsletters.tpl
+++ b/templates/newsletters.tpl
@@ -27,7 +27,7 @@
{if ($gContent->mInfo.allow_user_sub eq 'y') or $gBitUser->hasPermission( 'bit_p_subscribe_newsletters' )}
{form}
- <input type="hidden" name="nl_id" value="{$gContent->mNlId}" />
+ <input type="hidden" name="nl_id" value="{$gContent->mNewsletterId}" />
<div class="row">
{formlabel label="Email" for=""}
{forminput}
diff --git a/templates/user_subscriptions.tpl b/templates/user_subscriptions.tpl
index 57139ef..457c5f7 100644
--- a/templates/user_subscriptions.tpl
+++ b/templates/user_subscriptions.tpl
@@ -1,3 +1,4 @@
+{if $subInfo || $gBitUser->hasPermission('bit_p_subscribe_newsletters')}
{strip}
<div class="display newsletters">
<div class="header">
@@ -5,10 +6,10 @@
</div>
<div class="body">
- {if $subInfo}
{formfeedback success=$success error=$gContent->mErrors}
{form enctype="multipart/form-data" id="editpageform"}
<input type="hidden" name="response_content_id" value="{$subInfo.content_id}" />
+{if $smarty.request.sub}
<input type="hidden" name="sub" value="{$smarty.request.sub}" />
<div class="row">
<em>
@@ -18,6 +19,7 @@
{/forminput}
</em>
</div>
+{/if}
<div class="row">
{formlabel label="User Information"}
{forminput}
@@ -29,7 +31,7 @@
{formlabel label="Subscriptions"}
{forminput}
{foreach from=$newsletters key=nlId item=nl}
- <input type="checkbox" name="nl_content_id[]" value="{$nlId}" {if !$unsubs.$nlId}checked="checked"{/if}/> {$nl.title} <br/>
+ <input type="checkbox" name="nl_content_id[]" value="{$nlId}" {if !$unsubs.$nlId}checked="checked"{/if}/> <a href="{$nl.display_url}"/>{$nl.title}</a> <br/>
{foreachelse}
{tr}No newsletters were found{/tr}
{/foreach}
@@ -45,15 +47,9 @@
<input type="submit" name="update" value="{tr}Update Subscriptions{/tr}" />
</div>
{/form}
- {else}
- <div class="row">
- {tr}The subscription URL is no longer valid.{/tr}
- {if $gBitUser->isRegistered()}
-
- {else}
- {include file="bitpackage:users/login_inc.tpl"}
- {/if}
- {/if}
</div> <!-- end .body -->
</div> <!-- end .newsletters -->
{/strip}
+{else}
+ {include file="bitpackage:newsletters/list_newsletters.tpl"}
+{/if} \ No newline at end of file
diff --git a/templates/view_newsletter.tpl b/templates/view_newsletter.tpl
index 67c5290..881ebad 100644
--- a/templates/view_newsletter.tpl
+++ b/templates/view_newsletter.tpl
@@ -3,8 +3,8 @@
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='icon'}
{if $gContent->isOwner() || $gBitUser->hasPermission( 'bit_p_newsletter_admin' )}
- <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?nl_id={$gContent->mNlId}">{biticon ipackage=liberty iname="edit" iexplain="edit"}</a>
- <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?nl_id={$gContent->mNlId}&amp;remove=1">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
+ <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?nl_id={$gContent->mNewsletterId}">{biticon ipackage=liberty iname="edit" iexplain="edit"}</a>
+ <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/index.php?nl_id={$gContent->mNewsletterId}&amp;remove=1">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
{/if}
{if $gBitUser->hasPermission( 'bit_p_print' )}