mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Show only subscribe options for logbooks which email notification turned on
SVN revision: 1775
This commit is contained in:
parent
db417346ed
commit
95186b9fa9
24
src/elogd.c
24
src/elogd.c
@ -11929,11 +11929,15 @@ void show_config_page(LOGBOOK * lbs)
|
|||||||
/* check if user has access */
|
/* check if user has access */
|
||||||
if (!isparam("unm") || check_login_user(&lb_list[i], getparam("unm"))) {
|
if (!isparam("unm") || check_login_user(&lb_list[i], getparam("unm"))) {
|
||||||
|
|
||||||
if (email_notify[i])
|
/* check if emails are enabled for this logbook */
|
||||||
rsprintf("<input type=checkbox checked id=\"lb%d\" name=\"sub_lb%d\" value=\"1\">\n", i, i);
|
if (!getcfg(lb_list[i].name, "Suppress email to users", str, sizeof(str)) ||
|
||||||
else
|
atoi(str) == 0) {
|
||||||
rsprintf("<input type=checkbox id=\"lb%d\" name=\"sub_lb%d\" value=\"1\">\n", i, i);
|
if (email_notify[i])
|
||||||
rsprintf("<label for=\"lb%d\">%s</label><br>\n", i, lb_list[i].name);
|
rsprintf("<input type=checkbox checked id=\"lb%d\" name=\"sub_lb%d\" value=\"1\">\n", i, i);
|
||||||
|
else
|
||||||
|
rsprintf("<input type=checkbox id=\"lb%d\" name=\"sub_lb%d\" value=\"1\">\n", i, i);
|
||||||
|
rsprintf("<label for=\"lb%d\">%s</label><br>\n", i, lb_list[i].name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -16325,7 +16329,8 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands,
|
|||||||
loc("Last"), loc("Week"));
|
loc("Last"), loc("Week"));
|
||||||
rsprintf("<option %s value=-1>%s %s\n", i == -1 ? "selected" : "", loc("Last"), loc("Day"));
|
rsprintf("<option %s value=-1>%s %s\n", i == -1 ? "selected" : "", loc("Last"), loc("Day"));
|
||||||
|
|
||||||
rsprintf("<option %s value=\"_all_\">%s\n", i == 0 ? "selected" : "", loc("All entries"));
|
sprintf(str, "-- %s --", list[index]);
|
||||||
|
rsprintf("<option %s value=\"_all_\">%s\n", i == 0 ? "selected" : "", str);
|
||||||
|
|
||||||
rsprintf("<option %s value=1>%s %s\n", i == 1 ? "selected" : "", loc("Next"), loc("Day"));
|
rsprintf("<option %s value=1>%s %s\n", i == 1 ? "selected" : "", loc("Next"), loc("Day"));
|
||||||
rsprintf("<option %s value=7>%s %s\n", i == 7 ? "selected" : "", loc("Next"), loc("Week"));
|
rsprintf("<option %s value=7>%s %s\n", i == 7 ? "selected" : "", loc("Next"), loc("Week"));
|
||||||
@ -17939,11 +17944,8 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
|
|||||||
|| isparam("subtext");
|
|| isparam("subtext");
|
||||||
|
|
||||||
for (i = 0; i < lbs->n_attr; i++)
|
for (i = 0; i < lbs->n_attr; i++)
|
||||||
if (isparam(attr_list[i]) && (attr_flags[i] & (AF_DATE | AF_DATETIME)) == 0) {
|
if (isparam(attr_list[i]) && (attr_flags[i] & (AF_DATE | AF_DATETIME)) == 0)
|
||||||
strlcpy(str, getparam(attr_list[i]), sizeof(str));
|
disp_filter = TRUE;
|
||||||
if (str[0] && !strieq(str, "_all_") && strncmp(str, "--", 2) != 0)
|
|
||||||
disp_filter = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < lbs->n_attr; i++) {
|
for (i = 0; i < lbs->n_attr; i++) {
|
||||||
if (attr_flags[i] & (AF_DATE | AF_DATETIME)) {
|
if (attr_flags[i] & (AF_DATE | AF_DATETIME)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user