summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2005-12-29 18:46:39 +0000
committerChristian Fowler <spider@viovio.com>2005-12-29 18:46:39 +0000
commit54ab99d9ef3d0edb3b9527922a34296495d170db (patch)
tree6b1278f2e9cf468ce176308139ab9fd27ba5c1b6 /templates
parent4918af1a903bac5765cbf8709cfe2ce7f41ff082 (diff)
downloadnewsletters-54ab99d9ef3d0edb3b9527922a34296495d170db.tar.gz
newsletters-54ab99d9ef3d0edb3b9527922a34296495d170db.tar.bz2
newsletters-54ab99d9ef3d0edb3b9527922a34296495d170db.zip
clean up permissions, and creating of editions
Diffstat (limited to 'templates')
-rw-r--r--templates/edit_edition.tpl8
-rw-r--r--templates/edit_newsletter.tpl6
-rw-r--r--templates/list_editions_inc.tpl8
-rw-r--r--templates/list_newsletters.tpl8
-rw-r--r--templates/user_subscriptions.tpl2
-rw-r--r--templates/view_edition.tpl5
6 files changed, 20 insertions, 17 deletions
diff --git a/templates/edit_edition.tpl b/templates/edit_edition.tpl
index 50759c8..bace0c6 100644
--- a/templates/edit_edition.tpl
+++ b/templates/edit_edition.tpl
@@ -23,11 +23,11 @@
{jstab title="Edition Body"}
{legend legend="Edition Body"}
<div class="row">
- {formlabel label="Newsletter" for="nl_id"}
+ {formlabel label="Newsletter" for="nl_content_id"}
{forminput}
- <select name="nl_id" id="nl_id">
- {foreach from=$newsletters item=nl key=nlId}
- <option value="{$nlId}" {if $nlId eq $nl_id}selected="selected"{/if}>{$nl.title}</option>
+ <select name="nl_content_id" id="nl_content_id">
+ {foreach from=$newsletters item=nl key=nlConId}
+ <option value="{$nlConId}" {if $nl.con_id eq $nl_id}selected="selected"{/if}>{$nl.title}</option>
{/foreach}
</select>
{formhelp note="Pick the newsletter you want to post to."}
diff --git a/templates/edit_newsletter.tpl b/templates/edit_newsletter.tpl
index 4fdad39..affdf5e 100644
--- a/templates/edit_newsletter.tpl
+++ b/templates/edit_newsletter.tpl
@@ -33,7 +33,7 @@
<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} />
+ <input type="checkbox" name="allow_user_sub" id="allow_user_sub" {if !$gContent->isValid() || $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>
@@ -41,7 +41,7 @@
<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} />
+ <input type="checkbox" name="allow_any_sub" id="allow_any_sub" {if !$gContent->isValid() || $gContent->mInfo.allow_any_sub eq 'y'}checked="checked"{/if} />
{formhelp note="Users may subscribe using any email address."}
{/forminput}
</div>
@@ -49,7 +49,7 @@
<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} />
+ <input type="checkbox" name="unsub_msg" id="unsub_msg" {if !$gContent->isValid() || $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>
diff --git a/templates/list_editions_inc.tpl b/templates/list_editions_inc.tpl
index 22eefa4..7117e0c 100644
--- a/templates/list_editions_inc.tpl
+++ b/templates/list_editions_inc.tpl
@@ -2,14 +2,16 @@
{foreach from=$editionList key=editionId item=ed}
<li class="item {cycle values='odd,even'} {$ed.content_type_guid}">
<div class="floaticon">
- <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php?edition_id={$ed.edition_id}">{biticon ipackage=liberty iname="mail_send" iexplain="Send"}</a>
+ {if $gBitUser->hasPermission('bit_p_admin_newsletters')}
+ <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php?edition_id={$ed.edition_id}">{biticon ipackage=liberty iname="mail_send" iexplain="Send"}</a>
+ {/if}
</div>
<h2><a href="{$ed.display_url}">{$ed.title}</a></h2>
<p>
- {$ed.data|truncate:200}
+ {$ed.data|truncate:200:'...'}
<br />
- {tr}in{/tr} <a href="{$smarty.const.NEWSLETTERS_PKG_URL}?nl_id={$ed.nl_id}">{$ed.newsletter_title}</a>
+ {tr}in{/tr} <a href="{$smarty.const.NEWSLETTERS_PKG_URL}?nl_content_id={$ed.nl_content_id}">{$ed.newsletter_title}</a>
</p>
</li>
{foreachelse}
diff --git a/templates/list_newsletters.tpl b/templates/list_newsletters.tpl
index 326cf51..1287751 100644
--- a/templates/list_newsletters.tpl
+++ b/templates/list_newsletters.tpl
@@ -89,11 +89,11 @@
<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={$nlId}"> {$nl.unsub_count|default:0}</a></td>
+ <td><a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/admin_newsletter_subscriptions.php?nl_id={$nl.nl_id}"> {$nl.unsub_count|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}newsletters.php?remove=1&amp;nl_id={$nlId}">{biticon ipackage=liberty iname=delete iexplain=Remove}</a>
- <a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?&amp;nl_id={$nlId}">{biticon ipackage=liberty iname=edit iexplain=Edit}</a>
+ <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}newsletters.php?remove=1&amp;nl_id={$nl.nl_id}">{biticon ipackage=liberty iname=delete iexplain=Remove}</a>
+ <a href="{$smarty.const.NEWSLETTERS_PKG_URL}newsletters.php?&amp;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}&amp;object_type={$smarty.const.BITNEWSLETTER_CONTENT_TYPE_GUID}&amp;permType=newsletters&amp;object_id={$nlId}">{biticon ipackage=liberty iname=permissions iexplain=Permissions}</a>{if $nl.individual eq 'y'}){/if}
</td>
</tr>
diff --git a/templates/user_subscriptions.tpl b/templates/user_subscriptions.tpl
index 08e7058..0533fa9 100644
--- a/templates/user_subscriptions.tpl
+++ b/templates/user_subscriptions.tpl
@@ -31,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 && !$subInfo.unsubscribe_all}checked="checked"{/if}/> <a href="{$nl.display_url}"/>{$nl.title}</a> <br/>
+ {if $nl.allow_user_sub}<input type="checkbox" name="nl_content_id[]" value="{$nlId}" {if !$unsubs.$nlId && !$subInfo.unsubscribe_all}checked="checked"{/if}/>{/if} <a href="{$nl.display_url}"/>{$nl.title}</a> <br/>
{foreachelse}
{tr}No newsletters were found{/tr}
{/foreach}
diff --git a/templates/view_edition.tpl b/templates/view_edition.tpl
index 3ba9247..f134159 100644
--- a/templates/view_edition.tpl
+++ b/templates/view_edition.tpl
@@ -6,8 +6,9 @@
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?edition_id={$gContent->mEditionId}">{biticon ipackage=liberty iname="edit" iexplain="edit"}</a>
<a href="{$smarty.const.NEWSLETTERS_PKG_URL}edition_edit.php?edition_id={$gContent->mEditionId}&amp;remove=1">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
{/if}
-
- <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php?edition_id={$gContent->mEditionId}">{biticon ipackage=liberty iname="mail_send" iexplain="email this post"}</a>
+ {if $gBitUser->hasPermission('bit_p_admin_newsletters')}
+ <a href="{$smarty.const.NEWSLETTERS_PKG_URL}admin/send.php?edition_id={$gContent->mEditionId}">{biticon ipackage=liberty iname="mail_send" iexplain="email this post"}</a>
+ {/if}
</div>
<div class="header">