add serial_number to print format and reply email subject

This commit is contained in:
rulingcom 2026-07-01 13:55:01 +08:00
parent e3f0c0db2a
commit 68da96dfcb
3 changed files with 7 additions and 3 deletions

View File

@ -385,7 +385,7 @@ class Admin::AsksController < OrbitAdminController
:mail_sentdate=>@mail_sentdate,
:module_app=>@module_app,
:mail_to=>@group_mail,
:mail_subject=>mail_from+" #{t('ask.reply')}",
:mail_subject=>" #{t('ask.reply')}[#{email_er.get_serial_number}]"+mail_from,
:template=>'admin/asks/email',
:template_data=>{
"host_url" => host_url,

View File

@ -560,6 +560,8 @@ module Admin::AsksHelper
case format_text[1...-1]
when 'ask_time'
text = text.gsub(format_text,@ask_question.created_at.strftime('%Y/%m/%d %H:%M'))
when 'serial_number'
text = text.gsub(format_text,@ask_question.get_serial_number.to_s)
when 'title','name','mail','phone','appointment'
text = text.gsub(format_text,@ask_question.send(format_text[1...-1]).to_s)
when 'category'

View File

@ -4,6 +4,8 @@
<br>
{ask_time} -> <%= t('ask.ask_time') %>
<br>
{serial_number} -> <%= t('ask.serial_number') %>
<br>
{title} -> <%= t('title') %>
<br>
{category} -> <%= t("#{trans}.ask_category_id") %>
@ -35,7 +37,7 @@
<br>
{custom|format} -><%= t("ask.custom_format_explain") %>
<br>
{?_title} -> ?<%= t("ask.can_be_filled_with") %>ask_time、title、category、name、sex、mail、phone、appointment、agree_show、custom、custom1、custom2、custom3 ...,<%= t("ask.show_title_trans") %>, <%= t("ask.like") %>{sex_title}-><%= t("#{trans}.sex") %>
{?_title} -> ?<%= t("ask.can_be_filled_with") %>ask_time、serial_number、title、category、name、sex、mail、phone、appointment、agree_show、custom、custom1、custom2、custom3 ...,<%= t("ask.show_title_trans") %>, <%= t("ask.like") %>{sex_title}-><%= t("#{trans}.sex") %>
<br>
<br>
<%= t("ask.example") %>:
@ -123,4 +125,4 @@
</tr>
</tbody>
</table>
</div>
</div>