mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Implemented attachment icons in summary/threaded list
SVN revision: 2088
This commit is contained in:
parent
8643bd3268
commit
40bce3f5d5
@ -131,7 +131,8 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
AdditionalIncludeDirectories="\openssl\include;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -234,6 +235,18 @@
|
|||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
>
|
>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Library Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\OpenSSL\lib\VC\libeay32MD.lib"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\OpenSSL\lib\VC\ssleay32MD.lib"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="\mxml;\openssl\include;"
|
AdditionalIncludeDirectories="\openssl\include;\mxml"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
|
|||||||
40
src/elogd.c
40
src/elogd.c
@ -16746,6 +16746,20 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strieq(mode, "Threaded")) {
|
if (strieq(mode, "Threaded")) {
|
||||||
|
|
||||||
|
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");
|
rsprintf("</a>\n");
|
||||||
else
|
else
|
||||||
@ -16832,10 +16846,27 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, int exp
|
|||||||
strencode_nouml(str);
|
strencode_nouml(str);
|
||||||
else
|
else
|
||||||
rsputs(" ");
|
rsputs(" ");
|
||||||
|
|
||||||
rsputs("</td>\n");
|
rsputs("</td>\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (strieq(mode, "Threaded"))
|
if (strieq(mode, "Summary")) {
|
||||||
rsprintf("</tr>\n");
|
/* show attachment icons */
|
||||||
|
rsputs("<td class=\"listatt\"> ");
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
rsputs(" </td>");
|
||||||
}
|
}
|
||||||
|
|
||||||
colspan = n_attr_disp;
|
colspan = n_attr_disp;
|
||||||
@ -19877,6 +19908,11 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
|||||||
if (!strieq(mode, "Full") && n_line > 0 && show_text)
|
if (!strieq(mode, "Full") && n_line > 0 && show_text)
|
||||||
rsprintf("<th class=\"listtitle\">%s</th>\n", loc("Text"));
|
rsprintf("<th class=\"listtitle\">%s</th>\n", loc("Text"));
|
||||||
|
|
||||||
|
if (strieq(mode, "Summary")) {
|
||||||
|
rsprintf("<th width=\"10\" class=\"listtitle\"><img src=\"attachment.png\" alt=\"%s\" title=\"%s\"</th>",
|
||||||
|
loc("Attachments"), loc("Attachments"));
|
||||||
|
}
|
||||||
|
|
||||||
rsprintf("</tr>\n\n");
|
rsprintf("</tr>\n\n");
|
||||||
}
|
}
|
||||||
} /* if (!csv && !xml) */
|
} /* if (!csv && !xml) */
|
||||||
|
|||||||
@ -313,6 +313,14 @@ td {
|
|||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.listatt {
|
||||||
|
border:1px solid #808040;
|
||||||
|
border-top:1px solid white;
|
||||||
|
border-left:1px solid white;
|
||||||
|
background-color:#B0FFB0;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
/* attachment line */
|
/* attachment line */
|
||||||
|
|
||||||
.attachment {
|
.attachment {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user