Kayako logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Notices

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
Dynadata Offline
Member
 
Posts: 171
Join Date: Feb 2008
Location: Netherlands
Manage Departments - 07-04-2008, 10:46 AM

Hi,

I changed the view of "Manage Departments" in the Admin CP.
This is because I have different departments for different templates.
See the following screenshot to get an impression of it.



Follow the following steps to implement this modification.

Open:
Code:
\modules\core\admin_departments.php
Find:
Code:
 
$fields[0]["name"] = "title";
$fields[0]["title"] = $_SWIFT["language"]["deptitle"];
$fields[0]["width"] = "";
 
$fields[1]["name"] = "departmenttype";
$fields[1]["title"] = $_SWIFT["language"]["deptype"];
$fields[1]["width"] = "100";
$fields[1]["align"] = "center";
 
$fields[2]["name"] = "departmentmodule";
$fields[2]["title"] = $_SWIFT["language"]["depmodule"];
$fields[2]["width"] = "120";
$fields[2]["align"] = "center";
 
$fields[3]["type"] = "custom";
$fields[3]["name"] = "options";
$fields[3]["title"] = $_SWIFT["language"]["options"];
$fields[3]["width"] = "150";
$fields[3]["align"] = "center";
Replace this by:
Code:
 
$fields[0]["name"] = "title";
$fields[0]["title"] = $_SWIFT["language"]["deptitle"];
$fields[0]["width"] = "";
 
$fields[1]["name"] = "TemplateName";
$fields[1]["title"] = $_SWIFT["language"]["templategroups"];
$fields[1]["width"] = "130";
$fields[1]["align"] = "center";
 
$fields[2]["name"] = "displayorder";
$fields[2]["title"] = $_SWIFT["language"]["displayorder"];
$fields[2]["width"] = "120";
$fields[2]["align"] = "center";
 
$fields[3]["name"] = "departmenttype";
$fields[3]["title"] = $_SWIFT["language"]["deptype"];
$fields[3]["width"] = "100";
$fields[3]["align"] = "center";
 
$fields[4]["name"] = "departmentmodule";
$fields[4]["title"] = $_SWIFT["language"]["depmodule"];
$fields[4]["width"] = "120";
$fields[4]["align"] = "center";
 
$fields[5]["type"] = "custom";
$fields[5]["name"] = "options";
$fields[5]["title"] = $_SWIFT["language"]["options"];
$fields[5]["width"] = "150";
$fields[5]["align"] = "center";
Find:
Code:
$grid->start("departments", $_SWIFT["language"]["departmentlist"], 'SELECT * FROM `'. TABLE_PREFIX .'departments` $_sortjoin;', 'SELECT COUNT(*) AS totalitems FROM `'. TABLE_PREFIX .'departments`;', 'SELECT * FROM `'. TABLE_PREFIX .'departments` WHERE `title` LIKE \'%$_searchstr%\' $_sortjoin;', $fields, $options); 
Replace this line by:
Code:
$grid->start("departments", $_SWIFT["language"]["departmentlist"], 'SELECT *, (SELECT title FROM '. TABLE_PREFIX .'tgroupassigns INNER JOIN '. TABLE_PREFIX .'templategroups ON '. TABLE_PREFIX .'tgroupassigns.tgroupid = '. TABLE_PREFIX .'templategroups.tgroupid WHERE '. TABLE_PREFIX .'tgroupassigns.toassignid = '. TABLE_PREFIX .'departments.departmentid AND '. TABLE_PREFIX .'tgroupassigns.type = 1 LIMIT 1) as TemplateName FROM '. TABLE_PREFIX .'departments $_sortjoin;', 'SELECT COUNT(*) AS totalitems FROM `'. TABLE_PREFIX .'departments`;', 'SELECT * FROM `'. TABLE_PREFIX .'departments` WHERE `title` LIKE \'%$_searchstr%\' $_sortjoin;', $fields, $options); 
Save and close the file. Enjoy!
   
Reply With Quote
Reply

Tags
departments, manage

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Manage departments Dynadata Developers & Code 0 02-04-2008 03:15 PM
Live Chat Departments evermorev SupportSuite, eSupport and LiveResponse 3 24-08-2007 09:16 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46