

def index_instance_item_link(index_instance_item):
    if isinstance(index_instance_item, IndexInstanceNode):
        if index_instance_item.index_template_node.link_documents:
            icon_template = '<i class="fa fa-folder"></i>'
        else:
            icon_template = '<i class="fa fa-level-up fa-rotate-90"></i>'
    else:
        icon_template = ''
    return mark_safe(('%(icon_template)s&nbsp;<a href="%(url)s">%(text)s</a>' % {
        'url': index_instance_item.get_absolute_url(),
        'icon_template': index_instance_item,
        'text': index_instance_item,
    }))

dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/document_indexing/widgets.py index_instance_item_link/VarMisuse@72/171 `icon_template`->`index_instance_item`