diff options
| author | Luc Donnet | 2015-05-19 14:08:06 +0200 | 
|---|---|---|
| committer | Luc Donnet | 2015-05-19 14:08:06 +0200 | 
| commit | c5979f9c2c01804220f4ecbeef2cc3ce175ce14e (patch) | |
| tree | 3207069b919877e3934792688b9fb5453d7d09fb /app/helpers | |
| parent | 6d44a1dbe148270ddc854a40926144913fae2577 (diff) | |
| download | chouette-core-c5979f9c2c01804220f4ecbeef2cc3ce175ce14e.tar.bz2 | |
Add format for iev jobs
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/job_status_icon_helper.rb | 18 | 
1 files changed, 14 insertions, 4 deletions
diff --git a/app/helpers/job_status_icon_helper.rb b/app/helpers/job_status_icon_helper.rb index 7dc325d30..0e8f05e90 100644 --- a/app/helpers/job_status_icon_helper.rb +++ b/app/helpers/job_status_icon_helper.rb @@ -3,17 +3,27 @@ module JobStatusIconHelper    def job_status_title(object)      status = object.status      name = object.name +    object_name = object.class.model_name.human.capitalize      title = ""      if %w{ aborted canceled }.include?(status) -      title += "<span class='aborted'><i class='fa fa-times'></i>" +      title += "<span class='name aborted'><i class='fa fa-times'></i>"      elsif %w{ created scheduled }.include?(status) -      title += "<span class='processed'><i class='fa fa-spinner fa-spin'></i>" +      title += "<span class='name processed'><i class='fa fa-spinner fa-spin'></i>"      elsif %w{ terminated}.include?(status) -      title += "<span class='terminated'><i class='fa fa-check'></i>" +      title += "<span class='name terminated'><i class='fa fa-check'></i>"      end -    title += "#{truncate(name, :length => 20)}</span>" +    title += "#{object_name} #{truncate(name, :length => 20)}</span>" +    title += "<p class='format'>[#{object.format.upcase}]</p>" if object.format.present? +    title.html_safe +  end + +  def job_status_short_title(object) +    name = object.name +    object_name = object.class.model_name.human.capitalize    + +    title = "#{object_name} #{truncate(name, :length => 20)}"      title.html_safe    end  | 
