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 552035fd702e2a09d76ec7fb147245d6b2324616..cd5f339eea8c209b26267116db9ae9275e9237af 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 1906cefc469e063b01a1ea409cb7fe311f964977..a0442c835c152dbc00b79613abeae1bc5732c025 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 cb37eb3f22161167320587721363af4f991040a3..a63776ff88d5394298bd745d61c9ecccbf6a2ca3 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 16176b131cec403d2f02ed595c13ad17a1b36c82..37564f7197c2f6c01749cd6ee8b00f61da0c7b0c 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -17,12 +17,14 @@ <thead class="dark form-group-sm"> <tr> <th data-column="template_id"><tmpl_var name="template_id_txt"></th> + <tmpl_if name="is_admin"><th data-column="sys_groupid"><tmpl_var name="sys_groupid_txt"></th></tmpl_if> <th data-column="template_type"><tmpl_var name="template_type_txt"></th> <th data-column="template_name"><tmpl_var name="template_name_txt"></th> <th class="small-col text-right">{tmpl_var name='search_limit'}</th> </tr> <tr> <td><input class="form-control" type="text" name="search_template_id" value="{tmpl_var name='search_template_id'}" /></td> + <tmpl_if name="is_admin"><td><select class="form-control" name="search_sys_groupid"></tmpl_if> <td><select class="form-control" name="search_template_type">{tmpl_var name='search_template_type'}</select></td> <td><input class="form-control" type="text" name="search_template_name" value="{tmpl_var name='search_template_name'}" /></td> <td class="text-right"> @@ -34,6 +36,7 @@ <tmpl_loop name="records"> <tr> <td><a href="#" data-load-content="client/client_template_edit.php?id={tmpl_var name='id'}">{tmpl_var name="template_id"}</a></td> + <tmpl_if name="is_admin"><td><a href="#" data-load-content="client/client_template_edit.php?id={tmpl_var name='id'}">{tmpl_var name="sys_groupid"}</a></td></tmpl_if> <td><a href="#" data-load-content="client/client_template_edit.php?id={tmpl_var name='id'}">{tmpl_var name="template_type"}</a></td> <td><a href="#" data-load-content="client/client_template_edit.php?id={tmpl_var name='id'}">{tmpl_var name="template_name"}</a></td> <td class="text-right"> @@ -43,16 +46,16 @@ </tmpl_loop> <tmpl_unless name="records"> <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> - <td colspan="4">{tmpl_var name='globalsearch_noresults_text_txt'}</td> + <tmpl_if name="is_admin"><td colspan="5"><tmpl_else><td colspan="4"></tmpl_if>{tmpl_var name='globalsearch_noresults_text_txt'}</td> </tr> </tmpl_unless> </tbody> <tfoot> <tr> - <td colspan="4"><tmpl_var name="paging"></td> + <tmpl_if name="is_admin"><td colspan="5"><tmpl_else><td colspan="4"></tmpl_if><tmpl_var name="paging"></td> </tr> </tfoot> </table> </div> - \ No newline at end of file +