From 7630f59c73ce29d0058e125bd7297ac34d138a26 Mon Sep 17 00:00:00 2001 From: florian030 Date: Wed, 25 Jul 2018 20:11:14 +0200 Subject: [PATCH] show reseller in client template list --- .../client/lib/lang/de_client_template_list.lng | 1 + .../client/lib/lang/en_client_template_list.lng | 1 + .../web/client/list/client_template.list.php | 16 ++++++++++++++++ .../client/templates/client_template_list.htm | 9 ++++++--- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/interface/web/client/lib/lang/de_client_template_list.lng b/interface/web/client/lib/lang/de_client_template_list.lng index 552035fd70..cd5f339eea 100644 --- a/interface/web/client/lib/lang/de_client_template_list.lng +++ b/interface/web/client/lib/lang/de_client_template_list.lng @@ -3,4 +3,5 @@ $wb['list_head_txt'] = 'Kundenvorlagen'; $wb['template_type_txt'] = 'Typ'; $wb['template_name_txt'] = 'Vorlagenname'; $wb['template_id_txt'] = 'Template ID'; +$wb['sys_groupid_txt'] = 'Reseller'; ?> diff --git a/interface/web/client/lib/lang/en_client_template_list.lng b/interface/web/client/lib/lang/en_client_template_list.lng index 1906cefc46..a0442c835c 100644 --- a/interface/web/client/lib/lang/en_client_template_list.lng +++ b/interface/web/client/lib/lang/en_client_template_list.lng @@ -3,4 +3,5 @@ $wb["list_head_txt"] = 'Client and Reseller Templates'; $wb["template_type_txt"] = 'Type'; $wb["template_name_txt"] = 'Template name'; $wb['template_id_txt'] = 'Template ID'; +$wb['sys_groupid_txt'] = 'Reseller'; ?> diff --git a/interface/web/client/list/client_template.list.php b/interface/web/client/list/client_template.list.php index cb37eb3f22..a63776ff88 100644 --- a/interface/web/client/list/client_template.list.php +++ b/interface/web/client/list/client_template.list.php @@ -44,6 +44,22 @@ $liste["auth"] = "yes"; /***************************************************** * Suchfelder *****************************************************/ +if($_SESSION['s']['user']['typ'] == 'admin') { + $liste["item"][] = array( 'field' => 'sys_groupid', + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", + 'keyfield'=> 'groupid', + 'valuefield'=> 'name' + ), + 'width' => '', + 'value' => '' + ); +} $liste["item"][] = array( 'field' => "template_id", 'datatype' => "INTEGER", diff --git a/interface/web/client/templates/client_template_list.htm b/interface/web/client/templates/client_template_list.htm index 16176b131c..37564f7197 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -17,12 +17,14 @@ + {tmpl_var name='search_limit'} + {tmpl_var name='search_template_type'} @@ -34,6 +36,7 @@ {tmpl_var name="template_id"} + {tmpl_var name="sys_groupid"} {tmpl_var name="template_type"} {tmpl_var name="template_name"} @@ -43,16 +46,16 @@ - {tmpl_var name='globalsearch_noresults_text_txt'} + {tmpl_var name='globalsearch_noresults_text_txt'} - + - \ No newline at end of file + -- GitLab