OPAR OTRS Package Archive

Browseable collection of plugins for the popular OTRS software.

DynamicAdminMenu

Version
1.0.0
Uploaded by/on
reneeb on 03 Mar 2011
Framework
3.0.x
Links
Download Website
Description
A module that makes the admin menu more flexible.

Rate/comment this package

NAME

DynamicAdminMenu - make the admin menu more flexible

DESCRIPTION

This package was created to make the admin menu more flexible. In the standard edition there are six boxes hardcoded. For programmers it is hard to categorize their own packages.

With this package you can add more boxes to the admin menu and also reorder the boxes.

ADDING YOUR OWN BOXES

It's really easy to add your own boxes to the admin menu: Define in an configuration file something like this:

    <ConfigItem Name="Admin::Menu###ReneeB" Required="0" Valid="1">
        <Description Translatable="1">Block 'ReneeB' in admin menu.</Description>
        <Group>DynamicAdminMenu</Group>
        <SubGroup>Blocks</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Title">Renee Baeckers Packages</Item>
                <Item Key="Position">7</Item>
            </Hash>
        </Setting>
    </ConfigItem>

In 'Admin::Menu###ReneeB', ReneeB is the key that is needed to know for adding new links to the new box.

The Title is the string that is shown in the admin menu.

And Position is the position in the admin menu. Its counted from left to right and then from top to bottom:

   +---+    +---+    +---+
   | 1 |    | 2 |    | 3 |
   +---+    +---+    +---+
  
   +---+    +---+    +---+
   | 4 |    | 5 |    | 6 |
   +---+    +---+    +---+
  
   +---+    +---+    +---+
   | 7 |    | 8 |    | 9 |
   +---+    +---+    +---+
   
   ...

That's all to add a new box.

HOW TO ADD NEW LINKS TO THE BOX

With the steps above you have an empty box in the admin menu. So you need to add new links to it. It's the same as the admin frontend module registration was since ever.

    <ConfigItem Name="Frontend::Module###AdminInvoiceStates" Required="0" Valid="1">
        <Description Translatable="1">Frontend module registration for the invoice states interface.</Description>
        <Group>PerlServices</Group>
        <SubGroup>Frontend::Admin::ModuleRegistration</SubGroup>
        <Setting>
            <FrontendModuleReg>
                <Group>admin</Group>
                <Description>Create and manage invoice states.</Description>
                <Title>Invoice States</Title>
                <NavBarName>Admin</NavBarName>
                <NavBarModule>
                    <Module>Kernel::Output::HTML::NavBarModuleAdmin</Module>
                    <Name Translatable="1">Invoice States</Name>
                    <Description Translatable="1">Create and manage invoice states.</Description>
                    <Block>Renee/Block
                    <Prio>100</Prio>
                </NavBarModule>
            </FrontendModuleReg>
        </Setting>
    </ConfigItem>

You just have to use the key for the new box in the <Block></Block> element.

PREREQUESITS

OTRS 3.0.x

AUTHOR AND LICENSE

Renee Baecker <module@renee-baecker.de>

This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (AGPL). If you did not receive this file, see http://www.gnu.org/licenses/agpl.txt.