mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Implemented 'List after submit'
SVN revision: 2327
This commit is contained in:
parent
7e16a552ef
commit
e5fa0cd237
@ -21,9 +21,9 @@ Global
|
|||||||
{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}.Debug|Win32.ActiveCfg = Debug|Win32
|
{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}.Release|Win32.ActiveCfg = Release|Win32
|
{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Debug|Win32.ActiveCfg = Debug|Win32
|
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Release|Win32.ActiveCfg = Release|Win32
|
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Debug|Win32.ActiveCfg = Debug|Win32
|
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Release|Win32.ActiveCfg = Release|Win32
|
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Release|Win32.Build.0 = Release|Win32
|
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Release|Win32.Build.0 = Release|Win32
|
||||||
{77ED3530-9382-4830-8513-9729C051A93E}.Debug|Win32.ActiveCfg = Debug|Win32
|
{77ED3530-9382-4830-8513-9729C051A93E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
|||||||
@ -2473,6 +2473,12 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
|
|||||||
to the logbook selection page instead to the login page. The default is
|
to the logbook selection page instead to the login page. The default is
|
||||||
<b>0</b>.
|
<b>0</b>.
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<b><code>List after submit = 0|1</code></b><br>
|
||||||
|
If this flag is <b>1</b>, the list page is shown after the
|
||||||
|
submission of a new entry. If this flag is <b>0</b>, the entry just
|
||||||
|
submitted is shown. The default is <b>0</b>.
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b><code>Restrict edit = 0|1</code></b><br>
|
<b><code>Restrict edit = 0|1</code></b><br>
|
||||||
If this flag is <b>1</b>, users can only edit their own messages. The
|
If this flag is <b>1</b>, users can only edit their own messages. The
|
||||||
|
|||||||
20
src/elogd.c
20
src/elogd.c
@ -22666,7 +22666,10 @@ void submit_elog(LOGBOOK * lbs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(str, "%d%s", message_id, mail_param);
|
if (getcfg(lbs->name, "List after submit", str, sizeof(str)) && atoi(str) == 1)
|
||||||
|
sprintf(str, "");
|
||||||
|
else
|
||||||
|
sprintf(str, "%d%s", message_id, mail_param);
|
||||||
redirect(lbs, str);
|
redirect(lbs, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23568,9 +23571,12 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
|
|||||||
strlcpy(str, loc(menu_item[i]), sizeof(str));
|
strlcpy(str, loc(menu_item[i]), sizeof(str));
|
||||||
url_encode(str, sizeof(str));
|
url_encode(str, sizeof(str));
|
||||||
|
|
||||||
if (strieq(menu_item[i], "list"))
|
if (strieq(menu_item[i], "list")) {
|
||||||
rsprintf(" <a href=\".?id=%d\">%s</a> \n", message_id, loc(menu_item[i]));
|
if (getcfg(lbs->name, "Back to main", str, sizeof(str)) && atoi(str) == 1)
|
||||||
else
|
rsprintf(" <a href=\"../\">%s</a> \n", loc(menu_item[i]));
|
||||||
|
else
|
||||||
|
rsprintf(" <a href=\".?id=%d\">%s</a> \n", message_id, loc(menu_item[i]));
|
||||||
|
} else
|
||||||
rsprintf(" <a href=\"%d?cmd=%s\">%s</a> \n", message_id, str, loc(menu_item[i]));
|
rsprintf(" <a href=\"%d?cmd=%s\">%s</a> \n", message_id, str, loc(menu_item[i]));
|
||||||
|
|
||||||
if (i < n - 1)
|
if (i < n - 1)
|
||||||
@ -26216,6 +26222,12 @@ void interprete(char *lbook, char *path)
|
|||||||
|
|
||||||
/* check for "List" button */
|
/* check for "List" button */
|
||||||
if (strieq(command, loc("List"))) {
|
if (strieq(command, loc("List"))) {
|
||||||
|
|
||||||
|
if (getcfg(lbs->name, "Back to main", str, sizeof(str)) && atoi(str) == 1) {
|
||||||
|
redirect(lbs, "../");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
show_elog_list(lbs, 0, 0, 0, TRUE, NULL);
|
show_elog_list(lbs, 0, 0, 0, TRUE, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user