<commit_before><div ng-controller="contentBlocksCtrl">
    <div ng-show="pluginInstalled">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">Content Blocks</div>
                <div class="panel-body">
                    <h4> Available Content Blocks:</h4>
                    <ul class="list-group">
                        <li class="list-group-item" ng-repeat="provider in providers">
                            <span class="badge"><a href="" ng-click="onDelete(provider)">X</a></span>
                            <!--<span class="badge"><a href="{{baseCmsNamespaceUrl}}{{provider.path}}" target="_blank">edit</a></span>-->
                            <a href="{{baseCmsNamespaceUrl}}{{provider.path}}" target="_blank">{{provider.key}} </a>
                        </li>
                    </ul>
                    <div class="input-group">
                        <input type="text" class="form-control" ng-model="providerInput"/>
                      <span class="input-group-btn">
                        <button class="btn btn-default" type="button" ng-click="onAdd(providerInput)">Add new</button>
                      </span>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="alert-warning" ng-hide="providers.length > 0">No content blocks found</div>
                    <h4 ng-show="providers.length > 0"> Configure Content Blocks:</h4>
                    <table ng-show="providers.length > 0" class="table table-striped table-bordered">
                        <thead>
                        <tr>
                            <th class="col-sm-7">Select document types:</th>
                            <th class="col-sm-7">Current Providers:</th>
                            <th class="col-sm-4">Select perfered</th>
                        </tr>
                        </thead>
                        <tbody>

                        <tr ng-repeat="docType in documentTypes">
                            <td>{{docType.key}}</td>
                            <td>
                                <div class="btn-group">
                                    <button ng-repeat="provider in docType.providers" type="button" class="btn btn-default">{{provider.key}}
                                        <span class="badge" ng-click="removeProviderFromDocType(prov, docType)"><a>X</a></span>
                                    </button>
                                </div>
                                <select ng-model="prov" ng-change="addProviderToDocType(prov, docType)" ng-options="c.key for c in providers">
                                    <option>--Choose one--</option>
                                </select>
                            </td>
                            <td>
                                <select ng-change="selectChange(docType.key, selectedItem[$index])"
                                        ng-options="option.value as option.key for option in columns.items"
                                        ng-model="selectedItem[$index]">
                                </select>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <p></p>
        <p></p>
        <div class="col-md-4">
            <div class="panel panel-primary" ng-show="selection.length > 0">
                <div class="panel-heading">Selected</div>
                <table class="table table-hover">
                    <tbody>
                    <tr ng-repeat="docType in selection">
                        <td>{{docType}}</td>
                        <td>{{selectedItem[$index]}}</td>
                    </tr>
                    <tr ng-show="selection.length > 0 && selection.length == selectedItem.length">
                        <td></td>
                        <td>
                            <button class="btn btn-primary">Save</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="col-md-4">
            <div class="alert alert-danger" ng-show="selection.length != selectedItem.length">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <strong>Please select column for selected documents</strong>
            </div>
        </div>
        <div class="col-md-4"></div>
    </div>
    <div ng-show="!pluginInstalled">
        <button class="btn btn-primary" ng-click="installPlugin()">Install Content blocks plugin</button>
        <p></p>
        <p></p>
        <div class="alert-info">{{installMessage}}</div>
    </div>
</div><commit_msg>-  hide options where no content blocks are found<commit_after><div ng-controller="contentBlocksCtrl">
    <div ng-show="pluginInstalled">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">Content Blocks</div>
                <div class="panel-body">
                    <h4> Available Content Blocks:</h4>
                    <ul class="list-group">
                        <li class="list-group-item" ng-repeat="provider in providers">
                            <span class="badge"><a href="" ng-click="onDelete(provider)">X</a></span>
                            <!--<span class="badge"><a href="{{baseCmsNamespaceUrl}}{{provider.path}}" target="_blank">edit</a></span>-->
                            <a href="{{baseCmsNamespaceUrl}}{{provider.path}}" target="_blank">{{provider.key}} </a>
                        </li>
                    </ul>
                    <div class="input-group">
                        <input type="text" class="form-control" ng-model="providerInput"/>
                      <span class="input-group-btn">
                        <button class="btn btn-default" type="button" ng-click="onAdd(providerInput)">Add new</button>
                      </span>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="alert-warning" ng-hide="providers.length > 0"><strong>No content blocks found</strong></div>
                    <h4 ng-show="providers.length > 0"> Configure Content Blocks:</h4>
                    <table ng-show="providers.length > 0" class="table table-striped table-bordered">
                        <thead>
                        <tr>
                            <th class="col-sm-7">Select document types:</th>
                            <th class="col-sm-7">Current Providers:</th>
                            <th class="col-sm-4">Select perfered</th>
                        </tr>
                        </thead>
                        <tbody>

                        <tr ng-repeat="docType in documentTypes">
                            <td>{{docType.key}}</td>
                            <td>
                                <div class="btn-group">
                                    <button ng-repeat="provider in docType.providers" type="button" class="btn btn-default">{{provider.key}}
                                        <span class="badge" ng-click="removeProviderFromDocType(prov, docType)"><a>X</a></span>
                                    </button>
                                </div>
                                <select ng-model="prov" ng-change="addProviderToDocType(prov, docType)" ng-options="c.key for c in providers">
                                    <option>--Choose one--</option>
                                </select>
                            </td>
                            <td>
                                <select ng-change="selectChange(docType.key, selectedItem[$index])"
                                        ng-options="option.value as option.key for option in columns.items"
                                        ng-model="selectedItem[$index]">
                                </select>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <p></p>
        <p></p>
        <div class="col-md-4">
            <div class="panel panel-primary" ng-show="selection.length > 0">
                <div class="panel-heading">Selected</div>
                <table class="table table-hover">
                    <tbody>
                    <tr ng-repeat="docType in selection">
                        <td>{{docType}}</td>
                        <td>{{selectedItem[$index]}}</td>
                    </tr>
                    <tr ng-show="selection.length > 0 && selection.length == selectedItem.length">
                        <td></td>
                        <td>
                            <button class="btn btn-primary">Save</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="col-md-4">
            <div class="alert alert-danger" ng-show="selection.length != selectedItem.length">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <strong>Please select column for selected documents</strong>
            </div>
        </div>
        <div class="col-md-4"></div>
    </div>
    <div ng-show="!pluginInstalled">
        <button class="btn btn-primary" ng-click="installPlugin()">Install Content blocks plugin</button>
        <p></p>
        <p></p>
        <div class="alert-info">{{installMessage}}</div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.14222587606618026, 'fraction_numerical': 0.0034939882848628095, 'mean_word_length': 1.1636282792352157, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 0, '>': 267, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139960', 'n_tokens_mistral': 2465, 'n_tokens_neox': 2311, 'n_words': 449}