From c7302a09e8e2e7ea53d7f9880a51acaba35202c9 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 18 Nov 2015 08:00:49 +1100 Subject: [PATCH] More templating Signed-off-by: Madhura Jayaratne --- .../controllers/ServerVariablesController.php | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/libraries/controllers/ServerVariablesController.php b/libraries/controllers/ServerVariablesController.php index 29002b7568..ef26cbd909 100644 --- a/libraries/controllers/ServerVariablesController.php +++ b/libraries/controllers/ServerVariablesController.php @@ -248,34 +248,22 @@ class ServerVariablesController extends Controller * @return string */ private function _getHtmlForServerVariables($serverVars, $serverVarsSession) { - $value = ! empty($_REQUEST['filter']) + // filter + $filterValue = ! empty($_REQUEST['filter']) ? htmlspecialchars($_REQUEST['filter']) : ''; - $output = '
' - . '' . __('Filters') . '' - . '
' - . '' - . '' - . '
' - . '
'; - - $output .= '' - . '' - . '' - . '' - . '' - . '' - . ''; + $output = Template::get('server/variables/variable_filter') + ->render(array('filterValue' => $filterValue)); + $output .= '
' . __('Action') . '' . __('Variable') . '' - . __('Session value') . ' / ' . __('Global value') - . '
'; + $output .= Template::get('server/variables/variable_table_head')->render(); $output .= ''; + $output .= $this->_getHtmlForServerVariablesItems( $serverVars, $serverVarsSession ); - $output .= ''; + $output .= ''; $output .= '
'; return $output;