Use list.tpl to display the alias list
list-virtual.php:
- use list.tpl for aliases
- move show_gen_status handling for aliases to AliasHandler
AliasHandler:
- initStruct():
- add 'status' column (hidden by default)
- hide 'created'
- move 'active' after 'modified' to match old list-virtual.php layout
- initMsg: add list_header
- webformConfig(): if $CONF[show_status], set display_in_list for
'status' column. Also set a (whitespace) label to make sure it's
displayed
- db_read_from_db_postprocess(): if 'status' column is requested, call
gen_show_status() for each row
list-virtual.tpl
- remove alias table header and create alias button (which should have
been in list-virtual_alias.tpl)
list-virtual_alias.tpl:
- replace code to generate the alias table with {include 'list.tpl'}
(and some variable assignments)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1777 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
parent
adc038e218
commit
37bba15625
@ -1,58 +1,10 @@
|
||||
{if isset($search._)}
|
||||
{assign var="search" value=$search._}
|
||||
{else}
|
||||
{assign var="search" value=''}
|
||||
{/if}
|
||||
|
||||
{#tr_header#}
|
||||
{if $CONF.show_status===YES}
|
||||
<td></td>
|
||||
{/if}
|
||||
<td>{$PALANG.pOverview_alias_address}</td>
|
||||
<td>{$PALANG.to}</td>
|
||||
<td>{$PALANG.last_modified}</td>
|
||||
<td>{$PALANG.active}</td>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
{foreach from=$tAlias item=item key=i}
|
||||
{#tr_hilightoff#}
|
||||
{if $CONF.show_status===YES}
|
||||
<td>{$gen_show_status[$i]}</td>
|
||||
{/if}
|
||||
<td>
|
||||
{if $search eq ""}
|
||||
{$item.address}
|
||||
{else}
|
||||
{$item.address|replace:$search:"<span class='searchresult'>$search</span>"}
|
||||
{/if}
|
||||
</td>
|
||||
{if $CONF.alias_goto_limit>0}
|
||||
<td><i>sorry, alias_goto_limit > 0 not handled</i></td>
|
||||
{else}
|
||||
<td>
|
||||
{foreach key=key2 item=singlegoto from=$item.goto}
|
||||
|
||||
{if $search eq ""}
|
||||
{$singlegoto}<br />
|
||||
{else}
|
||||
{$singlegoto|replace:$search:"<span class='searchresult'>$search</span>"}<br />
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
</td>
|
||||
{/if}
|
||||
<td>{$item.modified}</td>
|
||||
{if $item._can_edit}
|
||||
<td><a href="{#url_editactive#}alias&id={$item.address|escape:"url"}&active={if ($item.active==0)}1{else}0{/if}&token={$smarty.session.PFA_token|escape:"url"}"
|
||||
>{if $item.active==1}{$PALANG.YES}{else}{$PALANG.NO}{/if}</a></td>
|
||||
<td><a href="{#url_create_alias#}&edit={$item.address|escape:"url"}">{$PALANG.edit}</a></td>
|
||||
<td><a href="delete.php?table=alias&delete={$item.address|escape:"url"}&token={$smarty.session.PFA_token|escape:"url"}"
|
||||
onclick="return confirm ('{$PALANG.confirm}{$PALANG.aliases}: {$item.address}');">{$PALANG.del}</a></td>
|
||||
{else}
|
||||
<td>{if $item.active==1}{$PALANG.YES}{else}{$PALANG.NO}{/if}</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{assign var="table" value='alias'}
|
||||
{assign var="struct" value=$alias_data.struct}
|
||||
{assign var="msg" value=$alias_data.msg}
|
||||
{assign var="id_field" value=$msg.id_field}
|
||||
{assign var="formconf" value=$alias_data.formconf}
|
||||
{assign var="items" value=$tAlias}
|
||||
{assign var="RAW_items" value=$RAW_tAlias}
|
||||
|
||||
{include 'list.tpl'}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue