mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Implemented 'list conditions'
SVN revision: 1696
This commit is contained in:
parent
71c4f06698
commit
ceb2389f87
@ -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>
|
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=
|
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
|
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>"
|
optionally specify the use of additional files containing HTML code, and/or custom "<I>themes</I>"
|
||||||
|
|||||||
@ -1661,6 +1661,25 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
|
|||||||
</pre>
|
</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>specifies for example the condition "Linux AND Main Building".
|
</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>
|
<p>
|
||||||
<a name="access" id="access"></a>
|
<a name="access" id="access"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -2660,6 +2660,7 @@ void evaluate_conditions(LOGBOOK * lbs, char attrib[MAX_N_ATTR][NAME_LENGTH])
|
|||||||
|
|
||||||
set_condition(condition);
|
set_condition(condition);
|
||||||
scan_attributes(lbs->name);
|
scan_attributes(lbs->name);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14730,7 +14731,9 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
|
|||||||
nowrap = printable ? "" : "nowrap";
|
nowrap = printable ? "" : "nowrap";
|
||||||
skip_comma = FALSE;
|
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")
|
if (strieq(mode, "Threaded")
|
||||||
&& getcfg(lbs->name, "Thread display", display, sizeof(display))) {
|
&& getcfg(lbs->name, "Thread display", display, sizeof(display))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user