From 36d747832efcdfde623c12e7e6101bbdd7df3ad1 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sun, 27 Sep 2020 20:45:53 +0100 Subject: [PATCH] reindent some html --- templates/bootstrap/editform.tpl | 148 ++++++++------- templates/bootstrap/flash_error.tpl | 42 ++--- templates/bootstrap/footer.tpl | 30 +-- templates/bootstrap/header.tpl | 44 ++--- templates/bootstrap/index.tpl | 51 ++--- templates/bootstrap/list-virtual.tpl | 197 +++++++++++--------- templates/bootstrap/login.tpl | 106 ++++++----- templates/bootstrap/main.tpl | 64 +++---- templates/bootstrap/menu.tpl | 226 ++++++++++++----------- templates/bootstrap/password-change.tpl | 53 +++--- templates/bootstrap/password-recover.tpl | 48 ++--- templates/bootstrap/password.tpl | 70 +++---- templates/bootstrap/sendmail.tpl | 60 +++--- templates/bootstrap/users_edit-alias.tpl | 70 +++---- templates/bootstrap/users_main.tpl | 46 ++--- templates/bootstrap/users_menu.tpl | 53 +++--- templates/bootstrap/vacation.tpl | 162 ++++++++-------- templates/bootstrap/viewlog.tpl | 64 +++---- 18 files changed, 798 insertions(+), 736 deletions(-) diff --git a/templates/bootstrap/editform.tpl b/templates/bootstrap/editform.tpl index c0e8ae83..a5e0fd1a 100644 --- a/templates/bootstrap/editform.tpl +++ b/templates/bootstrap/editform.tpl @@ -1,84 +1,80 @@
-
-

{$formtitle}

-
- - +
+

{$formtitle}

+
+ + -{foreach key=key item=field from=$struct} - {if $field.display_in_form == 1} + {foreach key=key item=field from=$struct} + {if $field.display_in_form == 1} - {if $table == 'foo' && $key == 'bar'} -
Special handling (complete table row) for {$table} / {$key}
- {else} -
- -
- {if $field.editable == 0} - {if $field.type == 'enma'} - {$struct.{$key}.options.{$value_{$key}}} - {else} - {$value_{$key}} - {/if} - {else} - {if $table == 'foo' && $key == 'bar'} - Special handling (td content) for {$table} / {$key} - {elseif $field.type == 'bool'} -
- {elseif $field.type == 'enum'} - - {elseif $field.type == 'enma'} - - {elseif $field.type == 'list'} - + {if $table == 'foo' && $key == 'bar'} +
Special handling (complete table row) for {$table} / {$key}
+ {else} +
+ +
+ {if $field.editable == 0} + {if $field.type == 'enma'} + {$struct.{$key}.options.{$value_{$key}}} + {else} + {$value_{$key}} + {/if} + {else} + {if $table == 'foo' && $key == 'bar'} + Special handling (td content) for {$table} / {$key} + {elseif $field.type == 'bool'} +
+ {elseif $field.type == 'enum'} + + {elseif $field.type == 'enma'} + + {elseif $field.type == 'list'} + + {elseif $field.type == 'pass' || $field.type == 'b64p'} + + {elseif $field.type == 'txtl'} + + {else} + + {/if} + {/if} - - {elseif $field.type == 'pass' || $field.type == 'b64p'} - - {elseif $field.type == 'txtl'} - - {else} - - {/if} - {/if} + {if $table == 'foo' && $key == 'bar'} + Special handling (td content) for {$table} / {$key} + {else} + {if $fielderror.{$key}} + {$fielderror.{$key}} + {else} + {$field.desc} + {/if} + {/if} +
+
+ {/if} - {if $table == 'foo' && $key == 'bar'} - Special handling (td content) for {$table} / {$key} - {else} - {if $fielderror.{$key}} - {$fielderror.{$key}} - {else} - {$field.desc} - {/if} - {/if} -
-
- {/if} + {/if} + {/foreach} - {/if} -{/foreach} +
+ -
- - -
+
diff --git a/templates/bootstrap/flash_error.tpl b/templates/bootstrap/flash_error.tpl index 1f91df49..627a35f0 100644 --- a/templates/bootstrap/flash_error.tpl +++ b/templates/bootstrap/flash_error.tpl @@ -1,24 +1,24 @@ -

