create a directive for the job buttons to encapsulate that funcitonality...

... better.  also fix when a field is undefined in the job details.

This should fix the error where it shows pending jobs as failing all over the place.