diff --git a/doc/config.html b/doc/config.html
index be988941..9afc1cb0 100755
--- a/doc/config.html
+++ b/doc/config.html
@@ -631,6 +631,15 @@ next Routine entry and all Routine entries:
</small>
+
List Menu text = <file>
+
+The same for the list page. One example would be following text to
+switch between the different display modi:Filter Menu text = <file>
+
+The same for the filter line in the list page.Guest Display = <list>
This option specifies which attributes are displayed on guest access. It is possible
@@ -639,11 +648,6 @@ if someone is logged in (using the option "Password file"). The listtext, if one
wants to display the entry body text for guests.
-
List Menu text = <file>
-
-The same for the list page. One example would be following text to
-switch between the different display modi:
-
<small>
<a href="?mode=summary">Summary</a> |
diff --git a/src/elogd.c b/src/elogd.c
index bcc66a42..0238b44b 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
+ Revision 1.731 2005/07/29 08:37:06 ritt
+ Added 'filter menu text'
+
Revision 1.730 2005/07/27 20:51:24 ritt
Added validity check for year in date/time attributes
@@ -16040,7 +16043,7 @@ void build_ref(char *ref, int size, char *mode, char *expand, char *new_entries)
void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, BOOL threaded)
{
- int cur_exp, n, i, j, i1, i2, index;
+ int cur_exp, n, i, j, i1, i2, index, size;
char ref[256], str[NAME_LENGTH], comment[NAME_LENGTH], list[MAX_N_LIST][NAME_LENGTH], option[NAME_LENGTH];
rsprintf("\n");
@@ -16231,10 +16234,41 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands,
}
}
}
-
- rsprintf(" %d %s ", n_msg, loc("Entries"));
}
+ /*---- filter menu text ----*/
+
+ if (getcfg(lbs->name, "filter menu text", str, sizeof(str))) {
+ FILE *f;
+ char file_name[256], *buf;
+
+ /* check if file starts with an absolute directory */
+ if (str[0] == DIR_SEPARATOR || str[1] == ':')
+ strcpy(file_name, str);
+ else {
+ strlcpy(file_name, resource_dir, sizeof(file_name));
+ strlcat(file_name, str, sizeof(file_name));
+ }
+
+ f = fopen(file_name, "rb");
+ if (f != NULL) {
+ fseek(f, 0, SEEK_END);
+ size = TELL(fileno(f));
+ fseek(f, 0, SEEK_SET);
+
+ buf = xmalloc(size + 1);
+ fread(buf, 1, size, f);
+ buf[size] = 0;
+ fclose(f);
+
+ rsputs(buf);
+
+ } else
+ rsprintf("Error: file \"%s\" not found ", file_name);
+ }
+
+ rsprintf(" %d %s ", n_msg, loc("Entries"));
+
rsprintf(" \n\n");
}