mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Show nuber of attachments in summary view if >5
SVN revision: 2095
This commit is contained in:
parent
0687171ecf
commit
cc3e5c4d76
33
src/elogd.c
33
src/elogd.c
@ -16300,7 +16300,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
char str[NAME_LENGTH], ref[256], *nowrap, sclass[80], format[256], file_name[MAX_PATH_LENGTH], *slist,
|
char str[NAME_LENGTH], ref[256], *nowrap, sclass[80], format[256], file_name[MAX_PATH_LENGTH], *slist,
|
||||||
*svalue, comment[256];
|
*svalue, comment[256];
|
||||||
char display[NAME_LENGTH], attr_icon[80];
|
char display[NAME_LENGTH], attr_icon[80];
|
||||||
int i, j, i_line, index, colspan, n_attachments, line_len, thumb_status, max_line_len, n_lines,
|
int i, j, n, i_line, index, colspan, n_attachments, line_len, thumb_status, max_line_len, n_lines,
|
||||||
max_n_lines;
|
max_n_lines;
|
||||||
BOOL skip_comma;
|
BOOL skip_comma;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
@ -16442,6 +16442,15 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
rsputs2(lbs, absolute_link, display);
|
rsputs2(lbs, absolute_link, display);
|
||||||
|
|
||||||
rsputs(" ");
|
rsputs(" ");
|
||||||
|
for (i = n = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
|
if (attachment && attachment[i][0])
|
||||||
|
n++;
|
||||||
|
if (n > 5) {
|
||||||
|
if (highlight != message_id)
|
||||||
|
rsprintf("<a href=\"%s\">", ref);
|
||||||
|
rsprintf("<b>%dx", n);
|
||||||
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\"></b></a>");
|
||||||
|
} else {
|
||||||
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
if (attachment && attachment[i][0]) {
|
if (attachment && attachment[i][0]) {
|
||||||
strlcpy(str, attachment[i], sizeof(str));
|
strlcpy(str, attachment[i], sizeof(str));
|
||||||
@ -16453,6 +16462,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
||||||
attachment[i]+14, attachment[i]+14);
|
attachment[i]+14, attachment[i]+14);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (highlight != message_id)
|
if (highlight != message_id)
|
||||||
rsprintf("</a>\n", ref);
|
rsprintf("</a>\n", ref);
|
||||||
@ -16762,6 +16772,16 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
if (strieq(mode, "Threaded")) {
|
if (strieq(mode, "Threaded")) {
|
||||||
|
|
||||||
rsputs(" ");
|
rsputs(" ");
|
||||||
|
|
||||||
|
for (i = n = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
|
if (attachment && attachment[i][0])
|
||||||
|
n++;
|
||||||
|
if (n > 5) {
|
||||||
|
if (highlight != message_id)
|
||||||
|
rsprintf("<a href=\"%s\">", ref);
|
||||||
|
rsprintf("<b>%dx", n);
|
||||||
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\"></b></a>");
|
||||||
|
} else {
|
||||||
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
if (attachment && attachment[i][0]) {
|
if (attachment && attachment[i][0]) {
|
||||||
strlcpy(str, attachment[i], sizeof(str));
|
strlcpy(str, attachment[i], sizeof(str));
|
||||||
@ -16773,6 +16793,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
||||||
attachment[i]+14, attachment[i]+14);
|
attachment[i]+14, attachment[i]+14);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (highlight != message_id)
|
if (highlight != message_id)
|
||||||
rsprintf("</a>\n");
|
rsprintf("</a>\n");
|
||||||
@ -16868,6 +16889,15 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
/* show attachment icons */
|
/* show attachment icons */
|
||||||
rsputs("<td class=\"listatt\"> ");
|
rsputs("<td class=\"listatt\"> ");
|
||||||
|
|
||||||
|
for (i = n = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
|
if (attachment && attachment[i][0])
|
||||||
|
n++;
|
||||||
|
if (n > 5) {
|
||||||
|
if (highlight != message_id)
|
||||||
|
rsprintf("<a href=\"%s\">", ref);
|
||||||
|
rsprintf("<b>%dx", n);
|
||||||
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\"></b></a>");
|
||||||
|
} else {
|
||||||
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
if (attachment && attachment[i][0]) {
|
if (attachment && attachment[i][0]) {
|
||||||
strlcpy(str, attachment[i], sizeof(str));
|
strlcpy(str, attachment[i], sizeof(str));
|
||||||
@ -16879,6 +16909,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
||||||
attachment[i]+14, attachment[i]+14);
|
attachment[i]+14, attachment[i]+14);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rsputs(" </td>");
|
rsputs(" </td>");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user