Pass locals from render_document_index to the index partial

fixes #872