Optimized ResourceDetailView's constructor a bit

Solution using array, filter and array concat to build route instead of conditionals and string concat. Again, unimportant. Ignore if desired.