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)
This commit is contained in:
Katrina Owen 2013-03-01 23:57:29 -05:00
parent f375c06964
commit 6385059de8

View file

@ -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) %>) <br/>
<% end
if i < 10
i.upto 10 do |j| -%>
<%= i -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>) <br/>
(i+1).upto 10 do |j| -%>
<%= j -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>) <br/>
<% 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) %>) <br/>
<% end
if i < 10
i.upto 10 do |j| -%>
<%= i -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>) <br/>
(i+1).upto 10 do |j| -%>
<%= j -%> - <%=t('common.not_available_abbr')%> (<%=t('common.not_available_abbr')%>) <br/>
<% 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) %>) <br/>
<% end -%>
</div>
</div>