diff --git a/src/elogd.c b/src/elogd.c index 047cdbc5..b12cba79 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.471 2004/09/15 05:24:31 midas + Use again common table for attribute display + Revision 1.470 2004/09/15 02:05:28 midas Only show first 1000 lines of inline ASCII attachments @@ -6478,8 +6481,8 @@ void show_bottom_text(LOGBOOK * lbs) } else /* add little logo */ rsprintf - ("
ELOG V%s
", - VERSION); + ("
ELOG V%s
", + loc("Goto ELOG home page"), VERSION); } /*------------------------------------------------------------------*/ @@ -16750,7 +16753,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) lbk_list[MAX_N_LIST][NAME_LENGTH], comment[256], class_name[80], class_value[80], fl[8][NAME_LENGTH]; FILE *f; - BOOL first, show_text, display_inline; + BOOL first, show_text, display_inline, subtable; struct tm *pts; time_t ltime; @@ -17213,6 +17216,10 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) } } + /* 2 column table for all attributes */ + rsprintf(""); + subtable = 0; + for (i = 0; i < lbs->n_attr; i++) { if (getcfg(lbs->name, "Password file", str, sizeof(str)) && @@ -17239,8 +17246,16 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) strlcpy(class_value, fl[2], sizeof(class_value)); } - if ((format_flags[i] & AFF_SAME_LINE) == 0) - rsprintf("\n"); + subtable = 0; + } else + rsprintf(""); + } + + /* if last attribute, close row or subtable */ + if (i == lbs->n_attr - 1) { + if (subtable) { + rsprintf("
"); + if (format_flags[i] & AFF_SAME_LINE) + /* if attribute on same line, do nothing */ + rsprintf(""); + else if (i < lbs->n_attr-1 && (format_flags[i+1] & AFF_SAME_LINE)) { + /* if next attribute on same line, start a new subtable */ + rsprintf("\n"); + if (i < lbs->n_attr-1 && (format_flags[i+1] & AFF_SAME_LINE) == 0) { + /* if next attribute not on same line, close row or subtable */ + if (subtable) { + rsprintf("
"); + subtable = 1; + } else + /* for normal attribute, start new row */ + rsprintf(""); sprintf(lattr, "l%s", attr_list[i]); rsprintf("\n"); } - if (i == lbs->n_attr - 1 || (format_flags[i + 1] & AFF_SAME_LINE) == 0) - rsprintf("
", class_name); @@ -17340,9 +17355,26 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) rsprintf(" 
\n"); + subtable = 0; + } else + rsprintf(""); + } } + + rsputs("\n"); // 2 column table rsputs("\n");