COREmanager Documentation

Description of lists



The metadata element for lists can have the following additional attributes:

key - key field. Its value will be sent to the form in the elid parameters while editing.

keyname - specifies a field which value is used for displaying a list of selected elements when performing group operation.

autoupdate - specifies a period in seconds to automatically update the page.

selficont - the list has its own logo. Its value is a picture name.

  <metadata name="product" type="list" key="mpname" keyname="name" mgr="core">
    <toolbar view="buttontext">
      <toolgrp name="one">
        <toolbtn func="product.params" type="edit" default="yes" img="t-edit" name="params">
          <hide name="isinstalled" value="off"/>
        <toolbtn func="product.update" type="edit" img="t-retry" name="update">
          <hide name="isinstalled" value="off"/>
        <toolbtn func="product.install" type="edit" img="t-install" name="install">
          <hide name="isinstalled" value="on"/>
        <toolbtn func="product.delete" type="group" img="t-delete" name="delete">
          <hide name="isinstalled" value="off"/>
          <hide name="name" value="COREmanager"/>
      <toolgrp name="two">
        <toolbtn func="product.go" type="edit" img="t-goisp" name="go">
          <hide name="isinstalled" value="off"/>
          <hide name="name" value="COREmanager"/>
      <toolgrp name="three">
        <toolbtn func="product.config" type="new" img="t-attr" name="config"/>
      <col name="name" type="data" sort="alpha" sorted="yes"/>
      <col name="version" type="data"/>
      <col name="avail_version" type="data"/>
      <col name="state" sort="prop">
        <prop name="installed" defimg="p-off" onimg="p-on"/>
        <prop name="installing" onimg="p-install" animated="yes"/>
        <prop name="updating" onimg="p-install" animated="yes"/>
        <prop name="deleting" onimg="p-install" animated="yes"/>
      <col name="descr" type="msg"/>

Toolbar (the toolbar element)

A toolbar can contain buttons and separators.

viewspecifies interface of the toolbar. This attribute is set automatically and its value depends on current user settings. Possible values: button (display only buttons), buttontext (display captions to buttons).

the toolbtn elementсм. Toolbar buttonthe toolsep elementсм. Toolbar separator

Toolbar button (the toolbtn element)

name - a button name, which is used for identifying a button. It is also used for languages.funcname of the function to be called when clicking the button.imgname of the picture that will be shown on the button. Should be specified without extensions.

default - "yes" indicates a default action (double-click on a table raw).typetype of action, can have the following values:

  • new: will show a new object creation form.
  • back: back to the previous list.
  • edit: show the selected object edit form.
  • editlist: call a list-function which parent element (plid) is the selected element from the list.
  • group: group operation over selected elements.
  • groupform: edit selected elements.
  • groupformnosel: similar to groupform except for it allows to call a function even if no elements are selected.
  • list: call a list-function.
  • refresh: call a function for updating the current list.
  • window: call a function in a new browser tab.
  • url: Follow the URL specified in the func attribute in a new browser tab.

the hide element

the show element

The hide element: disable button depending on the selected string.

name - column name

value - the value that makes the button unavailable.

The show element

Activate button depending on the selected string.

name - column name

value - the value that makes the button available.

Toolbar separator description (the toolsep element)

Creates a large separator between buttons. If several toolsep come one after another, all of them but one will be removed. This situation may occur if a group of buttons was deleted from the toolbar.

Table column description (the coldata element)

The coldata node must contain one or several col nodes describing table columns.

col - describes a table column

setcolor - specifies column color. 

Column description (the col element)

nameColumn name. Must be unique within one metadata. It is used for languages.typedata type in a column. Possible values: data (data from a control panel; used by default), indicator (indicator; limit and actual usage sent by the control panel), msg (display messages corresponding to the value from the control panel).sortspecifies how to sort out data in columns. Possible values: alpha (sort by alphabetical order; by default), digit (in increasing order), file (sort by alphabetical order, first show directories, then files; used only with prop/xprop, as in file manager), indicator (sort out by the "actual usage" indicator; only for columns with indicators), ip (sort out IP addresses), prop (sort out by properties, if the same properties are used, sort by column value in alphabetic order).sortedif sorted="yes", the table is specified by this column by default. sorted="desc" sort our in descending order.statshow total number of raws with such a field at the button of the table.wrapif specified, ... will be ignored. Data in the column will be shown in several raws.aligndata alignment. Its values can be left, right, center.widthcolumn default width.ifsee Introduction.levelsee Introduction.noescapingif specified, html escaping will be disabled.convertspecifies encoding algorithm for the column. All values in that column will be converted using the specified algorithm. Currently only punycode is supported allowing to convert from punycode into UTF-8 encoded symbols.editenables to edit element on the list. Value of the attribute specifies a function name (form) to be called for saving the value. Make sure the column value matches the field name (field) on the form. The column name (scolname) and the list name (stablename) will be also sent to the form. If the field value influences the raw identifier, the function must return a new identifier [elid] and name [elname] (if its value does not coincide with the identifier)setcolorspecifies how table cells should be colored. See description of the setcolor element.

Property description (prop/xprop)

A column may have up to 64 properties (prop and xprop elements). Properties are sorted out according to how they are added into metadata.

the prop element is displayed if the value with the name specified in the @name attribute is present in the string.the xprop elementis displayed if the value specified in the @name attribute matches the value specified in the @value attribute. If the @value attribute is not specified or its value is empty, the property will be displayed if the value of this element does not correspond to any xprop with the same @name.

The prop and xprop elements may have the following attributes:

name - see description above.valueonly for xprop. see description aboveimgspecifies an image to be displayed.animatedimg image — animated gif-filefuncspecifies a function to be called when clicking the image. The following values are sent to that function as parameters: elid - selected raw identifier, plid - identifier in the base list, value - property value.typespecifies a type of the @func function. See toolbar description for possible valuesstatdisplay total number of raws with that property at the bottom of the table.

Messages may contain description of a property:

hint_p__description for xprop with a specified name and valuehint_p_description for prop/xprop. The __value__ macros will be changed into a value.

Color scheme (the setcolor element)

The setcolor element is applied to one cell only (text color), if described within the col element, or to the whole raw (background color), if described within the coldata element. You can describe any number of conditions for raws and cells color.

namespecifies an element name (it may be col, prop, xprop or a column name, which is not described in the XML), which value will be compared with the specified one in the value attribute. You may not specify this attribute when adding rules for cell colors. In that case the value will be taken from the cell for which the rule is specified.valuespecifies the value that will be compared a field value specified by the @name attribute. If it is not specified or empty, the field in the line will be checked.colorspecifies color that will be applied if the specified condition is met.

Table raws and cells can be colored manually when generating data (the elem elements). Add the color attribute into a corresponding elem element for coloring a raw or into any element with cell data for coloring a corresponding cell. When sending data to xslt the handler, all conditions specified by the setcolor element will be defined, and corresponding attributes will be set in data elements of the list.

The following color are currently supported: red, green, blue, yellow, cyan

Diagram description (the diagram element)

Using the diagram element data can be displayed in the table.

the type attributeDiagram type. Possible values: line, histogram, pie.the label attributethe column from which value descriptions will be taken.the data attributethe column from which data for a pie chart will be taken will (only for type="pie").the line elementone or several elements describe data to be displayed on a chart. The @data attribute specifies a name for the column from which volumes will be taken.