@*   Xafari Framework version : 17.2.3011.1336   *@

@using DevExpress.ExpressApp.Utils

@model Xafari.BC.Mvc.Editors.MvcExplorerListEditor

@{
    var a = (GridViewDataItemTemplateContainer)ViewData["Container"];
    var row = a.Grid.GetRow(a.VisibleIndex);
    var objectId = this.Model.GetKeyValue(row);
    if (row != null && this.Model.GetChildren(row, this.Model.CurrentHierarchyName).Count > 0)
    {
        const string textInfo = "Open Folder";
        var imageInfo = ImageLoader.Instance.GetImageInfo("OpenFolder");
        <a onclick="xafari.editors.explorerListEditor.openFolderClick('@this.Model.CallbackPanelId', '@objectId','@ViewData["GridName"]'); window.disableNotifyWindowClose = true; event.cancelBubble = true;">
            @if (imageInfo.IsEmpty)
            {
                @textInfo
            }
            else
            {
                @Html.Xafari().ImageInfo(imageInfo).GetHtml()
            }
        </a>
    }

}

