<commit_before>{% block list_object_actions %}
    {{ echo_block("list_object_actions") }}
        {% if object_actions|length > 0 %}
         <td class="actions">
            {% for action in builder.ObjectActions %}
                {% if action.credentials or builder.generator.getFromYaml('builders.' ~ action.name ~ '.params.credentials') %}
                    {{ echo_if_granted( action.credentials ? action.credentials : builder.generator.getFromYaml('builders.' ~ action.name ~ '.params.credentials'), builder.ModelClass ) }}
                {% endif -%}

                    <a class="{{ action.class|default('') }}" href="{{ echo_path((action.route ? action.route : builder.routePrefixWithSubfolder ~ '_' ~ bundle_name ~ ( builder.BaseGeneratorName ? "_" ~ builder.BaseGeneratorName : "" ) ~ '_' ~ action.name), "{ 'pk': " ~ builder.ModelClass ~ "." ~ builder.ModelPrimaryKeyName ~ " }") }}" 
                      {% if action.confirm %} data-confirm="{{ echo_trans(action.confirm) }}"{% endif %} title="{{ echo_trans(action.label) }}">
                      <i class="{{ action.icon|default('icon-asterisk') }}"></i></a>
                
                {%- if action.credentials or builder.generator.getFromYaml('builders.' ~ action.name ~ '.params.credentials') %}
                    {{ echo_endif () }}
                {% endif %}
            {% endfor %}
            <script type="text/javascript">
                $(document).ready(function() {
                    $("td.actions a").click(function(e) {
                        e.preventDefault();

                        if ($(this).data('confirm')) { 
                            if(!confirm($(this).data('confirm')))
                              return false;<commit_msg>Conditional action template change<commit_after>{% block list_object_actions %}
    {{ echo_block("list_object_actions") }}
        {% if object_actions|length > 0 %}
         <td class="actions">
            {% for action in builder.ObjectActions %}
                {% if action.credentials or builder.generator.getFromYaml('builders.' ~ action.name ~ '.params.credentials') %}
                    {{ echo_if_granted( action.credentials ? action.credentials : builder.generator.getFromYaml('builders.' ~ action.name ~ '.params.credentials'), builder.ModelClass ) }}
                {% endif -%}
                    {% if action.conditionalFunction %}
                        {{ echo_if ((action.conditionalInverse == 'true' ? 'not ' : '') ~ builder.ModelClass ~ "." ~ action.conditionalFunction) }}
                    {% endif %}
                
                    <a class="{{ action.class|default('') }}" href="{{ echo_path((action.route ? action.route : builder.routePrefixWithSubfolder ~ '_' ~ bundle_name ~ ( builder.BaseGeneratorName ? "_" ~ builder.BaseGeneratorName : "" ) ~ '_' ~ action.name), "{ 'pk': " ~ builder.ModelClass ~ "." ~ builder.ModelPrimaryKeyName ~ " }") }}" 
                      {% if action.confirm %} data-confirm="{{ echo_trans(action.confirm) }}"{% endif %} title="{{ echo_trans(action.label) }}">
                      <i class="{{ action.icon|default('icon-asterisk') }}"></i></a>
                
                    {% if action.conditionalFunction %}
                        {{ echo_endif () }}
                    {% endif %}
                {%- if action.credentials or builder.generator.getFromYaml('builders.' ~ action.name ~ '.params.credentials') %}
                    {{ echo_endif () }}
                {% endif %}
            {% endfor %}
            <script type="text/javascript">
                $(document).ready(function() {
                    $("td.actions a").click(function(e) {
                        e.preventDefault();

                        if ($(this).data('confirm')) { 
                            if(!confirm($(this).data('confirm')))
                              return false;
{'fraction_non_alphanumeric': 0.16319712156258032, 'fraction_numerical': 0.0005140066820868671, 'mean_word_length': 1.8979895755770664, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5326064', 'n_tokens_mistral': 1049, 'n_tokens_neox': 947, 'n_words': 159}