You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
postfixadmin/templates/list-virtual_mailbox.tpl

93 lines
3.4 KiB
Smarty

{#tr_header#}
{if $CONF.show_status===YES}<td></td>{/if}
<td>{$PALANG.pOverview_mailbox_username}</td>
{if $display_mailbox_aliases==true}
<td>{$PALANG.pOverview_alias_goto}</td>
{/if}
<td>{$PALANG.pOverview_mailbox_name}</td>
{if $CONF.quota===YES}<td>{$PALANG.pOverview_mailbox_quota}</td>{/if}
<td>{$PALANG.pOverview_mailbox_modified}</td>
<td>{$PALANG.pOverview_mailbox_active}</td>
{assign var="colspan" value="`$colspan-6`"}
<td colspan="{$colspan}">&nbsp;</td>
</tr>
{foreach from=$tMailbox item=item key=i}
{#tr_hilightoff#}
{if $CONF.show_status===YES}
<td>{$gen_show_status_mailbox[$i]}</td>
{/if}
<td>
{if $search eq ""}
{$item.username}
{else}
{$item.username|replace:$search:"<span class='searchresult'>$search</span>"}
{/if}
</td>
{if $display_mailbox_aliases==true}
<td>
{if $item.goto_mailbox == 1}
Mailbox<br/>
{else}
Forward only<br/>
{/if}
{foreach from=$item.goto_other item=item2 key=j}
{if $search eq ""}
{$item2}
{else}
{$item2|replace:$search:"<span class='searchresult'>$search</span>"}
{/if}
<br/>
{/foreach}
</td>
{/if}
<td>{$item.name}</td>
{if $CONF.quota===YES}
<td>
{if $item.quota==0}
{$PALANG.pOverview_unlimited}
{elseif $item.quota<0}
{$PALANG.pOverview_disabled}
{else}
{if $boolconf_used_quotas}
{if $divide_quota.quota_width[$i]>90}
{assign var="quota_level" value="high"}
{elseif $divide_quota.quota_width[$i]>55}
{assign var="quota_level" value="mid"}
{else}
{assign var="quota_level" value="low"}
{/if}
<div class="quota quota_{$quota_level}" style="width:{$divide_quota.quota_width[$i]}px;"></div>
<div class="quota_bg"></div></div>
<div class="quota_text quota_text_{$quota_level}">{$divide_quota.current[$i]} / {$divide_quota.quota[$i]}</div>
{/if}
{/if}
</td>
{/if}
<td>{$item.modified}</td>
<td><a href="edit-active.php?username={$item.username|escape:"url"}&amp;domain={$fDomain|escape:"url"}">{if $item.active==1}{$PALANG.YES}{else}{$PALANG.NO}{/if}</a></td>
{if $CONF.vacation_control_admin===YES && $CONF.vacation===YES}
{if $item.v_active!==-1}
{if $item.v_active==1}
{assign var="v_active" value=$PALANG.pOverview_vacation_edit}
{else}
{assign var="v_active" value=$PALANG.pOverview_vacation_option}
{/if}
Merge users/vacation.php and edit-vacation.php into vacation.php vacation.php - result of merging edit-vacation.php and users/vacation.php - vacation.php comes with the svn history of edit-vacation.php - display "vacation already active" (only) in user mode if vacation is active (would be useful in admin mode too, but needs a text change) - various comment updates - add username in $PALANG[pVacation_result_removed] and $PALANG[pVacation_result_added] using sprintf - change compared to Jan Kruis' patch: - set return url for users to main.php instead of users/main.php - set return url for admins after setting $fDomain. Otherwise the return url does not contain the domain. - removed unused variable $tDomain users/vacation.php: - require(../vacation.php) - remove everything else - whitespace changes in the license header - note: this is completely different from Jan Kruis' patch - his intention was to remove this file and use ../vacation.php. However, with his way all links in the users menu would point to the wrong place/directory edit-vacation.php: - deleted templates/vacation.tpl - display username only in admin mode templates/list-virtual_mailbox.tpl - link changed to merged vacation.php languages/en.lang - add username in $PALANG[pVacation_result_removed] and $PALANG[pVacation_result_added] as sprintf variable - (comments added by Jan Kruis' patch are not part of this commit) languages/nl.lang - translation updates - already contains the sprintf variable in $PALANG[pVacation_result_removed] and $PALANG[pVacation_result_added] (updates for other *.lang files follow in another commit) The following parts of Jan Kruis' patch are not part of this commit: - rejected: - variables.inc.php: don't add $Admin_role and $Return_url If we initialize them, it should be done directly in (edit-)vacation.php, but the current code always sets them already in all cases. - templates/users_main.tpl: do not change url for vacation.php - postponed: - added comments in en.lang about obsolete texts Most parts of this commit (see exceptions above) were provided as patch by Jan Kruis (jan-kruis@SF), see https://sourceforge.net/tracker/?func=detail&aid=3383236&group_id=191583&atid=937966 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1169 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
<td><a href="vacation.php?username={$item.username|escape:"url"}&amp;domain={$fDomain|escape:"url"}">{$v_active}</a></td>
{/if}
{else}
<td>&nbsp;</td>
{/if}
{assign var="edit_aliases" value=0}
{if $authentication_has_role.global_admin!==true && $CONF.alias_control_admin===YES}{assign var="edit_aliases" value=1}{/if}
{if $authentication_has_role.global_admin==true && $CONF.alias_control===YES}{assign var="edit_aliases" value=1}{/if}
{if $edit_aliases==1}
<td><a href="edit-alias.php?address={$item.username|escape:"url"}&amp;domain={$fDomain|escape:"url"}">{$PALANG.pOverview_alias_edit}</a></td>
{/if}
<td><a href="edit-mailbox.php?username={$item.username|escape:"url"}&amp;domain={$fDomain|escape:"url"}">{$PALANG.edit}</a></td>
<td><a href="delete.php?table=mailbox&amp;delete={$item.username|escape:"url"}&amp;domain={$fDomain|escape:"url"}" onclick="return confirm ('{$PALANG.confirm}{$PALANG.pOverview_get_mailboxes}: {$item.username}');">{$PALANG.del}</a></td>
</tr>
{/foreach}
</table>