From 52862c956654f40a60fa327c83763458c3607191 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 4 Feb 2004 09:23:18 +0000 Subject: [PATCH] Added 'use email heading edit' SVN revision: 743 --- doc/config.html | 31 +++++++++++++++++-------------- src/elogd.c | 10 +++++++++- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/doc/config.html b/doc/config.html index d8607772..0814f509 100755 --- a/doc/config.html +++ b/doc/config.html @@ -315,7 +315,7 @@ Password file = admin.pwd Admin user = bill -Note that there can be a [global] section for each top level group of logbooks. +Note that there can be a [global] section for each top level group of logbooks. The rule is that a configuration setting in an individual logbook section overrides a setting in the [global <top group>] setting, which by itsel overrides a setting in the [global] section. This way one can define settings for all top level @@ -605,7 +605,7 @@ It can contain for example a link back to the main logbook selection page like: <center><a href="/">Main page</a></center> -Or it can contain other useful links. If a file is specified, it must +Or it can contain other useful links. If a file is specified, it must be present in the resource directory. Alternatively, an absolute path can be used if the file name starts with a "/" (Unix) or "\" or @@ -689,7 +689,7 @@ When using the Options <attribute> to specify a list of possible options, this list is fixed. Sometimes it is desirable to extend the list when a new entry in a logbook is made and a certain option is missing on the list. By adding the attribute name to the Extandable options -list, a button appears next to the attribute in the message entry form which +list, a button appears next to the attribute in the message entry form which lets you add new options to the list. The elogd.cfg configuration file is then automatically updated. When a new logbook entry gets made, the new option automatically appears in the drop-down box for that attribute. @@ -974,7 +974,7 @@ The administrator has to ensure then of course that only trusted people can edit
  • Last submission = <string>
    -This option determines what gets displayed on the logbook selection page in the +This option determines what gets displayed on the logbook selection page in the Last submission colum. The default string is $entry date by $author. If a logbook does not contain an author attribute, another string can be chosen. @@ -997,7 +997,7 @@ Options Operating System = Linux, Windows

    -For the operating system version, you would like a list, but this list has to be different +For the operating system version, you would like a list, but this list has to be different for Linux and Windows. This can be achieved with conditional attributes. Simply write following configuration:

    @@ -1018,14 +1018,14 @@ in the line of the Operating System which has to be pressed to make the Version The number {1} and {2} in the configuration file are called conditions. Depending on these conditions, certain other lines can be activated. So if the Operating System -Linux is selected, condition {1} is true, which selects the line starting -with {1} to select the options 2.2, 2.4, 2.6. +Linux is selected, condition {1} is true, which selects the line starting +with {1} to select the options 2.2, 2.4, 2.6.

    This technique offers various other possibilities, since any configuration option can be made conditional by adding a {<n>} in front of that line where <n> is an arbitrary number. One often used possibility is the definition -of forms. Depending on an attribute, the configuration option +of forms. Depending on an attribute, the configuration option Prset text = ... can be used to copy some pre-defined forms into the message body, which can then be filled out. Consider following example:

    @@ -1250,6 +1250,7 @@ individual logbook sections, one has to log in to each logbook separately.

  • Use Email Subject = <string>
  • Use Email From = <string>
  • Use Email Heading = <string> +
  • Use Email Heading Edit = <string>
  • Omit Email To = 0|1
  • Suppress Email to users = 0|1 @@ -1280,7 +1281,9 @@ used as the email subject. The text can contain $<attribute> attribute. For a full list of possible substitutions, see the "Subst <attribute>" option. The Use Email Heading = <string> specifies the text for the email heading line. -Default is "A new entry has been submitted/updated on [host]".

    +Default is "A new entry has been submitted on [host]". The option +Use Email Heading Edit = <string> works the same +way for updated (edited) entries.

    The option Use Email From = <string> is used for the "From:" field in the email. Please note that more and @@ -1490,7 +1493,7 @@ Default for "Use Lock" is 0.

  • Date on reply = 0|1|2
    If this flag is nozero, the current date is placed between the quoted original entry -and the new entry. 1 causes the date to appear on top of the quoted entry, +and the new entry. 1 causes the date to appear on top of the quoted entry, 2 cuses the date to appear below the quoted entry. This can be useful for email notifications, if one wants to see the time history of all replies in the email messages. Default is 0. @@ -1575,7 +1578,7 @@ this menu options starts the synchronization:

    On the left side one sees the entry ID's. Entries which are equal locally and remotely are not displayed. Here are the rules for synchronization:

    -
      +
      • If an entry has been modified locally but not remotely, it is submitted to the remote server. @@ -1597,7 +1600,7 @@ saved locally.
      • If new entries exist locally and remotely having the same entry ID, the local entries are changed to have higher entry IDs, then the remote ones are retrieved. Care -should be taken if external links (such as elog:123) to the +should be taken if external links (such as elog:123) to the local entries are used, since they will point afterwards to the wrong entry.


      @@ -1606,7 +1609,7 @@ local entries are used, since they will point afterwards to the wrong entry. Normally, only the logbook entries are mirrored. One can also mirror the contents of the elogd.cfg configuration file for individual logbooks. This can be turned on -by setting this option to 1. Default is 1. +by setting this option to 1. Default is 1. Only the individual logbook section is mirrored, not the [global] section. Settings which are specific to one server, for example the URL = statement, should then be kept in the [global] section, so that they are not mirrored between @@ -1614,7 +1617,7 @@ different servers.

    • Mirror cron = Minute Hour Day Month Weekday
      -This statement turns on periodic mirroring. The format is similar to the UNIX +This statement turns on periodic mirroring. The format is similar to the UNIX cron command. Each of the five values can either be an asterisk, which means all possible values, a comma-separated list or a range. It can be explained most easily with examples:

      diff --git a/src/elogd.c b/src/elogd.c index c0e42ebd..e55d9f87 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.234 2004/02/04 09:21:37 midas + Added 'use email heading edit' + Revision 1.233 2004/02/04 08:25:06 midas Only [global] admin user sees 'synchronize all logbooks' @@ -11964,7 +11967,13 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, if (flags & 1) { if (getcfg(lbs->name, "Use Email heading", str)) { + if (old_mail) { + if (!getcfg(lbs->name, "Use Email heading edit", str)) + getcfg(lbs->name, "Use Email heading", str); + } + sprintf(mail_text + strlen(mail_text), str); + } else { if (old_mail) sprintf(mail_text + strlen(mail_text), @@ -14126,7 +14135,6 @@ void show_selection_page() } } - phier = get_logbook_hierarchy(); show_title = 0;