mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-14 20:33:48 +00:00
Added message_id and date to CSV export
SVN revision: 1170
This commit is contained in:
parent
3a352e4178
commit
a118803798
27
src/elogd.c
27
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.535 2005/01/17 14:01:40 midas
|
||||||
|
Added message_id and date to CSV export
|
||||||
|
|
||||||
Revision 1.534 2005/01/06 10:02:34 midas
|
Revision 1.534 2005/01/06 10:02:34 midas
|
||||||
Implemented 'hidden attributes'
|
Implemented 'hidden attributes'
|
||||||
|
|
||||||
@ -15247,6 +15250,18 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf
|
|||||||
/* no menus and tables */
|
/* no menus and tables */
|
||||||
show_plain_header(0, "export.csv");
|
show_plain_header(0, "export.csv");
|
||||||
|
|
||||||
|
rsprintf("\"%s\"", loc("Message ID"));
|
||||||
|
if (strieq(mode, "CSV1"))
|
||||||
|
rsprintf(",");
|
||||||
|
else
|
||||||
|
rsprintf(";");
|
||||||
|
|
||||||
|
rsprintf("\"%s\"", loc("Date"));
|
||||||
|
if (strieq(mode, "CSV1"))
|
||||||
|
rsprintf(",");
|
||||||
|
else
|
||||||
|
rsprintf(";");
|
||||||
|
|
||||||
for (i = 0; i < lbs->n_attr; i++) {
|
for (i = 0; i < lbs->n_attr; i++) {
|
||||||
strlcpy(str, attr_list[i], sizeof(str));
|
strlcpy(str, attr_list[i], sizeof(str));
|
||||||
if (str[0]) {
|
if (str[0]) {
|
||||||
@ -15699,6 +15714,18 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf
|
|||||||
|
|
||||||
if (csv) {
|
if (csv) {
|
||||||
|
|
||||||
|
rsprintf("%d", message_id);
|
||||||
|
if (strieq(mode, "CSV1"))
|
||||||
|
rsprintf(",");
|
||||||
|
else
|
||||||
|
rsprintf(";");
|
||||||
|
|
||||||
|
rsprintf("%s", date);
|
||||||
|
if (strieq(mode, "CSV1"))
|
||||||
|
rsprintf(",");
|
||||||
|
else
|
||||||
|
rsprintf(";");
|
||||||
|
|
||||||
for (i = 0; i < lbs->n_attr; i++) {
|
for (i = 0; i < lbs->n_attr; i++) {
|
||||||
strlcpy(str, attrib[i], sizeof(str));
|
strlcpy(str, attrib[i], sizeof(str));
|
||||||
if (str[0]) {
|
if (str[0]) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user