%h2= "#{@ticket.client}: #{@ticket.project} - #{@ticket}"

%ul.pills
  %li= link_to "#{t(:client)}: #{@ticket.client}", client_path(@ticket.project.client)
  %li= link_to "#{t(:project)}: #{@ticket.project}", project_path(@ticket.project)
  - if admin? || current_user.has_role?(:developer, @ticket.project)
    %li= link_to "#{t(:edit)}: #{@ticket}", edit_ticket_path
    %li= link_to t(:new_work_unit), new_ticket_work_unit_path(@ticket)

%p.ticket_metrics
  - if @ticket.estimated_hours && @ticket.percentage_complete
    = image_tag Gchart.pie(:title => "Estimated Hours vs Total Hours -- #{@ticket.percentage_complete}% complete",
      :size => '400x200', :bar_color => "364447,76959c", :data => [100 - @ticket.percentage_complete, @ticket.percentage_complete], :labels => ["Estimated Hours", "Hours Worked"])
    %br/
    %b Estimated Hours:
    = @ticket.estimated_hours
    %b Hours Worked:
    = @ticket.hours

= render "shared/work_unit_index"

= render :partial => "shared/files_and_comments", :locals => {:items => @ticket.files_and_comments.reverse, :id => 'ticket'}

%h2= "#{@ticket.client}: #{@ticket.project} - #{@ticket}"

%ul.pills
  %li= link_to "#{t(:client)}: #{@ticket.client}", client_path(@ticket.project.client)
  %li= link_to "#{t(:project)}: #{@ticket.project}", project_path(@ticket.project)
  - if admin? || current_user.has_role?(:developer, @ticket.project)
    %li= link_to "#{t(:edit)}: #{@ticket}", edit_ticket_path
    %li= link_to t(:new_work_unit), new_ticket_work_unit_path(@ticket)

%p.ticket_metrics
  - if @ticket.estimated_hours && @ticket.percentage_complete
    = image_tag Gchart.pie(:title => "Remaining Estimated Hours vs Hours Worked -- #{@ticket.percentage_complete}% complete",
      :size => '400x200', :bar_color => "364447,76959c", :data => [100 - @ticket.percentage_complete, @ticket.percentage_complete], :labels => ["Remaining Estimated", "Hours Worked"])
    %br/
    %b Estimated Hours:
    = @ticket.estimated_hours
    %b Hours Worked:
    = @ticket.hours

= render "shared/work_unit_index"

= render :partial => "shared/files_and_comments", :locals => {:items => @ticket.files_and_comments.reverse, :id => 'ticket'}

Fix up pie chart a tiny bit more
Fix up pie chart a tiny bit more
