From 59794b93305f3dab3670fcc9f7446d26f76c2fd1 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Fri, 15 Jul 2005 22:04:57 +0000 Subject: [PATCH] Enhancements to the dialplan listing. Still feels clumsy... git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@61 06cd67b6-e706-0410-b29e-9de616bca6e9 --- shout.webprj | 82 +++++++++++++++--------------- templates/dialplan/dialplanlist.inc | 99 ++++++++++++++++++++++++------------- templates/menu.inc | 7 +++ templates/users/userlist.inc | 8 +-- 4 files changed, 118 insertions(+), 78 deletions(-) diff --git a/shout.webprj b/shout.webprj index dd0ba5589..9b650ad4c 100644 --- a/shout.webprj +++ b/shout.webprj @@ -9,57 +9,57 @@ - - - - + + + + - + - + - + - - - + + + - + - - - - + + + + - + - + - - + + - + - - + + - + - + @@ -80,16 +80,16 @@ -//w3c//dtd xhtml 1.0 strict//en - - - + + + - + - - + + - + Ben Klang ben@alkaloid.net Gubed @@ -102,17 +102,17 @@ - + - - - - - - - - - + + + + + + + + + diff --git a/templates/dialplan/dialplanlist.inc b/templates/dialplan/dialplanlist.inc index 227c7f476..d5756cb3c 100644 --- a/templates/dialplan/dialplanlist.inc +++ b/templates/dialplan/dialplanlist.inc @@ -1,37 +1,70 @@ - - - - - - +
-   -
 Context:
+ + -
Context:
- - - getDialplan($context); - if (isset($dialplan['extensions']) && - (count($dialplan['extensions']) > 0)) { - foreach ($dialplan['extensions'] as $extension => $priorities) { - foreach ($priorities as $priority => $application) { - $rowcolor = $line % 2; - $line++; - ?> - - - - - - +
- -
 
+ + getDialplan($context); + if (isset($dialplan['extensions']) && + (count($dialplan['extensions']) > 0)) { + foreach ($dialplan['extensions'] as $extension => $priorities) { + unset($extname); + # Cast as a string to avoid misinterpreted digits + switch ((string)$extension) { + case "h": + $extname = "Hangup"; + break; + case "i": + $extname = "Invalid"; + break; + case "t": + $extname = "Timeout"; + break; + case "s": + $extname = "Start"; + break; + case "o": + $extname = "Operator"; + break; + default: + break; + } + ?> + + + + + + + + $application) { + $rowcolor = $line % 2; + $line++; + ?> + + + + + + + - -
+ +
PriorityApplication
 
\ No newline at end of file + } + ?> +
+ + \ No newline at end of file diff --git a/templates/menu.inc b/templates/menu.inc index ae483d23e..66e7a35cc 100644 --- a/templates/menu.inc +++ b/templates/menu.inc @@ -22,6 +22,13 @@ $menu_view = $prefs->getValue('menu_view'); ?> + + + diff --git a/templates/users/userlist.inc b/templates/users/userlist.inc index 0e0f8d544..9c0939766 100644 --- a/templates/users/userlist.inc +++ b/templates/users/userlist.inc @@ -1,11 +1,11 @@ - - - - + + +
+
 
 Context:
 Context:
-- 2.11.0