'Returns html suitable for embedding in another page.'

def _get_embedded_history_html(self, trans, id):

    decoded_id = self.decode_id(id)
    history = self.history_manager.get_accessible(decoded_id, trans.user, current_history=trans.history)
    user_is_owner = (trans.user == history.user)
    history.annotation = self.get_item_annotation_str(trans.sa_session, history.user, history)
    history_dictionary = self.history_serializer.serialize_to_view(history, view='detailed', user=trans.user, trans=trans)
    contents = self.history_serializer.serialize_contents(history, 'contents', trans=trans, user=trans.user)
    history_dictionary['annotation'] = history.annotation
    filled = trans.fill_template('history/embed.mako', item=history, user_is_owner=user_is_owner, history_dict=history_dictionary, content_dicts=contents)
    return filled
