{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>
<TABLE class="lmsbox">
    <THEAD>
	<TR>
		<TD width="1%">
			<IMG src="img/alias.gif" alt="">
		</TD>
		<TD width="1%">
			<B>{trans("Login:")}</B>
		</TD>
		<TD width="98%">
			<B>{if $alias.login ne ""}{$alias.login}{else}{trans("(domain alias)")}{/if}</B>
		</TD>
	</TR>
    </THEAD>
    <TBODY>
	<TR>
		<TD width="1%">
			<IMG src="img/domain.gif" alt="">
		</TD>
		<TD width="1%">
			<B>{trans("Domain:")}</B>
		</TD>
		<TD width="98%">
			<a href="?m=domaininfo&id={$alias.domainid}">{$alias.domain}</a>
		</TD>
	</TR>
	<TR>
		<TD width="1%">
			<IMG src="img/account.gif" alt="">
		</TD>
		<TD width="1%">
			<B>{trans("Destination:")}</B>
		</TD>
		<TD width="98%">
			{foreach from=$alias.accounts item=account}
			<A href="?m=accountinfo&id={$account.id}">{$account.login}@{$account.domain}</A><BR>
			{/foreach}
		</TD>
	</TR>
	<TR>
		<TD width="1%">
			<IMG src="img/forward.gif" alt="">
		</TD>
		<TD width="1%" NOWRAP>
			<B>{trans("Forward e-mail:")}</B>
		</TD>
		<TD width="98%">
			{foreach from=$alias.mailforwards item=mailforward}
			{$mailforward}<BR>
			{/foreach}
		</TD>
	</TR>
	<TR>
		<TD colspan="3" align="right" nowrap>
			<A href="?m=aliasedit&id={$alias.id}" accesskey="e">{trans("Edit")} <IMG SRC="img/save.gif" ALT=""></A>
			<A id="delete-alias" href="?m=aliasdel&id={$alias.id}">{trans("Delete")} <IMG SRC="img/delete.gif" ALT=""></A>
		</TD>
	</TR>
    </TBODY>
</TABLE>
</FORM>
	<script>
		$('#delete-alias').click(function() {
			confirmDialog($t("Are you sure, you want to delete that alias?"), this).done(function() {
				location.href = $(this).attr('href');
			});
			return false;
		});
	</script>
{/block}
