diff --git a/doc/config.html b/doc/config.html index 5320328c..aa8019ab 100755 --- a/doc/config.html +++ b/doc/config.html @@ -906,6 +906,86 @@ The administrator has to ensure then of course that only trusted people can edit +
+
  Conditional attributes  
+

+ +When entering data into a elog form, it might be helpful to change the options of the attributes +depending on the value of other attributes. Let's assume you have a logbook containing entries +for different computers with different operating systems. Your elogd.cfg file starts like that: +

+ +

+Attributes = PC Name, Operating System, Version
+Options Operating System = Linux, Windows
+
+

+ +For the operating system version, you would like a list, but this list has to be different +for Linux and Windows. This can be achieved with conditional attributes. Simply write +following configuration: +

+ +

+Attributes = PC Name, Operating System, Version
+Options Operating System = Linux{1}, Windows{2}
+{1} Options Version = 2.2, 2.4, 2.6
+{2} Options Version = ME, 2k, NT, XP
+
+

+ +If you enter a new entry into that logbook, the drop-down list for Version +changes automatically depending on the Operating System. Note that you +have to enable Java Script for this to work. Without Java Script, a separate button appears +in the line of the Operating System which has to be pressed to make the Version list change. +

+ +The number {1} and {2} in the configuration file are called conditions. Depending +on these conditions, certain other lines can be activated. So if the Operating System +Linux is selected, condition {1} is true, which selects the line starting +with {1} to select the options 2.2, 2.4, 2.6. +

+ +This technique offers various other possibilities, since any configuration option can +be made conditional by adding a {<n>} in front of that line +where <n> is an arbitrary number. One often used possibility is the definition +of forms. Depending on an attribute, the configuration option +Prset text = ... can be used to copy some pre-defined forms into +the message body, which can then be filled out. Consider following example: +

+ +

+Attributes = Author, Type
+Options Type = Network check{1}, System check{2}
+
+{1} Preset text = network.txt
+{2} Preset text = system.txt
+
+

+This causes two text files network.txt and system.txt to be copied +into the message body when a new entry is made. The file network.txt could +look like: +

+ +

+Routers checked:  [ ]
+DHCP checked:     [ ]
+Comment: ...
+
+

+ +This works like a pre-defined form, the user puts X's between the "[ ]" when that +item has been checked. Other possibilities are pre-defined shift sheets in environments +where elog is uses as a shift logbook. The shift sheet could contain the names +of the shift crew, some check-list for standard tasks etc. +

+ +Another use of conditional attributes is in conjunction with the option +Message comment. Depending on some attribute values, different +message comment can be displayed to tell the user what to enter exactly in the +message body for that attribute value. +

+


  Access control