From adc038e218b5dd03311734950912cc1aa5b32624 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 6 Apr 2015 21:58:58 +0000 Subject: [PATCH] list.tpl: - add support for list_header (like ":: Alias" in list-virtual) PFAHandler: - add empty default for $msg['list_header'] git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1776 a1433add-5e2c-0410-b055-b7f2511e0802 --- model/PFAHandler.php | 1 + templates/list.tpl | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/model/PFAHandler.php b/model/PFAHandler.php index e48db32a..096ce03d 100644 --- a/model/PFAHandler.php +++ b/model/PFAHandler.php @@ -119,6 +119,7 @@ abstract class PFAHandler { protected $msg = array( 'can_create' => True, 'confirm_delete' => 'confirm', + 'list_header' => '', # headline used in list view ); # called via another *Handler class? (use calledBy() to set this information) diff --git a/templates/list.tpl b/templates/list.tpl index a46d9e2a..6881e93d 100644 --- a/templates/list.tpl +++ b/templates/list.tpl @@ -29,6 +29,18 @@
+{if $msg.list_header} + {assign var="colcount" value=2} + {foreach key=key item=field from=$struct} + {if $field.display_in_list == 1 && $field.label}{* don't show fields without a label *} + {assign var="colcount" value=$colcount+1} + {/if} + {/foreach} + + + +{/if} + {foreach key=key item=field from=$struct} {if $field.display_in_list == 1 && $field.label}{* don't show fields without a label *}
{$PALANG.{$msg.list_header}}