added trim filter for template and added edit and delete buttons