Added 'filter menu text'
SVN revision: 1462
This commit is contained in:
+9
-5
@@ -631,6 +631,15 @@ next <i>Routine</i> entry and all <i>Routine</i> entries:<br>
|
||||
</small>
|
||||
</pre>
|
||||
|
||||
<li><b><code>List Menu text = <file></code></b>
|
||||
</br>
|
||||
The same for the list page. One example would be following text to
|
||||
switch between the different display modi:<br>
|
||||
|
||||
<li><b><code>Filter Menu text = <file></code></b>
|
||||
</br>
|
||||
The same for the filter line in the list page.<br>
|
||||
|
||||
<li><b><code>Guest Display = <list></code></b>
|
||||
</br>
|
||||
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 <code><b>list</b
|
||||
consists of comma separated attributes, including the word <i>text</i>, if one
|
||||
wants to display the entry body text for guests.<p>
|
||||
|
||||
<li><b><code>List Menu text = <file></code></b>
|
||||
</br>
|
||||
The same for the list page. One example would be following text to
|
||||
switch between the different display modi:<br>
|
||||
|
||||
<pre>
|
||||
<small>
|
||||
&nbsp;<a href="?mode=summary">Summary</a>&nbsp;|
|
||||
|
||||
+37
-3
@@ -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("<tr><td class=\"menuframe\">\n");
|
||||
@@ -16231,10 +16234,41 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rsprintf(" <b>%d %s</b> ", 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("<center><b>Error: file <i>\"%s\"</i> not found</b></center>", file_name);
|
||||
}
|
||||
|
||||
rsprintf(" <b>%d %s</b> ", n_msg, loc("Entries"));
|
||||
|
||||
rsprintf("</td></tr></table></td></tr>\n\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user