Implemented 'list conditions'

SVN revision: 1696
This commit is contained in:
2006-07-06 14:07:40 +00:00
parent 71c4f06698
commit ceb2389f87
3 changed files with 24 additions and 2 deletions
+1 -1
View File
@@ -278,7 +278,7 @@ having to restart the server. Instead of restarting the server, under Unix one c
like <b><code>"killall -HUP elogd"</code></b> to tell the server to re-read its configuration.<p>
The many options of this unique but very important file are documented on the separate <b><a href=
"config.html" config.html??>elogd.cfg syntax page</a></b>.<p>
"config.html">elogd.cfg syntax page</a></b>.<p>
To better control appearance and layout of the logbooks, <b><code>elogd.cfg</code></b> may
optionally specify the use of additional files containing HTML code, and/or custom "<I>themes</I>"
+19
View File
@@ -1661,6 +1661,25 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
</pre>
</li>
</ul>specifies for example the condition "Linux AND Main Building".
<h2>
Conditions in the list display
</h2>Conditional attributes are usually only used for change items
in the entry form. It might however be desirable to have conditional
attibutes also working in the list display (the page where several
entries are shown on a single page). The value of one attribute can then
for example change which other attributes gets displayed via the <B><code>
list display</code></b> option. To enable the evaluation of conditional
attributes for the list display, on uses the option
<ul>
<li>
<code><b>List conditions = 1</b></code><br>
</li>
</ul>It should be noted that this option can cause a significant performance
degradation if many conditional attributes are defines, so it should only
be turned on when it is really needed.
<p>
<a name="access" id="access"></a>
</p>
+4 -1
View File
@@ -2660,6 +2660,7 @@ void evaluate_conditions(LOGBOOK * lbs, char attrib[MAX_N_ATTR][NAME_LENGTH])
set_condition(condition);
scan_attributes(lbs->name);
return;
}
}
}
@@ -14730,7 +14731,9 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
nowrap = printable ? "" : "nowrap";
skip_comma = FALSE;
evaluate_conditions(lbs, attrib);
if (getcfg(lbs->name, "List conditions", str, sizeof(str)) &&
atoi(str) == 1)
evaluate_conditions(lbs, attrib);
if (strieq(mode, "Threaded")
&& getcfg(lbs->name, "Thread display", display, sizeof(display))) {