Implemented 'change <attrib>' and 'list change <attrib>'

SVN revision: 1448
This commit is contained in:
Stefan Ritt 2005-07-25 19:25:37 +00:00
parent 9e681ae7b2
commit 37047139ea
2 changed files with 18 additions and 12 deletions

View File

@ -1116,7 +1116,7 @@ If the attribute type is <b><code>userlist</code></b>, a drop-down box is displa
all user names from the current password file. This can be useful for example in a bug all user names from the current password file. This can be useful for example in a bug
tracking system, where a new entry gets assigned to an individual.<p> tracking system, where a new entry gets assigned to an individual.<p>
<LI><b><code>Display &lt;attribute&gt; = &lt;string&gt;</b></code> <LI><b><code>Change &lt;attribute&gt; = &lt;string&gt;</b></code>
<br> <br>
Instead of subsituting an attribute, the original attribute can be kept and just the Instead of subsituting an attribute, the original attribute can be kept and just the
output formatting can be changed. This can be very handy for constructing HTML links output formatting can be changed. This can be very handy for constructing HTML links
@ -1141,6 +1141,9 @@ changes one day, only one statement in the config file has to be changed, while
otherways (like with the <b><code>Subst Telephone = ...</code></b> option) all otherways (like with the <b><code>Subst Telephone = ...</code></b> option) all
entries would have to be changed manually.<p> entries would have to be changed manually.<p>
<LI><b><code>List Change &lt;attribute&gt; = &lt;string&gt;</b></code>
<br>
Same option for the list display.<p>
<LI><b><code>Execute new | edit | delete = &lt;command&gt;</b></code> <LI><b><code>Execute new | edit | delete = &lt;command&gt;</b></code>
<br> <br>

View File

@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG Contents: Web server program for Electronic Logbook ELOG
$Log$ $Log$
Revision 1.719 2005/07/25 19:25:37 ritt
Implemented 'change <attrib>' and 'list change <attrib>'
Revision 1.718 2005/07/25 18:37:21 ritt Revision 1.718 2005/07/25 18:37:21 ritt
Remove </ br> after [/code] Remove </ br> after [/code]
@ -6387,10 +6390,10 @@ PATTERN_LIST pattern_list[] = {
{"[/size]", "</font>"}, {"[/size]", "</font>"},
{"[font=", "<font face=\"%s\">"}, {"[font=", "<font face=\"%s\">"},
{"[/font]", "</font>"}, {"[/font]", "</font>"},
{"\r\n[code]", "<code><pre>"}, {"\r\n[code]", "<pre>"},
{"[code]", "<code><pre>"}, {"[code]", "<pre>"},
{"[/code]\r\n", "</pre></code>"}, {"[/code]\r\n", "</pre>"},
{"[/code]", "</pre></code>"}, {"[/code]", "</pre>"},
/* lists */ /* lists */
{"[list]\r", "<ul>"}, {"[list]\r", "<ul>"},
@ -15292,7 +15295,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
if (disp_attr_link == NULL || disp_attr_link[index]) if (disp_attr_link == NULL || disp_attr_link[index])
rsprintf("<a href=\"%s\">", ref); rsprintf("<a href=\"%s\">", ref);
sprintf(str, "Display %s", attr_list[i]); sprintf(str, "List Change %s", attr_list[i]);
if (getcfg(lbs->name, str, display, sizeof(display))) { if (getcfg(lbs->name, str, display, sizeof(display))) {
j = build_subst_list(lbs, (char (*)[NAME_LENGTH]) slist, j = build_subst_list(lbs, (char (*)[NAME_LENGTH]) slist,
(char (*)[NAME_LENGTH]) svalue, attrib, TRUE); (char (*)[NAME_LENGTH]) svalue, attrib, TRUE);
@ -20335,7 +20338,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
} else { } else {
rsprintf("%s:</td><td class=\"%s\">\n", attr_list[i], class_value); rsprintf("%s:</td><td class=\"%s\">\n", attr_list[i], class_value);
sprintf(str, "Display %s", attr_list[i]); sprintf(str, "Change %s", attr_list[i]);
if (getcfg(lbs->name, str, display, sizeof(display))) { if (getcfg(lbs->name, str, display, sizeof(display))) {
k = build_subst_list(lbs, (char (*)[NAME_LENGTH]) slist, k = build_subst_list(lbs, (char (*)[NAME_LENGTH]) slist,
(char (*)[NAME_LENGTH]) svalue, attrib, TRUE); (char (*)[NAME_LENGTH]) svalue, attrib, TRUE);
@ -21777,11 +21780,11 @@ void show_calendar(LOGBOOK * lbs)
strcpy(index, "1"); strcpy(index, "1");
show_html_header(lbs, FALSE, loc("Calendar"), TRUE, FALSE, NULL); show_html_header(lbs, FALSE, loc("Calendar"), TRUE, FALSE, NULL);
rsprintf("<body class=\"calwindow\"><form name=form1 method=\"GET\" action=\"\">\n"); rsprintf("<body class=\"calwindow\"><form name=form1 method=\"GET\" action=\".\">\n");
rsprintf("<input type=hidden name=\"i\" value=\"%s\">\n", index); rsprintf("<input type=hidden name=\"i\" value=\"%s\">\n", index);
rsprintf("<input type=hidden name=\"y\" value=\"%d\">\n", cur_year); rsprintf("<input type=hidden name=\"y\" value=\"%d\">\n", cur_year);
rsprintf("<script language=\"JavaScript\">\n\n"); rsprintf("<script type=\"text/javascript\">\n\n");
rsprintf("function submit_day(day)\n"); rsprintf("function submit_day(day)\n");
rsprintf("{\n"); rsprintf("{\n");
rsprintf(" opener.document.form1.d%s.value = day;\n", index, cur_year); rsprintf(" opener.document.form1.d%s.value = day;\n", index, cur_year);
@ -21804,14 +21807,14 @@ void show_calendar(LOGBOOK * lbs)
/* link to previous year */ /* link to previous year */
rsprintf("&nbsp;&nbsp;"); rsprintf("&nbsp;&nbsp;");
rsprintf("<a href=\"?i=%s&m=%d&y=%d\">", index, cur_mon, cur_year - 1); rsprintf("<a href=\"?i=%s&amp;m=%d&amp;y=%d\">", index, cur_mon, cur_year - 1);
rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_prev.png\" alt=\"%s\" title=\"%s\"></a>", loc("Previous Year"), loc("Previous Year")); rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_prev.png\" alt=\"%s\" title=\"%s\"></a>", loc("Previous Year"), loc("Previous Year"));
/* current year */ /* current year */
rsprintf("&nbsp;%d&nbsp;", cur_year); rsprintf("&nbsp;%d&nbsp;", cur_year);
/* link to next year */ /* link to next year */
rsprintf("<a href=\"?i=%s&m=%d&y=%d\">", index, cur_mon, cur_year + 1); rsprintf("<a href=\"?i=%s&amp;m=%d&amp;y=%d\">", index, cur_mon, cur_year + 1);
rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_next.png\" alt=\"%s\" title=\"%s\"></a>", loc("Next Year"), loc("Next Year")); rsprintf("<img border=0 align=\"absmiddle\" src=\"cal_next.png\" alt=\"%s\" title=\"%s\"></a>", loc("Next Year"), loc("Next Year"));
/* go to first day of month */ /* go to first day of month */
@ -21860,7 +21863,7 @@ void show_calendar(LOGBOOK * lbs)
break; break;
} }
rsprintf("</form></body></html>\n"); rsprintf("</table>\n</form></body></html>\n");
} }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/