diff options
| author | jpl | 2017-08-31 14:40:21 +0200 | 
|---|---|---|
| committer | jpl | 2017-08-31 14:40:21 +0200 | 
| commit | 61fb31f1f6664d2dc47d0b79d5b524d59c7d14bc (patch) | |
| tree | 9c12261f45d3daf4fe8c6e1ce583d840e892bb18 /app/helpers/newapplication_helper.rb | |
| parent | 412861903ed16b52bf57b394b1ea599d56fb75d3 (diff) | |
| download | chouette-core-61fb31f1f6664d2dc47d0b79d5b524d59c7d14bc.tar.bz2 | |
Refs #4369: adding import status helper
Diffstat (limited to 'app/helpers/newapplication_helper.rb')
| -rw-r--r-- | app/helpers/newapplication_helper.rb | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index df19113db..e6a6f7e11 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -287,4 +287,18 @@ module NewapplicationHelper      end    end +  # 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 +  end | 
