Simplify stats projects view

Use `each_with_index` instead of hand-wrought index to loop through
projects, and use a partial for the duplicated empty list items.
Collapse duplication in stats project view