A Dashboard is the main page of a control panel, which serves as a point to all other modules of the control panel. If the Dashboard is active, in the upper part of the main menu, the "Home" link will display.
The Dashboard is described using an xml-document that should locate in the etc/xml directory. Use the following format for a file name: "manager name" + "_dashboard_" + "user role" + ".xml" (for example, "core_dashboard_30.xml"). When accessing the Dashboard for the first time, in the var/userconf/ directory, a configuration file named "manager name" + "." + "username" + "." + "dashboard.xml" is created (for example, "core.root.dashboard.xml"). Thus, each user can have his own Dashboard settings.
Changes made to the Dashboard xml will be automatically specified in configuration files.
If the file is not present in etc/xml, the Dashboard is considered inactive and the "Home" link is not displayed in the main menu.
Note: the column with the sorted attribute must be present for block-lists. Otherwise, the limit on the number of records to be displayed will not be applied!
Dashboard XML must contain one or several <block> elements. Each block describes either a toolbar or a list.
following is an example of the COREmanager Dashboard XML.
Example of Dashboard XML
General description of Dashboard block
name - block unique name. It is used for identifying a block in the Dashboard. It is also used for languages.
position - вescribes block location in relation to other blocks.
top - at the top (the block is expanded into two columns)
left - at the left
right - at the right
Block location also depends on the location of the <block> tag inside the xml-file - the higher the block, the higher it will be on the list.
type - block type.
toolbar - control panel
Description of control panel block (toolbar)
Example of the control panel block (type="toolbar")
A control panel block contains a number of buttons for quick access to panel's functions.
Each button is described with the <toolbtn> tag with the following attributes:
formif specified, the button will open a form (the value of attribute is a function name)listif specified, the button will open a list (the value of attribute is a function name)imgname of the icon"nameunique name of the icon. It is used to identify a button and for languages.
Description of list-block (list)
Example of the list-block (type="list")
A list-block is used for describing a list (table) with data. It contains 2 types of tags: <toolbtn> (buttons) and <col> (table columns).
A column with the sorted attribute must be present, otherwise limit on the number of raws to be displayed won't be applied!
The <block> tag has the following attributes:
funcfunction name(action name), which data should be shown in that blockrowslimits the number of raws to be displayed on the Dashboard
The toolbtn element
Describes a button.
namebutton unique name; must correspond to the name of the function button (action name) - see the func attribute of the list-block.
The col element
Describes a column.
namecolumn name; must correspond to the column name of the specified function (action) - see the func attribute of the list-block.
Most Dashboard messages are uploaded automatically according to the function name. However, some massages should be specified manually in the message description file (for example, mgr_msg_ru.xml)
Example of message description
msg name="title"describes Dashboard's headingmsg name="title_[block]"describes a block name; [block] - block name (<msg name="title_taskbar">); it is used for toolbar-blocks, for list-blocks the message is uploaded automatically based on the function name; if you need to change a list-block heading, you can specify it here - the heading will have a higher priority and will be shown on the Dashboard.msg name="[block]_[button]"describes a button caption; [block] - block name, [button] - button name (<msg name="taskbar_usrparam">); used for toolbar-blocks; for list-block the message is uploaded automatically based the function name.