mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
499d7820a2
`format_text` accepts `render_mode:` (`:in_app_html`, `:external_html`, `:external_text`), which resolves the `only_path`, `static_html` and `plain_text` context flags as a set. External surfaces (mailer HTML body, future RSS/PDF/webhook) need absolute URLs and static rendering together; pinning the trio at the public API keeps callers from forgetting one. Explicit primitive kwargs still override. `MailFormattingHelper` exposes `format_mail_html` and `format_mail_text` thin wrappers around `format_text(render_mode:)`. The `_html` / `_text` suffix matches the `.html.erb` / `.text.erb` template extension so caller intent stays visible in the view, with no introspection of `formats`. The five WorkPackageMailer view sites use the helpers; `_work_package_details`, `mentioned.html`, `mentioned.text`, `watcher_changed.html`, `watcher_changed.text` drop the `static_html:`/`only_path:`/`plain_text:` boilerplate.