{strip}
{bithelp}

{tr}Newsletter Settings{/tr}

{if !$newsletters || $gContent->isValid() || $smarty.request.new} {form legend="Create / Edit Newsletters"} {if $individual eq 'y'} {tr}There are individual permissions set for this newsletter{/tr}

{/if}
{formlabel label="Title" for="title"} {forminput} {formhelp note="Title of the newsletter."} {/forminput}
{formlabel label="Description" for="description"} {forminput} {formhelp note="Description of the newsletter, that users know what they are getting themselves into."} {/forminput}
{formlabel label="Users can Subscribe" for="allow_user_sub"} {forminput} 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}
{formlabel label="Any e-mail Address" for="allow_any_sub"} {forminput} mInfo.allow_any_sub eq 'y'}checked="checked"{/if} /> {formhelp note="Users may subscribe using any email address."} {/forminput}
{formlabel label="Append Un/Subscribe Instructions" for="unsub_msg"} {forminput} 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}
{formlabel label="Validate e-mail Addresses" for="validate_addr"} {forminput} 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}
{/form} {else} {minifind} {foreach key=nlId from=$newsletters item=nl} {foreachelse} {/foreach}
{tr}Newsletters{/tr}
{smartlink ititle="Name" isort=name offset=$offset} {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="Unsubscribed" isort=users offset=$offset} {tr}Action{/tr}
{$nl.title} {$nl.data} {$nl.created|bit_short_date} {$nl.last_sent|bit_short_date} {$nl.unsub_count|default:0} {biticon ipackage=liberty iname=new iexplain="New Edition"} {biticon ipackage=liberty iname=delete iexplain=Remove} {biticon ipackage=liberty iname=edit iexplain=Edit} {if $channels[user].individual eq 'y'}({/if}{biticon ipackage=liberty iname=permissions iexplain=Permissions}{if $nl.individual eq 'y'}){/if}
{tr}No Records Found{/tr}
{if $gBitUser->hasPermission('bit_p_create_newsletters')} Create new newsletter {/if} {pagination} {/if}
{/strip}