[Help] Creating A New Dashboard Widget

Moderator: crythias

Locked
skullz
Znuny superhero
Posts: 658
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

[Help] Creating A New Dashboard Widget

Post by skullz »

Hi, i want to create a new dashboard widget which shows all agent's information like name, phone number and etc..

1. Firstly i created a .xml file which called "WidgetAgentData.xml" and put it into \OTRS\Kernel\Config\Files.

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="1.0" init="Application">
    <ConfigItem Name="DashboardBackend###0011-AgentData" Required="0" Valid="1">
        <Description Translatable="1">Defines the config parameters of this item, to be shown in the preferences view.</Description>
        <Group>Framework</Group>
        <SubGroup>Frontend::Agent::Dashboard</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::DashboardAgentData</Item>
                <Item Key="Title" Translatable="1">Agent Data</Item>
                <Item Key="Block">ContentLarge</Item>
                <Item Key="Default">1</Item>
            </Hash>
        </Setting>
    </ConfigItem>
</otrs_config>

2. Then, i created a .pm file which called "DashboardAgentData.pm" and put it into \OTRS\Kernel\Output\HTML.

3. The, i created a .dtl file which called "AgentDashboardData.dtl" and put it into \OTRS\Kernel\Output\HTML\Standard.

The problem start here. What i should write/put in DashboardAgentData.pm and "AgentDashboardData.dtl so the dashboard widget can show list of agent's information?


p/s: for testing purpose, I was copying the DashboardImage.pm code (\OTRS\Kernel\Output\HTML) and paste it into DashboardAgentData.pm. Then, On SysConfig>Framework>Frontend::Agent::Dashboard, i tried to enabled the widget. The widget is shown on agent's dashboard.
http://s14.postimage.org/4sfbsh075/image.jpg


TQ.
Sorry for my bad english.
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This

Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
Locked