From 27ba50b4609131a83c986ea830e9926c1a358fa3 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sat, 2 Mar 2013 12:09:25 -0500 Subject: [PATCH] Extract time to complete partial --- app/views/stats/_actions.html.erb | 4 +--- app/views/stats/_time_to_complete.html.erb | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 app/views/stats/_time_to_complete.html.erb diff --git a/app/views/stats/_actions.html.erb b/app/views/stats/_actions.html.erb index f59431ca..7c48350b 100755 --- a/app/views/stats/_actions.html.erb +++ b/app/views/stats/_actions.html.erb @@ -1,6 +1,4 @@ -

<%= t('stats.actions_avg_completion_time', :count => (actions.ttc.avg*10).round/10.0) %> -<%= t('stats.actions_min_max_completion_days', :max => (actions.ttc.max*10).round/10.0, :min => (actions.ttc.min*10).round/10.0) %> -<%= t('stats.actions_min_completion_time', :time => actions.ttc.min_sec) %>

+<%= render :partial => 'time_to_complete', :locals => {:ttc => actions.ttc} -%>

<%= t('stats.actions_actions_avg_created_30days', :count => (actions.created_last30days*10.0/30.0).round/10.0 )%> <%= t('stats.actions_avg_completed_30days', :count => (actions.done_last30days*10.0/30.0).round/10.0 )%> diff --git a/app/views/stats/_time_to_complete.html.erb b/app/views/stats/_time_to_complete.html.erb new file mode 100644 index 00000000..e741526b --- /dev/null +++ b/app/views/stats/_time_to_complete.html.erb @@ -0,0 +1,4 @@ +

<%= t('stats.actions_avg_completion_time', :count => (ttc.avg*10).round/10.0) %> +<%= t('stats.actions_min_max_completion_days', :max => (ttc.max*10).round/10.0, :min => (ttc.min*10).round/10.0) %> +<%= t('stats.actions_min_completion_time', :time => ttc.min_sec) %>

+