Moved the organisation actions menu into blocks

This commit is contained in:
2023-06-07 15:02:46 +01:00
parent 522718f7ee
commit b54945cad6
2 changed files with 77 additions and 72 deletions

View File

@@ -14,7 +14,7 @@
</button> </button>
<ul class="dropdown-menu dropdown-menu-right" role="menu"> <ul class="dropdown-menu dropdown-menu-right" role="menu">
{% block organisation_membership_actions %}
{% if organisationConfig.combine_action_buttons %} {% if organisationConfig.combine_action_buttons %}
{% verbatim %}{{#ifx row.is_pending '==' 1 }}{% endverbatim %} {% verbatim %}{{#ifx row.is_pending '==' 1 }}{% endverbatim %}
<li> <li>
@@ -54,8 +54,10 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %}
{% block organisation_administration_actions %}
{% if organisationConfig.combine_action_buttons %} {% if organisationConfig.combine_action_buttons %}
{% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %} {% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %}
{% verbatim %}{{#ifx row.is_admin '==' 1 }}{% endverbatim %} {% verbatim %}{{#ifx row.is_admin '==' 1 }}{% endverbatim %}
@@ -73,15 +75,6 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if checkAccess('merge_organisations') %}
<li>
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-merge">
<i class="fas fa-object-group"></i>
{{translate("ORGANISATION.MERGE")}}
</a>
</li>
{% endif %}
{% if checkAccess('approve_organisation') %} {% if checkAccess('approve_organisation') %}
{% verbatim %}{{#ifx row.flag_approved '==' 0 }}{% endverbatim %} {% verbatim %}{{#ifx row.flag_approved '==' 0 }}{% endverbatim %}
{% verbatim %}{{#ifx row.registrant_id '==' {% endverbatim %}{{current_user.id}}{% verbatim %} }}{% endverbatim %} {% verbatim %}{{#ifx row.registrant_id '==' {% endverbatim %}{{current_user.id}}{% verbatim %} }}{% endverbatim %}
@@ -107,6 +100,16 @@
{% verbatim %}{{/ifx}}{% endverbatim %} {% verbatim %}{{/ifx}}{% endverbatim %}
{% endif %} {% endif %}
{% if checkAccess('merge_organisations') %}
<li>
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-merge">
<i class="fas fa-object-group"></i>
{{translate("ORGANISATION.MERGE")}}
</a>
</li>
{% endif %}
{% if checkAccess('delete_organisation') %} {% if checkAccess('delete_organisation') %}
{% verbatim %}{{#ifx row.flag_approved '==' 1 }}{% endverbatim %} {% verbatim %}{{#ifx row.flag_approved '==' 1 }}{% endverbatim %}
<li> <li>
@@ -117,6 +120,7 @@
</li> </li>
{% verbatim %}{{/ifx }}{% endverbatim %} {% verbatim %}{{/ifx }}{% endverbatim %}
{% endif %} {% endif %}
{% endblock %}
</ul> </ul>
</div> </div>

View File

@@ -23,6 +23,7 @@
{% block table_cell_templates %} {% block table_cell_templates %}
{{ parent() }} {{ parent() }}
{% block table_users_column_organisations %} {% block table_users_column_organisations %}
{% include 'tables/columns/users-organisations.html.twig' %} {% include 'tables/columns/users-organisations.html.twig' %}
{% endblock %} {% endblock %}