diff options
Diffstat (limited to 'app/helpers/imports_helper.rb')
| -rw-r--r-- | app/helpers/imports_helper.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/imports_helper.rb b/app/helpers/imports_helper.rb index 5f9db3fb1..1c4549e50 100644 --- a/app/helpers/imports_helper.rb +++ b/app/helpers/imports_helper.rb @@ -1,6 +1,24 @@ # -*- coding: utf-8 -*- module ImportsHelper + # Import statuses helper + def import_status(status) + if %w[new running pending].include? status + content_tag :span, '', class: "fa fa-clock-o" + else + cls ='' + cls = 'success' if status == 'successful' + cls = 'warning' if status == 'warning' + cls = 'danger' if %w[failed aborted canceled].include? status + + content_tag :span, '', class: "fa fa-circle text-#{cls}" + end + end + + ############################## + # TO CLEAN!!! + ############################## + def fields_for_import_task_format(form) begin render :partial => import_partial_name(form), :locals => { :form => form } |
