generalize delete_cancel_detail template
code update and detail buttons done