Skip to content

Instantly share code, notes, and snippets.

@Veejay
Created June 4, 2012 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Veejay/2870953 to your computer and use it in GitHub Desktop.
Save Veejay/2870953 to your computer and use it in GitHub Desktop.
- if total > 0 && actual_or_estimated_hours == :actual_hours
- css_class = "actuals"
%li{:class => css_class, :style => "height: #{total}px"}
%span=total
- else
- css_class = ""
- total = work_weeks_for_date.map { |ww| ww.send(:estimated_hours) || 0 }.inject(:+) || 0
- mozilla_gradient = "background-image: -moz-linear-gradient(to bottom, #5E9B69 #{percentage}%, #7EBA8D 0%)"
- webkit_gradient = "background-image: -webkit-linear-gradient(top, #5E9B69 #{percentage}%, #7EBA8D 0%)"
- inline_style = ";#{mozilla_gradient};#{webkit_gradient}"
%li{:class => css_class, :style => "height: #{total}px#{inline_style}"}
%span=total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment