Source

Ochs / ochs_filebrowser / templates / filebrowser / custom_field.html

<input id="{{ final_attrs.id }}" type="text" name="{{ final_attrs.name }}" value="{{ final_attrs.value }}" />
<a href="javascript:FileBrowser.show('{{ final_attrs.id }}', '{{ final_attrs.initial_directory }}?pop=1&filter_type={{ final_attrs.format }}');" class="fb_show">
    <img src="{{ final_attrs.search_icon }}" alt="" />
</a>
{% if final_attrs.value %}
<p class="help" id="help_{{ final_attrs.id }}">
    <a href="{{ final_attrs.preview }}" target="_blank" id="link_{{ final_attrs.id }}">
        <img id="image_{{ final_attrs.id }}" alt="" class="preview" src="{{ final_attrs.thumbnail }}" />
    </a>
</p>
{% else %}
<p class="help" id="help_{{ final_attrs.id }}" style="display: none;">
    <a href="javascript://" target="_self" id="link_{{ final_attrs.id }}">
        <img id="image_{{ final_attrs.id }}" alt="" class="preview" src="" />
    </a>
</p>
{% endif %}