From 4a5f43f5f63e21cc85b0dbb5d686af6e3763c972 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 8 Sep 2014 03:29:30 -0700 Subject: [PATCH] set template permissions --- .../public_php/ams/templates/layout_admin.tpl | 4 ++-- .../public_php/ams/templates/layout_mod.tpl | 18 +++++++++++++++--- .../public_php/ams/templates/layout_user.tpl | 16 +++++++++------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/code/web/public_php/ams/templates/layout_admin.tpl b/code/web/public_php/ams/templates/layout_admin.tpl index d1d0901c5..82ee1fb6c 100644 --- a/code/web/public_php/ams/templates/layout_admin.tpl +++ b/code/web/public_php/ams/templates/layout_admin.tpl @@ -1,6 +1,6 @@ {extends file="layout.tpl"} {block name=menu} -{if $permission eq 3} + {if $permission eq 3}
  • Dashboard
  • Profile
  • @@ -15,6 +15,6 @@
  • Plugins
  • Syncing
  • Logout
  • -{/if} + {/if} {/block} diff --git a/code/web/public_php/ams/templates/layout_mod.tpl b/code/web/public_php/ams/templates/layout_mod.tpl index f5cc950b1..33005879c 100644 --- a/code/web/public_php/ams/templates/layout_mod.tpl +++ b/code/web/public_php/ams/templates/layout_mod.tpl @@ -1,17 +1,29 @@ {extends file="layout.tpl"} {block name=menu} -{if $permission > 1} + {if $permission eq 2}
  • Dashboard
  • Profile
  • Settings
  • - {if isset($hook_info)} {foreach from=$hook_info key=arrkey item=element}{if isset($element.menu_display)}
  • {$element.menu_display}
  • {/if]{/foreach}{/if} + {if isset($hook_info)} + {foreach from=$hook_info key=arrkey item=element} + {if isset($element.menu_display)} +
  • + + + {$element.menu_display} + +
  • + {/if} + {/foreach} + {/if}
  • Users
  • Queues
  • Support Groups
  • -{/if}
  • Logout
  • +
  • Logout
  • + {/if} {/block} diff --git a/code/web/public_php/ams/templates/layout_user.tpl b/code/web/public_php/ams/templates/layout_user.tpl index 845436e94..612b49002 100644 --- a/code/web/public_php/ams/templates/layout_user.tpl +++ b/code/web/public_php/ams/templates/layout_user.tpl @@ -1,11 +1,13 @@ {extends file="layout.tpl"} {block name=menu} - -
  • Profile
  • -
  • Settings
  • - {if isset($hook_info)} {foreach from=$hook_info key=arrkey item=element}{if isset($element.user_display)}
  • {$element.user_display}
  • {/if}{/foreach}{/if} - -
  • Create New Ticket
  • -
  • Logout
  • + {if $permission eq 1} + +
  • Profile
  • +
  • Settings
  • + {if isset($hook_info)} {foreach from=$hook_info key=arrkey item=element}{if isset($element.user_display)}
  • {$element.user_display}
  • {/if}{/foreach}{/if} + +
  • Create New Ticket
  • +
  • Logout
  • + {/if} {/block}