add attachment button to legent, only when user click on course node