#114: dataTransferMail.html

plugins/org.projectforge.plugins.datatransfer/src/main/resources/mail/dataTransferMail.html Path: plugins/...datatransfer/src/main/resources/mail/dataTransferMail.html · Lines: 64 · Type: Freemarker HTML email template 64 lines · 58 code · 4 comments · 2 blank

Observer activity notification email — sent to users who are watching a data transfer area (have userWantsToObserve=true). Notifies them about file actions by other users: uploads, renames, deletions, and external downloads.

Template variables

Content structure

  1. i18n greeting message (message variable, pre-localized by i18n resources)
  2. Activity table (all recent events):
    • Columns: Date, File name, Description, Action (eventType), Modified by
    • Iterates over auditEntries — each entry has timestamp, filenameAsString, descriptionAsString, eventType, byUserAsString
  3. Action button: "Data transfer link" — styled as a clickable button with class="button", links to ${link}
  4. Download events table (filtered to DOWNLOAD only):
    • Columns: Date, File name, Action, Downloaded by
    • Iterates over downloadAuditEntries
  5. Shared mail closing/footer via #INCLUDE directives

The separation of auditEntries vs downloadAuditEntries allows the recipient to scan "who downloaded what" without scrolling through upload/rename noise.

Trigger

This template is rendered by DataTransferObserverNotificationJob (a scheduled job that runs periodically, queries audit entries with notified=false, groups them by area, and sends one email per observer). After sending, the notified flag on each audit entry is set to true to prevent duplicates.