Updated _modal partial javascript to adapt to new routing