From 6385059de8a96c0caf9a79e82a81b93b230a1add Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Fri, 1 Mar 2013 23:57:29 -0500 Subject: [PATCH] Increment list counter in project view This fixes a bug where if you have fewer than 10 projects, your top 10 projects were listed as: 6 - n/a (n/a) 6 - n/a (n/a) 6 - n/a (n/a) 6 - n/a (n/a) rather than 7 - n/a (n/a) 8 - n/a (n/a) 9 - n/a (n/a) 10 - n/a (n/a) --- app/views/stats/_projects.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/stats/_projects.html.erb b/app/views/stats/_projects.html.erb index 5d0d014a..a977f1dc 100755 --- a/app/views/stats/_projects.html.erb +++ b/app/views/stats/_projects.html.erb @@ -6,8 +6,8 @@ <%= i -%> - <%= link_to p.name, {:controller => "projects", :action => "show", :id => p.id}%> (<%=p.count %> <%= t('common.actions_midsentence', :count => p.count) %>)
<% end if i < 10 - i.upto 10 do |j| -%> - <%= i -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>)
+ (i+1).upto 10 do |j| -%> + <%= j -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>)
<% end end -%> @@ -21,8 +21,8 @@ <%= i -%> - <%= link_to p.name, {:controller => "projects", :action => "show", :id => p.id} %> (<%=p.count %> <%= t('common.actions_midsentence', :count => p.count) %>)
<% end if i < 10 - i.upto 10 do |j| -%> - <%= i -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>)
+ (i+1).upto 10 do |j| -%> + <%= j -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>)
<% end end -%> @@ -35,4 +35,4 @@ i+=1 -%> <%= i -%> - <%= link_to name, {:controller => "projects", :action => "show", :id => id} %> (<%=days %> <%= t('common.days_midsentence', :count => days) %>)
<% end -%> - \ No newline at end of file +