Replaced 'hidden attributes' by 'show attributes edit'

SVN revision: 1809
This commit is contained in:
2007-03-12 19:31:25 +00:00
parent 24872a6fc3
commit 0d6627a067
2 changed files with 16 additions and 26 deletions
+15 -11
View File
@@ -1132,11 +1132,15 @@ XYZ-2005-Nov-002
"red">*</font> on the entry form.
</li>
<li>
<b><code>Hidden Attributes = &lt;list&gt;</code></b><br>
If an attribute is present in this list, it is hidden on the entry form.
This can make sense for attributes which are automatically derived from
other attributes via the <b><code>Change &lt;attribute&gt;</code></b>
command.
<b><code>Show Attributes = &lt;list&gt;</code></b><br>
Attributes present in this list are shown in the single entry page.
Omitting attributes can make sense for attributes which are
automatically derived from other attributes via the
<b><code>Change &lt;attribute&gt;</code></b> command.
</li>
<li>
<b><code>Show Attributes Edit = &lt;list&gt;</code></b><br>
The same as <b><code>Show Attributes</code></b>, but for the entry form.
</li>
<li>
<b><code>Page title = &lt;string&gt;</code></b><br>
@@ -1657,12 +1661,12 @@ Comment: ...
exactly in the message body for that attribute value.
</p>
<p>
<b><code>Show Attributes = &lt;list&gt;</code></b><br>
<b><code>Show Attributes Edit = &lt;list&gt;</code></b><br>
When using conditional attributes, it might be necessary to omit certain
attributes under certain conditions, to make the input mask shorter and
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
input page in the same order as they are specified here. This option only
all attributes can be specified which get displayed on the single entry
page in the same order as they are specified here. This option mainly
makes sense when used with conditions, such as:
</p>
<ul>
@@ -1670,13 +1674,13 @@ Comment: ...
<pre>
Attributes = PC Name, Operating System, Version, Distribution
Options Operating System = Linux{1}, Windows{2}
{1} Show Attributes = Operating System, Distribution, PC Name
{2} Show Attributes = Operating System, PC Name, Version
{1} Show Attributes Edit = Operating System, Distribution, PC Name
{2} Show Attributes Edit = Operating System, PC Name, Version
</pre>
</li>
</ul>
<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
<b><code>Distribution</code></b> to be only visible when "Linux" is
selected. If "Windows" is selected, the PC name is shown before the
+1 -15
View File
@@ -258,7 +258,6 @@ char author_list[MAX_N_LIST][NAME_LENGTH] = {
#define AF_MUSERLIST (1<<13)
#define AF_USEREMAIL (1<<14)
#define AF_MUSEREMAIL (1<<15)
#define AF_HIDDEN (1<<16)
/* attribute format flags */
#define AFF_SAME_LINE 1
@@ -6817,15 +6816,6 @@ and attr_flags arrays */
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 */
getcfg(logbook, "Extendable Options", list, sizeof(list));
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;
/* 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, ",");
for (i = 0; i < n_disp_attr; i++) {
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];
/* if attribute is hidden, skip it */
if (attr_flags[index] & AF_HIDDEN)
continue;
strcpy(class_name, "attribname");
strcpy(class_value, "attribvalue");
input_size = 80;