+

{strip} - {if isset($smarty.session.flash)} - {if isset($smarty.session.flash.info)} - - {/if} - {if isset($smarty.session.flash.error)} - - {/if} - {/if} + {if isset($smarty.session.flash)} + {if isset($smarty.session.flash.info)} + + {/if} + {if isset($smarty.session.flash.error)} + + {/if} + {/if} {/strip} diff --git a/templates/bootstrap/footer.tpl b/templates/bootstrap/footer.tpl index 6c38c053..97562584 100644 --- a/templates/bootstrap/footer.tpl +++ b/templates/bootstrap/footer.tpl @@ -1,20 +1,22 @@ diff --git a/templates/bootstrap/header.tpl b/templates/bootstrap/header.tpl index 6760cf7f..d68edb78 100644 --- a/templates/bootstrap/header.tpl +++ b/templates/bootstrap/header.tpl @@ -1,31 +1,21 @@ - - - - - + + + + + - Postfix Admin - {$smarty.server.HTTP_HOST} - - - {if $CONF.theme_custom_css} - - {/if} - - - - - - - {*** -
-
- -{if $CONF.show_header_text==='YES' && $CONF.header_text} -

{$CONF.header_text}

-{/if} -

test

-
- ***} + Postfix Admin - {$smarty.server.HTTP_HOST} + + + {if $CONF.theme_custom_css} + + {/if} + + + + + + diff --git a/templates/bootstrap/index.tpl b/templates/bootstrap/index.tpl index 0d178e23..9a272d2b 100644 --- a/templates/bootstrap/index.tpl +++ b/templates/bootstrap/index.tpl @@ -1,29 +1,30 @@ {strip} -{include file="header.tpl"} -{if $smarty_template !== 'login' && $smarty_template !== 'password-recover' && $smarty_template !== 'password-change'} - {config_load file="menu.conf" section=$smarty_template} - {if $authentication_has_role.user} - {include file='users_menu.tpl'} - {else} - {include file='menu.tpl'} - {/if} -{/if} -
-{if $authentication_has_role.user && $CONF.motd_user} -
{$CONF.motd_user}
-{elseif $authentication_has_role.global_admin && $CONF.motd_superadmin} -
{$CONF.motd_superadmin}
-{elseif $authentication_has_role.admin && $CONF.motd_admin} -
{$CONF.motd_admin}
-{/if} + {include file="header.tpl"} + {if $smarty_template !== 'login' && $smarty_template !== 'password-recover' && $smarty_template !== 'password-change'} + {config_load file="menu.conf" section=$smarty_template} + {if $authentication_has_role.user} + {include file='users_menu.tpl'} + {else} + {include file='menu.tpl'} + {/if} + {/if} +
+ {if $authentication_has_role.user && $CONF.motd_user} +
{$CONF.motd_user}
+ {elseif $authentication_has_role.global_admin && $CONF.motd_superadmin} +
{$CONF.motd_superadmin}
+ {elseif $authentication_has_role.admin && $CONF.motd_admin} +
{$CONF.motd_admin}
+ {/if} -{include file='flash_error.tpl'} -{if $smarty_template} - {include file="$smarty_template.tpl"} -{else} -

Template not found

({$smarty.server.PHP_SELF|escape:"html"}) -{/if} -
-{include file='footer.tpl'} + {include file='flash_error.tpl'} + {if $smarty_template} + {include file="$smarty_template.tpl"} + {else} +

Template not found

