{* $Id: discount_users.tpl 1755 2006-05-12 11:20:11Z zeke $ *} {** discounted users section **}
{capture name="mainbox"}
{include file="discounts_pages/discount_details.tpl" discount=$discount}

{if 'manage_discounts'|fn_check_privileges:true} {include file="buttons/update.tpl" but_onclick="javascript: document.discounted_users_form.submit()" but_type="input"} {/if}

{include file="common_templates/subheader.tpl" title=$lang.defined_dsicounted_users} {* LIST OF USERS ASSIGNED TO DISCOUNT *} {if $discounted_users} {foreach from=$discounted_users item=user} {/foreach}
{$lang.id} {$lang.username} {$lang.name} {$lang.registered} {$lang.type} {$lang.active}
 {$user.user_id}  {$user.user_login} {$user.firstname} {$user.lastname} {$user.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"} {if $user.user_type == 'A'}{$lang.administrator}{elseif $user.user_type == 'C'}{$lang.customer}{/if}
{if 'manage_discounts'|fn_check_privileges:true}

{include file="buttons/delete_selected.tpl" but_onclick="javascript: fn_delete_selected('discounted_users_form', 'delete_discounted_users');"}

{/if} {else}

{$lang.text_no_users_defined}

{/if} {* //LIST OF USERS ASSIGNED TO DISCOUNT *}


{include file="common_templates/subheader.tpl" title=$lang.add_users_to_section} {include file="profiles_pages/profiles_scripts.tpl"} {include file="profiles_pages/user_search.tpl" target="discounts" mode="users" action="search" discount_id=$discount.discount_id} {if $users}
{include file="common_templates/pagination.tpl"} {foreach from=$users item=user} {/foreach}
{$lang.id} {$lang.username} {$lang.name} {$lang.registered} {$lang.type} {$lang.active}
 {$user.user_id}  {$user.user_login} {$user.firstname} {$user.lastname} {$user.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"} {if $user.user_type == 'A'}{$lang.administrator}{elseif $user.user_type == 'C'}{$lang.customer}{/if}
{include file="common_templates/pagination.tpl"} {if 'manage_discounts'|fn_check_privileges:true}

{include file="buttons/button.tpl" but_text=$lang.add_users action_but="action_" but_onclick="javascript: if (fn_check_selected('add_discounted_users','add_user')) document.add_discounted_users.submit();"}

{/if}
{/if} {/capture} {include file="common_templates/mainbox.tpl" title=$lang.discounted_users content=$smarty.capture.mainbox} {** /discounted users section **}