Add ask_status_histories and add release comment, release file field.
This commit is contained in:
1 parent
d2edc29945
commit
18a591d1f2
8 files changed
+257
-94
No files matched your search
@@ -6,6 +6,9 @@ class Admin::AsksController < OrbitAdminController
|
||||
before_action :set_askquestion, only: [:edit, :destroy, :update, :print]
|
||||
layout :compute_layout
|
||||
helper_method :ask_thead
|
||||
def show
|
||||
@ask_status_histories = @ask_question.ask_status_histories.reverse
|
||||
end
|
||||
def compute_layout
|
||||
if action_name=='print'
|
||||
false
|
||||
@@ -389,7 +392,7 @@ class Admin::AsksController < OrbitAdminController
|
||||
temp_params['custom_values'][to_save[0]] = [temp_params['custom_values'][to_save[0]].original_filename ,to_save[1].file.url]
|
||||
end
|
||||
end
|
||||
temp_params = temp_params.merge({reviewer: current_user.member_profile, review_time: DateTime.now})
|
||||
temp_params = temp_params.merge({reviewer: current_user.member_profile, review_time: DateTime.now, user: current_user})
|
||||
@ask_question.update_attributes(temp_params)
|
||||
if @ask_question.send_email?
|
||||
build_email(@ask_question)
|
||||
@@ -410,6 +413,12 @@ class Admin::AsksController < OrbitAdminController
|
||||
site = Site.first
|
||||
mail_from = site.title_translations[site['default_locale']]
|
||||
|
||||
new_history = email_er.new_history
|
||||
host_url = Site.first.root_url rescue "http://"
|
||||
if host_url == "http://"
|
||||
host_url = request.protocol + request.host_with_port
|
||||
end
|
||||
|
||||
email_er.email.update_attributes(
|
||||
:mail_lang=> site['default_locale'],
|
||||
:create_user=>current_user,
|
||||
@@ -419,7 +428,9 @@ class Admin::AsksController < OrbitAdminController
|
||||
:mail_subject=>mail_from+" #{t('ask.reply')}:",
|
||||
:template=>'admin/asks/email',
|
||||
:template_data=>{
|
||||
"reply" => email_er.reply
|
||||
"host_url" => host_url,
|
||||
"reply" => email_er.reply,
|
||||
"attachment" => (new_history ? new_history.file.url : nil)
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user