fix detail page and add edit button to detail view
merge