This commit is contained in:
Oleksandr Turchyn
2024-09-18 19:47:47 +03:00
committed by Oleksandr Turchyn
parent 3c60fb4ee6
commit e9d728fa4a
132 changed files with 1121 additions and 600 deletions
+4 -4
View File
@@ -21,7 +21,7 @@ class TemplatesController < ApplicationController
end
def new
@template.name = "#{@base_template.name} (Clone)" if @base_template
@template.name = "#{@base_template.name} (#{I18n.t('clone')})" if @base_template
end
def edit
@@ -87,11 +87,11 @@ class TemplatesController < ApplicationController
if params[:permanently].present?
@template.destroy!
'Template has been removed.'
I18n.t('template_has_been_removed')
else
@template.update!(archived_at: Time.current)
'Template has been archived.'
I18n.t('template_has_been_archived')
end
redirect_back(fallback_location: root_path, notice:)
@@ -123,7 +123,7 @@ class TemplatesController < ApplicationController
if template.account == current_account
redirect_to(edit_template_path(@template))
else
redirect_back(fallback_location: root_path, notice: 'Template has been cloned')
redirect_back(fallback_location: root_path, notice: I18n.t('template_has_been_cloned'))
end
end