refactor display of ontology terms

both "typeDetail" and "formatDetail" are now using the same template.
correct termDetail refactored code