add link to rate trail from trail detail view and fix wrong js imports