mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Display attachment icon with "thread display"
SVN revision: 2092
This commit is contained in:
parent
09b0aa6a20
commit
4aed402f86
13
src/elogd.c
13
src/elogd.c
@ -16440,6 +16440,19 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
else
|
else
|
||||||
rsputs2(lbs, absolute_link, display);
|
rsputs2(lbs, absolute_link, display);
|
||||||
|
|
||||||
|
rsputs(" ");
|
||||||
|
for (i = 0; i < MAX_ATTACHMENTS; i++)
|
||||||
|
if (attachment[i][0]) {
|
||||||
|
strlcpy(str, attachment[i], sizeof(str));
|
||||||
|
str[13] = 0;
|
||||||
|
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
|
||||||
|
url_encode(ref, sizeof(ref)); /* for file names with special characters like "+" */
|
||||||
|
|
||||||
|
rsprintf("<a href=\"%s\" target=\"_blank\">", ref);
|
||||||
|
rsprintf("<img border=\"0\" align=\"absmiddle\" src=\"attachment.png\" alt=\"%s\" title=\"%s\"></a>",
|
||||||
|
attachment[i]+14, attachment[i]+14);
|
||||||
|
}
|
||||||
|
|
||||||
if (highlight != message_id)
|
if (highlight != message_id)
|
||||||
rsprintf("</a>\n", ref);
|
rsprintf("</a>\n", ref);
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user