This commit is contained in:
iCross 2013-05-25 10:19:58 +08:00
parent ba7d6558ee
commit ec173c4ce1
1 changed files with 3 additions and 3 deletions

View File

@ -51,15 +51,15 @@ class Survey
if ( self.result_type == Survey::ResultChart && self.deadline && Time.now > self.deadline ) ||
( self.result_type == Survey::ResultExtern && !self.extern_link.blank? ) ||
( self.result_type == Survey::ResultFile && self.upload_file? )
('<a href="'+Rails.application.routes.url_helpers.result_panel_survey_front_end_survey_path(self) + '"><img src="/assets/result.png" /></a>').html_safe
('<a target="_blank" href="'+Rails.application.routes.url_helpers.result_panel_survey_front_end_survey_path(self, :standalone => true) + '"><img src="/assets/result.png" /></a>').html_safe
else
''
end
end
def write
if self.deadline && Time.now < self.deadline
('<a href="' + Rails.application.routes.url_helpers.panel_survey_front_end_survey_path(self) + '"><img src="/assets/write.png" /></a>').html_safe
unless self.deadline && Time.now > self.deadline
('<a target="_blank" href="' + Rails.application.routes.url_helpers.panel_survey_front_end_survey_path(self, :standalone => true) + '"><img src="/assets/write.png" /></a>').html_safe
else
''
end