This code should be in asset_view.js. And assets.js should be deleted.

(There is an asset_view for the view of an individual asset, and an assets_view, for the view of the collection)