Commit 7630f59c authored by Florian Schaal's avatar Florian Schaal

show reseller in client template list

parent 081f738e
......@@ -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';
?>
......@@ -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';
?>
......@@ -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",
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment