You can do this in a followup, but the next thing to do is to pass the activity types from db_constants into the template and iterate over them here to avoid harcoding anything.