mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Replaced 'hidden attributes' by 'show attributes edit'
SVN revision: 1809
This commit is contained in:
parent
24872a6fc3
commit
0d6627a067
@ -1132,11 +1132,15 @@ XYZ-2005-Nov-002
|
|||||||
"red">*</font> on the entry form.
|
"red">*</font> on the entry form.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b><code>Hidden Attributes = <list></code></b><br>
|
<b><code>Show Attributes = <list></code></b><br>
|
||||||
If an attribute is present in this list, it is hidden on the entry form.
|
Attributes present in this list are shown in the single entry page.
|
||||||
This can make sense for attributes which are automatically derived from
|
Omitting attributes can make sense for attributes which are
|
||||||
other attributes via the <b><code>Change <attribute></code></b>
|
automatically derived from other attributes via the
|
||||||
command.
|
<b><code>Change <attribute></code></b> command.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<b><code>Show Attributes Edit = <list></code></b><br>
|
||||||
|
The same as <b><code>Show Attributes</code></b>, but for the entry form.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b><code>Page title = <string></code></b><br>
|
<b><code>Page title = <string></code></b><br>
|
||||||
@ -1657,12 +1661,12 @@ Comment: ...
|
|||||||
exactly in the message body for that attribute value.
|
exactly in the message body for that attribute value.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b><code>Show Attributes = <list></code></b><br>
|
<b><code>Show Attributes Edit = <list></code></b><br>
|
||||||
When using conditional attributes, it might be necessary to omit certain
|
When using conditional attributes, it might be necessary to omit certain
|
||||||
attributes under certain conditions, to make the input mask shorter and
|
attributes under certain conditions, to make the input mask shorter and
|
||||||
maybe change the order of the attributes. With this option, a subset of
|
maybe change the order of the attributes. With this option, a subset of
|
||||||
all attributes can be specified which get displayed on the new entry
|
all attributes can be specified which get displayed on the single entry
|
||||||
input page in the same order as they are specified here. This option only
|
page in the same order as they are specified here. This option mainly
|
||||||
makes sense when used with conditions, such as:
|
makes sense when used with conditions, such as:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
@ -1670,13 +1674,13 @@ Comment: ...
|
|||||||
<pre>
|
<pre>
|
||||||
Attributes = PC Name, Operating System, Version, Distribution
|
Attributes = PC Name, Operating System, Version, Distribution
|
||||||
Options Operating System = Linux{1}, Windows{2}
|
Options Operating System = Linux{1}, Windows{2}
|
||||||
{1} Show Attributes = Operating System, Distribution, PC Name
|
{1} Show Attributes Edit = Operating System, Distribution, PC Name
|
||||||
{2} Show Attributes = Operating System, PC Name, Version
|
{2} Show Attributes Edit = Operating System, PC Name, Version
|
||||||
</pre>
|
</pre>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
The above statements caus the atrribute <b><code>Version</code></b> to be
|
The above statements cause the atrribute <b><code>Version</code></b> to be
|
||||||
only visible when "Windows" is selected, and
|
only visible when "Windows" is selected, and
|
||||||
<b><code>Distribution</code></b> to be only visible when "Linux" is
|
<b><code>Distribution</code></b> to be only visible when "Linux" is
|
||||||
selected. If "Windows" is selected, the PC name is shown before the
|
selected. If "Windows" is selected, the PC name is shown before the
|
||||||
|
|||||||
16
src/elogd.c
16
src/elogd.c
@ -258,7 +258,6 @@ char author_list[MAX_N_LIST][NAME_LENGTH] = {
|
|||||||
#define AF_MUSERLIST (1<<13)
|
#define AF_MUSERLIST (1<<13)
|
||||||
#define AF_USEREMAIL (1<<14)
|
#define AF_USEREMAIL (1<<14)
|
||||||
#define AF_MUSEREMAIL (1<<15)
|
#define AF_MUSEREMAIL (1<<15)
|
||||||
#define AF_HIDDEN (1<<16)
|
|
||||||
|
|
||||||
/* attribute format flags */
|
/* attribute format flags */
|
||||||
#define AFF_SAME_LINE 1
|
#define AFF_SAME_LINE 1
|
||||||
@ -6817,15 +6816,6 @@ and attr_flags arrays */
|
|||||||
attr_flags[j] |= AF_FIXED_REPLY;
|
attr_flags[j] |= AF_FIXED_REPLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if hidden attribute */
|
|
||||||
getcfg(logbook, "Hidden Attributes", list, sizeof(list));
|
|
||||||
m = strbreak(list, tmp_list, MAX_N_ATTR, ",");
|
|
||||||
for (i = 0; i < m; i++) {
|
|
||||||
for (j = 0; j < n; j++)
|
|
||||||
if (strieq(attr_list[j], tmp_list[i]))
|
|
||||||
attr_flags[j] |= AF_HIDDEN;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check for extendable options */
|
/* check for extendable options */
|
||||||
getcfg(logbook, "Extendable Options", list, sizeof(list));
|
getcfg(logbook, "Extendable Options", list, sizeof(list));
|
||||||
m = strbreak(list, tmp_list, MAX_N_ATTR, ",");
|
m = strbreak(list, tmp_list, MAX_N_ATTR, ",");
|
||||||
@ -9321,7 +9311,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
subtable = 0;
|
subtable = 0;
|
||||||
|
|
||||||
/* generate list of attributes to show */
|
/* generate list of attributes to show */
|
||||||
if (getcfg(lbs->name, "Show attributes", str, sizeof(str))) {
|
if (getcfg(lbs->name, "Show attributes edit", str, sizeof(str))) {
|
||||||
n_disp_attr = strbreak(str, list, MAX_N_ATTR, ",");
|
n_disp_attr = strbreak(str, list, MAX_N_ATTR, ",");
|
||||||
for (i = 0; i < n_disp_attr; i++) {
|
for (i = 0; i < n_disp_attr; i++) {
|
||||||
for (j = 0; j < n_attr; j++)
|
for (j = 0; j < n_attr; j++)
|
||||||
@ -9343,10 +9333,6 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
index = attr_index[aindex];
|
index = attr_index[aindex];
|
||||||
|
|
||||||
/* if attribute is hidden, skip it */
|
|
||||||
if (attr_flags[index] & AF_HIDDEN)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
strcpy(class_name, "attribname");
|
strcpy(class_name, "attribname");
|
||||||
strcpy(class_value, "attribvalue");
|
strcpy(class_value, "attribvalue");
|
||||||
input_size = 80;
|
input_size = 80;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user