Ejemplo n.º 1
0
?>
</h3>
                <div class="box-tools pull-right">
                    <form method="post" action="#">
                        <div class="input-group">
                            <input type="text" class="form-control input-sm tree-search">
                            <span class="input-group-btn">
                                <button class="btn btn-success btn-sm" type="button"><span class="fa fa-search" aria-hidden="true"></span></button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>
            <div class="box-body">
                <?php 
echo JsTree::widget(['id' => $treeId, 'treeDetails' => $treeDetailsId, 'confirmationModal' => $confirmationModalId, 'apiOptions' => ['rootsUrl' => Url::to(['/api/v1/categories/roots']), 'childrenUrl' => Url::to(['/api/v1/categories/{id}/children']), 'updateUrl' => Url::to(['/api/v1/categories/{id}']), 'deleteUrl' => Url::to(['/api/v1/categories/{id}']), 'moveUrl' => Url::to(['/api/v1/categories/{id}/move']), 'searchUrl' => Url::to(['/api/v1/categories/search']), 'searchableAttributes' => ['text', 'data.description'], 'attributesMap' => ['id' => 'id', 'text' => 'name', 'children' => 'hasChildren', 'str' => 'string']]]);
?>
            </div>
            <div class="box-footer">
                <div class="box-tools pull-right">
                    <?php 
JsTreeToolbar::begin(['tree' => $treeId]);
?>
                    <button class="btn btn-sm btn-default" title="<?php 
echo Module::t('category', 'Create');
?>
" data-toolbar-action="create"><span class="fa fa-plus" aria-hidden="true"></span></button>
                    <button class="btn btn-sm btn-default" title="<?php 
echo Module::t('category', 'Edit');
?>
" data-toolbar-action="edit" data-not-selected-message="<?php 
Ejemplo n.º 2
0
?>
</h3>
                <div class="box-tools pull-right">
                    <form method="post" action="#">
                        <div class="input-group">
                            <input type="text" class="form-control input-sm tree-search">
                            <span class="input-group-btn">
                                <button class="btn btn-success btn-sm" type="button"><span class="fa fa-search" aria-hidden="true"></span></button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>
            <div class="box-body">
                <?php 
echo JsTree::widget(['id' => $treeId, 'treeDetails' => $treeDetailsId, 'confirmationModal' => $confirmationModalId, 'apiOptions' => ['rootsUrl' => $menu ? Url::to(["/api/v1/menus/{$menu->id}/items/roots"]) : Url::to(['/api/v1/menu-items/roots']), 'childrenUrl' => Url::to(['/api/v1/menu-items/{id}/children']), 'createUrl' => Url::to(['menu-item/create-node', 'menu' => $menu->id]), 'editUrl' => Url::to(['menu-item/update', 'id' => '{id}']), 'updateUrl' => Url::to(['/api/v1/menu-items/{id}']), 'deleteUrl' => Url::to(['/api/v1/menu-items/{id}']), 'moveUrl' => Url::to(['/api/v1/menu-items/{id}/move']), 'searchUrl' => $menu ? Url::to(["/api/v1/menus/{$menu->id}/items/search"]) : Url::to(['/api/v1/menu-items/search']), 'searchableAttributes' => ['text', 'data.label'], 'attributesMap' => ['id' => 'id', 'text' => 'label', 'children' => 'hasChildren', 'str' => 'string']]]);
?>
            </div>
            <div class="box-footer">
                <div class="box-tools pull-right">
                    <?php 
JsTreeToolbar::begin(['tree' => $treeId]);
?>
                    <button class="btn btn-sm btn-default" title="<?php 
echo Module::t('category', 'Create');
?>
" data-toolbar-action="create"><span class="fa fa-plus" aria-hidden="true"></span></button>
                    <button class="btn btn-sm btn-default" title="<?php 
echo Module::t('category', 'Edit');
?>
" data-toolbar-action="edit" data-not-selected-message="<?php