refactor detailsView to common