Refactor `show_edit_model` templatetag

As described in #2468

Doc update underway