<commit_before>{% extends 'base.html.twig' %}

{% block bodyclasses %}{{ parent() }}{% endblock %}
{% block body %}
    <h1>Competency Frameworks
        {% if is_granted('create', 'lsdoc') %}
            <ul class="list-inline pull-right">
                <li>
                    <a class="btn btn-default" href="{{ path('lsdoc_new') }}">Create a new Framework</a>
                </li>
                <li>
                    <button type="button" class="btn btn-default" data-toggle="modal" data-target="#wizard">Import framework</button>
                </li>
            </ul>
        {% endif %}
    </h1>

    <div id="competencyTree">
        {% set lastCreator = '' %}
        <ul id="comptencyTreeData" style="display:none;">
            {% for framework in lsDocs %}
                {% if framework.creator != lastCreator %}
                    {% if not loop.first %}</ul></li>{% endif %}
                        <li class="folder">{{ framework.creator }}<ul>
                                {% set lastCreator = framework.creator %}
                    {% endif %}
                    <li class="salt-framework-link"><a href="{{ path('doc_tree_view', { 'id': framework.id }) }}">{{ framework.title }}</a></li>
                    {% if loop.last == true and framework.creator != '' %}
                        </ul></li>
                    {% endif %}
                {% endfor %}
                </ul>
    </div>
    {% include 'CftfBundle:LsDoc:wizard.html.twig' %}
{% endblock %}

{% block javascripts %}
<script>
    $('#competencyTree').fancytree({
        activate: function(event, data){
            var node = data.node;
            if (!$.isEmptyObject(node.data)) {
                if (undefined != node.data.href)
                    window.location.href = node.data.href;
            }
        }
    });
</script>
{% endblock %}
<commit_msg>expand/collapse the frameworks based on clicking the creator<commit_after>{% extends 'base.html.twig' %}

{% block bodyclasses %}{{ parent() }}{% endblock %}
{% block body %}
    <h1>Competency Frameworks
        {% if is_granted('create', 'lsdoc') %}
            <ul class="list-inline pull-right">
                <li>
                    <a class="btn btn-default" href="{{ path('lsdoc_new') }}">Create a new Framework</a>
                </li>
                <li>
                    <button type="button" class="btn btn-default" data-toggle="modal" data-target="#wizard">Import framework</button>
                </li>
            </ul>
        {% endif %}
    </h1>

    <div id="competencyTree">
        {% set lastCreator = '' %}
        <ul id="comptencyTreeData" style="display:none;">
            {% for framework in lsDocs %}
                {% if framework.creator != lastCreator %}
                    {% if not loop.first %}</ul></li>{% endif %}
                        <li class="folder">{{ framework.creator }}<ul>
                                {% set lastCreator = framework.creator %}
                    {% endif %}
                    <li class="salt-framework-link"><a href="{{ path('doc_tree_view', { 'id': framework.id }) }}">{{ framework.title }}</a></li>
                    {% if loop.last == true and framework.creator != '' %}
                        </ul></li>
                    {% endif %}
                {% endfor %}
                </ul>
    </div>
    {% include 'CftfBundle:LsDoc:wizard.html.twig' %}
{% endblock %}

{% block javascripts %}
<script>
    $('#competencyTree').fancytree({
        activate: function(event, data){
            var node = data.node;
            if (!$.isEmptyObject(node.data)) {
                if (undefined !== node.data.href)
                    window.location.href = node.data.href;
            }
        },
        dblclick: function(event, data) {
            // ignore double clicks
            return false;
        },
        click: function(event, data) {
            if (data.node.isFolder() && data.targetType !== 'expander') {
                data.node.toggleExpanded();
            }
        }
    });
</script>
{% endblock %}

{'fraction_non_alphanumeric': 0.16662582700318548, 'fraction_numerical': 0.00098015192354815, 'mean_word_length': 1.5721487082545684, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6023612', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1107, 'n_words': 237}