diff --git a/doc/config.html b/doc/config.html
index 333f6ec4..1e398991 100755
--- a/doc/config.html
+++ b/doc/config.html
@@ -335,7 +335,8 @@ groups. Instead, one has to append the top group name to the URL, such as
http://your.host:8080/engineering or
http://your.host:8080/administration. If someone does not know the
top group name, one cannot see the list of logbooks there, so the groups become completely
-independent of each other.
+independent of each other. If this feature is not wanted, it can be disabled by setting
+Show top groups = 1.
+
Show top groups = 0|1
+Show top groups can be set to 1,
+in which case a list of available top groups is shown.
++
diff --git a/src/elogd.c b/src/elogd.c index 66b46bcd..bc0d4039 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.374 2004/07/08 19:48:09 midas + Implemented 'show top groups' flag + Revision 1.373 2004/07/08 11:31:33 midas Fixed compiler warning @@ -16669,6 +16672,54 @@ void show_logbook_node(LBLIST plb, LBLIST pparent, int level, int btop) /*------------------------------------------------------------------*/ +void show_top_selection_page() +{ + int i; + char str[NAME_LENGTH], name[NAME_LENGTH], name_enc[NAME_LENGTH]; + LBLIST phier; + + /* if selection page protected, check password */ + if (getcfg("global", "password file", str) && + getcfg("global", "protect selection page", str) && atoi(str) == 1) + if (!check_user_password(NULL, getparam("unm"), getparam("upwd"), "")) + return; + + if (getcfg("global", "Page Title", str)) { + strip_html(str); + show_html_header(NULL, TRUE, str, TRUE); + } else + show_html_header(NULL, TRUE, "ELOG Logbook Selection", TRUE); + rsprintf("
\n\n"); + rsprintf("| \n");
+
+ if (getcfg("global", "Welcome title", str)) {
+ rsputs(str);
+ } else {
+ rsprintf("%s. \n", loc("Several logbooks groups are defined on this host")); + rsprintf("%s:\n", loc("Please select one to list the logbooks in that group")); + } + + rsprintf(" |
| "); + strlcpy(name, phier->member[i]->name, sizeof(name)); + strlcpy(name_enc, name, sizeof(name_enc)); + url_encode(name_enc, sizeof(name_enc)); + rsprintf("%s", name_enc, name); + rsprintf(" |