+ ({$smarty.server.PHP_SELF|escape:"html"}) + {/if} +
+ {include file='footer.tpl'} {/strip} diff --git a/templates/bootstrap/list-virtual.tpl b/templates/bootstrap/list-virtual.tpl index 8cfc2778..61460654 100644 --- a/templates/bootstrap/list-virtual.tpl +++ b/templates/bootstrap/list-virtual.tpl @@ -1,101 +1,126 @@ {assign var="file" value=$smarty.config.url_list_virtual}
-
-
-
- {html_options name='domain' class='form-control' output=$domain_list values=$domain_list selected=$domain_selected onchange="this.form.submit();"} - - -
-
-
{#form_search#}
-
-
-
-{if isset($search._)} -

{$PALANG.pSearch_welcome} {$search._}

-{else} -

{$PALANG.pOverview_welcome}{$fDomain} :

-
    -
  • {$PALANG.aliases}: {$limit.alias_count} / {$limit.aliases}
  • -
  • {$PALANG.mailboxes}: {$limit.mailbox_count} / {$limit.mailboxes}
  • -
-{/if} -
-
-
{$PALANG.show} - {if isset($search._)} - {assign var="searchsuffix" value="&search[_]={$search._}"} - {else} - {assign var="searchsuffix" value=""} - {/if} +
+
+
+
+ {html_options name='domain' class='form-control' output=$domain_list values=$domain_list selected=$domain_selected onchange="this.form.submit();"} + + +
+
+
{#form_search#}
+
+
+
+
+ {if isset($search._)} +

{$PALANG.pSearch_welcome} {$search._}

+ {else} +

{$PALANG.pOverview_welcome}{$fDomain} :

+
    +
  • {$PALANG.aliases}: {$limit.alias_count} / {$limit.aliases}
  • +
  • {$PALANG.mailboxes}: {$limit.mailbox_count} / {$limit.mailboxes}
  • +
+ {/if} +
+
+
+
{$PALANG.show} + {if isset($search._)} + {assign var="searchsuffix" value="&search[_]={$search._}"} + {else} + {assign var="searchsuffix" value=""} + {/if} - {if $tab=='all'}{$PALANG.all} - {else}{$PALANG.all}{/if} - {if $tab=='mailbox'}{$PALANG.pOverview_mailbox_title} - {else}{$PALANG.pOverview_mailbox_title}{/if} - {if $tab=='alias'}{$PALANG.pOverview_alias_title} - {else}{$PALANG.pOverview_alias_title}{/if} - {if $boolconf_alias_domain} - {if $tab=='alias_domain'}{$PALANG.pOverview_alias_domain_title} - {else}{$PALANG.pOverview_alias_domain_title}{/if} - {/if} -
-
+ {if $tab=='all'}{$PALANG.all} + {else}{$PALANG.all}{/if} + {if $tab=='mailbox'}{$PALANG.pOverview_mailbox_title} + {else}{$PALANG.pOverview_mailbox_title}{/if} + {if $tab=='alias'}{$PALANG.pOverview_alias_title} + {else}{$PALANG.pOverview_alias_title}{/if} + {if $boolconf_alias_domain} + {if $tab=='alias_domain'}{$PALANG.pOverview_alias_domain_title} + {else}{$PALANG.pOverview_alias_domain_title}{/if} + {/if} +
+
+

{*** Domain Aliases ***} {if $boolconf_alias_domain} - {if $tab=='alias_domain' || $tab=='all'} - {include file="list-virtual_alias_domain.tpl"} - {/if} + {if $tab=='alias_domain' || $tab=='all'} + {include file="list-virtual_alias_domain.tpl"} + {/if} +{/if} +{if $tab=='all'} +
+
{/if} -{if $tab=='all'}

{/if} {*** Aliases ***} {if $tab=='alias' || $tab=='all'} - {$nav_bar_alias.top} - {include file="list-virtual_alias.tpl"} - {$nav_bar_alias.bottom} + {$nav_bar_alias.top} + {include file="list-virtual_alias.tpl"} + {$nav_bar_alias.bottom} +{/if} +{if $tab=='all'} +
+
{/if} -{if $tab=='all'}

{/if} {if $tab=='mailbox' || $tab=='all'} -
- {$nav_bar_mailbox.top} - {assign var="colspan" value=9} - {if $CONF.vacation_control_admin===YES}{assign var="colspan" value="`$colspan+1`"}{/if} - {if $CONF.alias_control_admin===YES}{assign var="colspan" value="`$colspan+1`"}{/if} - - - - - - - {if $tMailbox} - {include file="list-virtual_mailbox.tpl"} - {else}
{$PALANG.pOverview_mailbox_title}
- {/if} - -
+
+ {$nav_bar_mailbox.top} + {assign var="colspan" value=9} + {if $CONF.vacation_control_admin===YES}{assign var="colspan" value="`$colspan+1`"}{/if} + {if $CONF.alias_control_admin===YES}{assign var="colspan" value="`$colspan+1`"}{/if} + + + + + + + {if $tMailbox} + {include file="list-virtual_mailbox.tpl"} + {else}
{$PALANG.pOverview_mailbox_title}
+ {/if} + +
{/if} {if $CONF.show_status===YES && $CONF.show_status_key===YES} -

- {if $CONF.show_undeliverable===YES} -  {$CONF.show_status_text}={$PALANG.pStatus_undeliverable} - {/if} - {if $CONF.show_popimap===YES} -  {$CONF.show_status_text}={$PALANG.pStatus_popimap} - {/if} - {if $CONF.show_custom_domains|@count>0} - {foreach from=$CONF.show_custom_domains item=item key=i} -  {$CONF.show_status_text}={$PALANG.pStatus_custom}{$item} - {/foreach} - {/if} +
+
+ {if $CONF.show_undeliverable===YES} +   + {$CONF.show_status_text} + ={$PALANG.pStatus_undeliverable} + {/if} + {if $CONF.show_popimap===YES} +   + {$CONF.show_status_text} + ={$PALANG.pStatus_popimap} + {/if} + {if $CONF.show_custom_domains|@count>0} + {foreach from=$CONF.show_custom_domains item=item key=i} +   + {$CONF.show_status_text} + ={$PALANG.pStatus_custom}{$item} + {/foreach} + {/if} {/if} diff --git a/templates/bootstrap/login.tpl b/templates/bootstrap/login.tpl index 68a1e578..090dadf9 100644 --- a/templates/bootstrap/login.tpl +++ b/templates/bootstrap/login.tpl @@ -1,57 +1,61 @@
-

{if $logintype=='admin'}{$PALANG.pLogin_welcome} -{else}{$PALANG.pUsersLogin_welcome} -{/if}

-
- -{if $logintype == 'admin'} -
- -{/if} -
-{literal} - -{/literal} +

{if $logintype=='admin'}{$PALANG.pLogin_welcome} + {else}{$PALANG.pUsersLogin_welcome} + {/if}

+
+ + {if $logintype == 'admin'} +
+ + {/if} +
+ {literal} + + {/literal}
diff --git a/templates/bootstrap/main.tpl b/templates/bootstrap/main.tpl index d79dd469..4dd00a9d 100644 --- a/templates/bootstrap/main.tpl +++ b/templates/bootstrap/main.tpl @@ -1,36 +1,36 @@ diff --git a/templates/bootstrap/menu.tpl b/templates/bootstrap/menu.tpl index 4d27c4a3..2248359f 100644 --- a/templates/bootstrap/menu.tpl +++ b/templates/bootstrap/menu.tpl @@ -1,109 +1,129 @@ {strip} -{if !empty($smarty.get) && !empty($smarty.get.domain)} -{*** zuweisung muss eleganter gehen ***} - {assign var="url_domain" value=$smarty.get.domain} - {assign var="url_domain" value="&domain={$url_domain|escape:url}"} -{/if} + {if !empty($smarty.get) && !empty($smarty.get.domain)} + {*** zuweisung muss eleganter gehen ***} + {assign var="url_domain" value=$smarty.get.domain} + {assign var="url_domain" value="&domain={$url_domain|escape:url}"} + {/if} {/strip} {strip} - + {/strip} diff --git a/templates/bootstrap/password-change.tpl b/templates/bootstrap/password-change.tpl index 1c7e99f9..10293236 100644 --- a/templates/bootstrap/password-change.tpl +++ b/templates/bootstrap/password-change.tpl @@ -1,28 +1,29 @@
-
- - - - - - - - - - - - - - - - - - - - - - - -

{$PALANG.pPassword_welcome}

{$PALANG.pLogin_username} :
{$PALANG.pPassword_password_code} :
{$PALANG.pPassword_password} :
{$PALANG.pPassword_password2} :
-
+
+ + + + + + + + + + + + + + + + + + + + + + + +

{$PALANG.pPassword_welcome}

{$PALANG.pLogin_username} :
{$PALANG.pPassword_password_code} :
{$PALANG.pPassword_password} :
{$PALANG.pPassword_password2} :
+
diff --git a/templates/bootstrap/password-recover.tpl b/templates/bootstrap/password-recover.tpl index ebe0b017..5ab378b2 100644 --- a/templates/bootstrap/password-recover.tpl +++ b/templates/bootstrap/password-recover.tpl @@ -1,26 +1,26 @@
-
- - - - - - - - - - - - -
{$PALANG.pPassword_recovery_title}
  - -
-
-{literal} - -{/literal} +
+ + + + + + + + + + + + +
{$PALANG.pPassword_recovery_title}
  + +
+
+ {literal} + + {/literal}
diff --git a/templates/bootstrap/password.tpl b/templates/bootstrap/password.tpl index 0ba02c14..620f3b97 100644 --- a/templates/bootstrap/password.tpl +++ b/templates/bootstrap/password.tpl @@ -1,36 +1,40 @@
-
-

{$PALANG.pPassword_welcome}

-
- -
- -

{$SESSID_USERNAME}

-
-
- -
- {$pPassword_password_current_text} -
-
- -
- {$pPassword_password_text} -
-
- -
-
-
- diff --git a/templates/bootstrap/sendmail.tpl b/templates/bootstrap/sendmail.tpl index d88e1d33..b97ff029 100644 --- a/templates/bootstrap/sendmail.tpl +++ b/templates/bootstrap/sendmail.tpl @@ -1,31 +1,33 @@
-
-

{$PALANG.pSendmail_welcome}

-
- -
- -

{$smtp_from_email}

-
-
- -
-
-
- -
-
-
- -
-
-
- -
+
+

{$PALANG.pSendmail_welcome}

+
+ +
+ +

{$smtp_from_email}

+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
diff --git a/templates/bootstrap/users_edit-alias.tpl b/templates/bootstrap/users_edit-alias.tpl index fa07e309..1d267605 100644 --- a/templates/bootstrap/users_edit-alias.tpl +++ b/templates/bootstrap/users_edit-alias.tpl @@ -1,48 +1,50 @@
-
-

{$PALANG.pEdit_alias_welcome}

-
- -

{$PALANG.pEdit_alias_help}

-
+
+

{$PALANG.pEdit_alias_welcome}

+
+ +

{$PALANG.pEdit_alias_help}

+

{$USERID_USERNAME}

-
-
+
+
-
-
-
+
+
+
-
- -
-
- -
-
-
-
- -
-
+ +
diff --git a/templates/bootstrap/users_main.tpl b/templates/bootstrap/users_main.tpl index a4310aa8..e07a6b16 100644 --- a/templates/bootstrap/users_main.tpl +++ b/templates/bootstrap/users_main.tpl @@ -1,24 +1,26 @@ diff --git a/templates/bootstrap/users_menu.tpl b/templates/bootstrap/users_menu.tpl index 06938601..478765b2 100644 --- a/templates/bootstrap/users_menu.tpl +++ b/templates/bootstrap/users_menu.tpl @@ -1,27 +1,30 @@ diff --git a/templates/bootstrap/vacation.tpl b/templates/bootstrap/vacation.tpl index edc2a12a..76b2dcd4 100644 --- a/templates/bootstrap/vacation.tpl +++ b/templates/bootstrap/vacation.tpl @@ -1,98 +1,108 @@
-
-

{$PALANG.pUsersVacation_welcome}

-
- - {if !$authentication_has_role.user} -
- -

{$tUseremail}

-
- {/if} +
+

{$PALANG.pUsersVacation_welcome}

+
+ + {if !$authentication_has_role.user}
- -
- -
- - -
-
+ +

{$tUseremail}

-
- -
- -
- - -
-
+ {/if} +
+ +
+ +
+ + +
-
- -
- -
+
+
+ +
+ +
+ + +
-
- -
- -
+
+
+ +
+
-
- -
- -
+
+
+ +
+
-
- -
+ +
{literal}