forked from enviPath/enviPy
[Feature] Simple template extension mechanism (#361)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#361
This commit is contained in:
@ -1,21 +1,34 @@
|
||||
{% extends "collections/paginated_base.html" %}
|
||||
{% load envipytags %}
|
||||
|
||||
{% block page_title %}Compounds{% endblock %}
|
||||
|
||||
{% block action_button %}
|
||||
{% if meta.can_edit %}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-sm"
|
||||
onclick="document.getElementById('new_compound_modal').showModal(); return false;"
|
||||
>
|
||||
New Compound
|
||||
</button>
|
||||
{% endif %}
|
||||
<div class="flex items-center gap-2">
|
||||
{% if meta.can_edit %}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-sm"
|
||||
onclick="document.getElementById('new_compound_modal').showModal(); return false;"
|
||||
>
|
||||
New Compound
|
||||
</button>
|
||||
{% endif %}
|
||||
{% epdb_slot_templates "epdb.actions.collections.compound" as action_button_templates %}
|
||||
|
||||
{% for tpl in action_button_templates %}
|
||||
{% include tpl %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock action_button %}
|
||||
|
||||
{% block action_modals %}
|
||||
{% include "modals/collections/new_compound_modal.html" %}
|
||||
{% epdb_slot_templates "modals.collections.compound" as action_modals_templates %}
|
||||
|
||||
{% for tpl in action_modals_templates %}
|
||||
{% include tpl %}
|
||||
{% endfor %}
|
||||
{% endblock action_modals %}
|
||||
|
||||
{% block description %}
|
||||
|
||||
Reference in New Issue
Block a user