I assume that you are only using this one to calculate the progress percentage. I think that it would be better to create a helper method for that calculation instead of doing that inline in the template. You can also do the formatting in that new helper method as well.