<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Project.Master" Inherits="System.Web.Mvc.ViewPage<ProjectViewModel>" ValidateRequest="false" %>

<%@ Import Namespace="AdministratorConsole.Core.DataAccess" %> 

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.DevExpress().RenderScripts(Page, new Script { ExtensionSuite = ExtensionSuite.HtmlEditor }); %>
    <% Html.DevExpress().RenderStyleSheets(Page, new StyleSheet { ExtensionSuite = ExtensionSuite.HtmlEditor, Theme = "Youthful" }); %>
    <% if (ViewData["RootDirectory"] != null)
       { %>
        <script language="javascript" type="text/javascript">
            var baseUrl = "";

            window.onload = function () {
                baseUrl = document.getElementById("HiddenCurrentUrl").value;
                baseUrl = baseUrl.substring(0, baseUrl.indexOf("Dummy"));

                SetLockUnlockDisabled();
                SetDeleteDisabled();
                SetCopyDisabled();
                SetCutDisabled();
                SetPasteDisabled();
                SetEditDisabled();
                SetNewDisabled();
                SetPermissionsDisabled();
            };

            function removeLinkLoad(linkId, folderName) {
                var link = document.getElementById(linkId);
                
                if (link) link.innerHTML = folderName;
            }

            function NewFolder(projectId) {
                RemoveCutCopySelected()

                if (selectedItem != "") {
                    var folderLocation = document.getElementById("FolderPath_" + selectedItem);
                    
                    $.ajax({
                        type: 'GET',
                        url: '<%= Url.Action("GetNewFolderForm") %>',
                        data: {
                            projectId: '<%= Model.Project.ExternalId %>',
                            location: folderLocation.value,
                            selectedId: selectedItem
                        },
                        cache: false,
                        success: function (response) {
                            $("#modal-overlay").html(response);
                        },
                        complete: function () {
                            showModelDialog();
                        }
                    });
                }
            }

            function EditFolder(projectId) {
                RemoveCutCopySelected()

                if (selectedItem != "") {
                    var folderLocation = document.getElementById("FolderPath_" + selectedItem);
                        folderContainer = document.getElementById("FolderContainer_" + selectedItem);
                        editType = "folder";

                    if (folderLocation == null) {
                        folderLocation = document.getElementById("FilePath_" + selectedItem);
                        folderContainer = document.getElementById("FileContainer_" + selectedItem);

                        editType = "file";
                    }

                    $.ajax({
                        type: 'GET',
                        url: '<%= Url.Action("GetEditFolderForm") %>',
                        data: {
                            projectId: '<%= Model.Project.ExternalId %>',
                            folderLocation: folderLocation.value,
                            selectedId: selectedItem,
                            editType: editType
                        },
                        cache: false,
                        success: function (response) {
                            $("#modal-overlay").html(response);
                        },
                        complete: function () {
                            showModelDialog();
                        }
                    });
                }
            }

            function DeleteFolder(projectId) {
                RemoveCutCopySelected();

                if (selectedItem != "") {
                    var folderLocation = folderLocation = document.getElementById("FolderPath_" + selectedItem);
                        folderContainer = document.getElementById("FolderContainer_" + selectedItem);
                        deleteType = "folder";

                    if (folderLocation == null) {
                        folderLocation = document.getElementById("FilePath_" + selectedItem);
                        folderContainer = document.getElementById("FileContainer_" + selectedItem);

                        deleteType = "file";
                    }

                    $.ajax({
                        type: 'GET',
                        url: '<%= Url.Action("GetDeleteFolderForm") %>',
                        data: {
                            projectId: '<%= Model.Project.ExternalId %>',
                            folderLocation: folderLocation.value,
                            selectedId: selectedItem,
                            deleteType: deleteType
                        },
                        cache: false,
                        success: function (response) {
                            $("#modal-overlay").html(response);
                        },
                        complete: function () {
                            showModelDialog();
                        }
                    });
                }
            }

            function EmptyDiv(selectedDiv) {
                var i;
                while (i = selectedDiv.childNodes[0]) {
                    if (i.nodeType == 1 || i.nodeType == 3) {
                        selectedDiv.removeChild(i);
                    }
                }
            }

            function CopyFolder(projectId) {
                if ((selectedItem != "") && (selectedItem.toLowerCase() != "root")) {
                    var copyButton = document.getElementById("CopyButton");
                    var cutButton = document.getElementById("CutButton");

                    copyButton.className = "selected-fileaction-button";
                    cutButton.className = "unselected-fileaction-button";

                    var pasteButton = document.getElementById("PasteButton");
                    pasteButton.disabled = false;

                    var selectedItemContainer = document.getElementById("FolderPanel_" + selectedItem);

                    if (selectedItemContainer != null) {
                        sourceCopyFolder = selectedItem;
                        sourceCutFolder = "";
                        sourceCopyFile = "";
                        sourceCutFile = "";
                    }
                    else {
                        selectedItemContainer = document.getElementById("File_" + selectedItem);

                        if (selectedItemContainer != null) {
                            sourceCopyFolder = "";
                            sourceCutFolder = "";
                            sourceCopyFile = selectedItem;
                            sourceCutFile = "";
                        }
                        else {
                            sourceCopyFolder = "";
                            sourceCutFolder = "";
                            sourceCopyFile = "";
                            sourceCutFile = "";
                        }
                    }
                }
                else if (selectedItem.toLowerCase() == "root") {
                    $.ajax({
                        type: 'GET',
                        url: '<%= Url.Action("GetInvalidFolderAction") %>',
                        data: {
                            sourceAction: 'copy'
                        },
                        cache: false,
                        success: function (response) {
                            $("#modal-overlay").html(response);
                        },
                        complete: function () {
                            showModelDialog();
                        }
                    });
                }
            }

            function CutFolder(projectId) {
                if ((selectedItem != "") && (selectedItem.toLowerCase() != "root")) {
                    var cutButton = document.getElementById("CutButton");
                    var copyButton = document.getElementById("CopyButton");

                    cutButton.className = "selected-fileaction-button";
                    copyButton.className = "unselected-fileaction-button";

                    var pasteButton = document.getElementById("PasteButton");
                    pasteButton.disabled = false;

                    var selectedItemContainer = document.getElementById("FolderPanel_" + selectedItem);

                    if (selectedItemContainer != null) {
                        sourceCopyFolder = "";
                        sourceCutFolder = selectedItem;
                        sourceCopyFile = "";
                        sourceCutFile = "";
                    }
                    else {
                        selectedItemContainer = document.getElementById("File_" + selectedItem);

                        if (selectedItemContainer != null) {
                            sourceCopyFolder = "";
                            sourceCutFolder = "";
                            sourceCopyFile = "";
                            sourceCutFile = selectedItem;
                        }
                        else {
                            sourceCopyFolder = "";
                            sourceCutFolder = "";
                            sourceCopyFile = "";
                            sourceCutFile = "";
                        }
                    }
                }
                else if (selectedItem.toLowerCase() == "root") {
                    $.ajax({
                        type: 'GET',
                        url: '<%= Url.Action("GetInvalidFolderAction") %>',
                        data: {
                            sourceAction: 'cut'
                        },
                        cache: false,
                        success: function (response) {
                            $("#modal-overlay").html(response);
                        },
                        complete: function () {
                            showModelDialog();
                        }
                    });
                }
            }

            function PasteFolder(projectId) {
                var sourceType = null,
                    sourceFolderLocation = null,
                    sourceFolderAction = null,
                    targetFolderLocation = document.getElementById("FolderPath_" + selectedItem);

                if (targetFolderLocation == null) {
                    RemoveCutCopySelected();
                    return;
                }
                
                if ((selectedItem != "") && ((sourceCopyFolder != "") || (sourceCutFolder != ""))) {
                    sourceType = "folder";

                    if (sourceCopyFolder != "") {
                        sourceFolderLocation = document.getElementById("FolderPath_" + sourceCopyFolder);
                        sourceFolderAction = "copy";
                    }
                    else {
                        sourceFolderLocation = document.getElementById("FolderPath_" + sourceCutFolder);
                        sourceFolderAction = "cut";
                    }
                }
                else {
                    sourceType = "file";

                    if (sourceCopyFile != "") {
                        sourceFolderLocation = document.getElementById("FilePath_" + sourceCopyFile);
                        sourceFolderAction = "copy";
                    } else {
                        sourceFolderLocation = document.getElementById("FilePath_" + sourceCutFile);
                        sourceFolderAction = "cut";
                    }
                }

                RemoveCutCopySelected();

                $.ajax({
                    type: 'GET',
                    url: '<%= Url.Action("GetPasteFolderForm") %>',
                    data: {
                        projectId: '<%= Model.Project.ExternalId %>',
                        sourceLocation: sourceFolderLocation.value,
                        targetLocation: targetFolderLocation.value,
                        selectedId: selectedItem,
                        sourceType: sourceType,
                        sourceAction: sourceFolderAction
                    },
                    cache: false,
                    success: function (response) {
                        $("#modal-overlay").html(response);
                    },
                    complete: function () {
                        showModelDialog();
                    }
                });
            }

            function ClearLockContainer() {
                RemoveDiv("lockFileContainer");
                selectedItem = "";
            }
        
            function LockOrUnlock(projectId, lockUnlock) {
                RemoveCutCopySelected();

                if (selectedItem != "") {
                    var folderLocation = document.getElementById("FolderPath_" + selectedItem);
                    if (folderLocation == null) folderLocation = document.getElementById("FilePath_" + selectedItem);

                    var isRootFolder = true;
                    if (folderLocation.value != "<%= ((RevitFolder)ViewData["RootDirectory"]).RelativePath %>") isRootFolder = false;

                    $.ajax({
                        type: 'GET',
                        url: '<%= Url.Action("GetLockUnlockForm") %>',
                        data: {
                            projectId: '<%= Model.Project.ExternalId %>',
                            isRootFolder: isRootFolder,
                            targetFolder: folderLocation.value,
                            lockAction: lockUnlock.toLowerCase()
                        },
                        cache: false,
                        success: function (response) {
                            $("#modal-overlay").html(response);
                        },
                        complete: function () {
                            showModelDialog();
                        }
                    });
                }
            }

            function FolderPermissions(projectId) {
                RemoveCutCopySelected();

                if (selectedItem != "") {
                    var folderLocation = document.getElementById("FolderPath_" + selectedItem);

                    if (folderLocation) {
                        $.ajax({
                            type: 'GET',
                            url: '<%= Url.Action("GetFolderPermissionsForm") %>',
                            data: {
                                projectId: '<%= Model.Project.ExternalId %>',
                                targetFolder: folderLocation.value
                            },
                            cache: false,
                            success: function (response) {
                                $("#modal-overlay").html(response);
                            },
                            complete: function () {
                                showModelDialog();
                            }
                        });
                    }
                }
            }

            function SelectFolder(folderId, isLocked) {
                var newFolderContainer = document.getElementById("FolderPanel_" + folderId);

                if (folderId != "root") {
                    SetEditEnabled();
                    SetDeleteEnabled();
                    SetCopyEnabled();
                    SetCutEnabled();
                    SetPermissionsEnabled();
                }
                else {
                    SetEditDisabled();
                    SetNewEnabled();
                    SetDeleteDisabled();
                    SetCopyDisabled();
                    SetCutDisabled();
                    SetPermissionsDisabled();
                }

                SetNewEnabled();
                SetPasteEnabled();

                if ((selectedItem != folderId) || (selectedItem == "")) {
                    if (selectedItem != "") {
                        var selectedItemContainer = document.getElementById("FolderPanel_" + selectedItem);

                        if (selectedItemContainer != null) selectedItemContainer.className = "folder-panel";
                        else {
                            selectedItemContainer = document.getElementById("File_" + selectedItem);

                            if (selectedItemContainer != null)  selectedItemContainer.className = "file-panel";
                        }
                    }

                    newFolderContainer.className = "folder-panel-selected";

                    selectedItem = folderId;

                    if (folderId != "root") {
                        if (isLocked.toLowerCase() == "unlocked") {
                            SetLockEnabled();
                        }
                        else if (isLocked.toLowerCase() == "lockedinpath") {
                            SetEditDisabled();
                            SetNewDisabled();
                            SetDeleteDisabled();
                            SetCopyDisabled();
                            SetCutDisabled();
                            SetLockUnlockDisabled();
                        }
                        else if (isLocked.toLowerCase() == "locked") {
                            SetEditDisabled();
                            SetNewDisabled();
                            SetDeleteDisabled();
                            SetCopyDisabled();
                            SetCutDisabled();
                            SetUnlockEnabled();
                        }
                    }
                    else {
                        if (isLocked.toLowerCase() == "unlocked") SetLockEnabled();
                        else if (isLocked.toLowerCase() == "lockedinpath") SetLockUnlockDisabled();
                        else if (isLocked.toLowerCase() == "locked") SetUnlockEnabled();
                    }
                }
                else if (selectedItem == folderId)
                {
                    newFolderContainer.className = "folder-panel";

                    selectedItem = "";

                    SetLockUnlockDisabled();
                }
            }

            function SelectFile(fileId, isLocked) {
                var newFileContainer = document.getElementById("File_" + fileId);
                SetEditEnabled();
                SetNewDisabled();
                SetPermissionsDisabled();
                SetDeleteEnabled();
                SetCopyEnabled();
                SetCutEnabled();
                SetPasteDisabled();

                if ((selectedItem != fileId) || (selectedItem == "")) {
                    if (selectedItem != "") {
                        var selectedItemContainer = document.getElementById("File_" + selectedItem);

                        if (selectedItemContainer != null) selectedItemContainer.className = "file-panel";
                        else {
                            selectedItemContainer = document.getElementById("FolderPanel_" + selectedItem);

                            if (selectedItemContainer != null) selectedItemContainer.className = "folder-panel";
                        }
                    }

                    newFileContainer.className = "file-panel-selected";
                    selectedItem = fileId;

                    if (isLocked.toLowerCase() == "unlocked")
                    {
                        SetLockEnabled();
                    }
                    else if (isLocked.toLowerCase() == "lockedinpath")
                    {
                        SetDeleteDisabled();
                        SetCopyDisabled();
                        SetCutDisabled();
                        SetUnlockEnabled();
                        SetLockUnlockDisabled();
                    }
                    else if (isLocked.toLowerCase() == "locked")
                    {
                        SetDeleteDisabled();
                        SetCopyDisabled();
                        SetCutDisabled();
                        SetUnlockEnabled();
                    }

                }
                else if (selectedItem == fileId) {
                    newFileContainer.className = "file-panel";
                    selectedItem = "";

                    SetLockUnlockDisabled();
                }
            }

            function ClearSelectedItem() {
                selectedItem = "";
            }

            function SetLockEnabled() {
                $("#LockUnlockButton").removeClass("read-only");
                $("#LockUnlockButton").unbind('click');

                $("#LockUnlockButton").html("Lock");
                $("#LockUnlockButton").attr('href', "javascript:LockOrUnlock('<%= ViewData["projectId"] %>', 'lock')");
            }

            function SetUnlockEnabled() {
                $("#LockUnlockButton").removeClass("read-only");
                $("#LockUnlockButton").unbind('click');

                $("#LockUnlockButton").html("Unlock");
                $("#LockUnlockButton").attr('href', "javascript:LockOrUnlock('<%= ViewData["projectId"] %>', 'unlock')");
            }

            function SetLockUnlockDisabled() {
                $("#LockUnlockButton").removeClass("read-only").addClass("read-only");
                $("#LockUnlockButton").click(function (e) {
                    e.preventDefault();
                });

                $("#LockUnlockButton").html("Lock/Unlock");
                $("#LockUnlockButton").attr('href', "javascript:LockOrUnlock(null, '')");
            }

            function SetDeleteDisabled() {
                $("#DeleteButton").removeClass("read-only").addClass("read-only");
                $("#DeleteButton").click(function (e) {
                    e.preventDefault();
                });
            }

            function SetDeleteEnabled() {
                $("#DeleteButton").removeClass("read-only");
                $("#DeleteButton").unbind('click');
            }

            function SetEditDisabled() {
                $("#EditButton").removeClass("read-only").addClass("read-only");
                $("#EditButton").click(function (e) {
                    e.preventDefault();
                });
            }

            function SetEditEnabled() {
                $("#EditButton").removeClass("read-only");
                $("#EditButton").unbind('click');
            }

            function SetNewDisabled() {
                $("#NewButton").removeClass("read-only").addClass("read-only");
                $("#NewButton").click(function (e) {
                    e.preventDefault();
                });
            }

            function SetNewEnabled() {
                $("#NewButton").removeClass("read-only");
                $("#NewButton").unbind('click');
            }

            function SetCopyDisabled() {
                $("#CopyButton").removeClass("read-only").addClass("read-only");
                $('#CopyButton').click(function (e) {
                    e.preventDefault();
                });
            }

            function SetCopyEnabled() {
                $("#CopyButton").removeClass("read-only");
                $("#CopyButton").unbind('click');
            }

            function SetCutDisabled() {
                $("#CutButton").removeClass("read-only").addClass("read-only");
                $('#CutButton').click(function (e) {
                    e.preventDefault();
                });
            }

            function SetCutEnabled() {
                $("#CutButton").removeClass("read-only");
                $("#CutButton").unbind('click');
            }

            function SetPasteDisabled() {
                $("#PasteButton").removeClass("read-only").addClass("read-only");
                $('#PasteButton').click(function (e) {
                    e.preventDefault();
                });
            }

            function SetPasteEnabled() {
                $("#PasteButton").removeClass("read-only");
                $("#PasteButton").unbind('click');
            }

            function SetPermissionsDisabled() {
                $("#PermissionsButton").removeClass("read-only").addClass("read-only");
                $('#PermissionsButton').click(function (e) {
                    e.preventDefault();
                });
            }

            function SetPermissionsEnabled() {
                $("#PermissionsButton").removeClass("read-only");
                $("#PermissionsButton").unbind('click');
            }

            function RemoveCutCopySelected() {
                if ((sourceCopyFolder) || (sourceCutFolder) || (sourceCopyFile) || (sourceCutFile)) {
                    var cutButton = document.getElementById("CutButton");
                    var copyButton = document.getElementById("CopyButton");
                    var pasteButton = document.getElementById("PasteButton");

                    cutButton.className = "unselected-fileaction-button";
                    copyButton.className = "unselected-fileaction-button";
                    pasteButton.disabled = true;

                    sourceCopyFolder = "";
                    sourceCutFolder = "";
                    sourceCopyFile = "";
                    sourceCutFile = "";
                }
            }

            function giveFocus(elementName)
            {
                var element = document.getElementById(elementName);

                if (element != null)
                element.focus();
            }
            
            String.prototype.trim = function () {
                return this.replace(/^\s*/, "").replace(/\s*$/, "");
            }

            var selectedItem = "";
            var sourceCopyFolder = "";
            var sourceCutFolder = "";
            var sourceCopyFile = "";
            var sourceCutFile = "";
        </script>
        <div id="banner-space">
            <div id="banner-detail-container">
                <div class="left-floating-panel">
                    <div id="project-title"><span><%= Html.Encode(((Project)Model.Project).Name) %></span><span id="project-number"><%= Html.Encode(((Project)Model.Project).Number) %></span></div>
                    <div id="project-database-export"><b>Last Database Export:</b> <% if (Model.Project.LastDatabaseExport != null) { %><%= DateTimeHelper.ToString(Model.Project.LastDatabaseExport.Value) %><% } else { %>No Exports<% } %></div>
	            </div>
                <% if (((LicenseType)ViewData["LicenseType"]) != LicenseType.ODP)
                   { %>
                    <div class="right-floating-panel total-time-container-outer">
                        <div id="total-time-container">
				            <div class="header">Total Time Saved</div>
			                <div class="value"><%= (Math.Ceiling(Model.Project.CompletedTasksTime.TotalHours)).ToString("000") %> hrs</div>
                        </div>
                    </div> 
                <% } %>
                <% Html.RenderPartial("Partials/LaunchableTasks", new LaunchableTasksModel(Model.Project, Model.TaskSchedules, Model.User)); %>
            <div class="clear"></div>
            </div>
        </div>
        <div id="content-wrap">
            <% Html.RenderPartial("Navigation/_SideNavigation", Model.MenuNavigationModel); %>
	        <div id="content">
	            <h1>Manage Files</h1>
                <div id="tab-container">
                    <ul class="tabs">
			            <li><a href="<%= Url.Action("EditFiles/" + Model.Project.ExternalId, "Project") %>" class="active">Local</a></li>
			            <li><a href="<%= Url.Action("EditExternalModels/" + Model.Project.ExternalId, "Project") %>">External</a></li>
		            </ul>
                </div>
                <% if ((((Project)Model.Project).RevitServerVersion.Trim().ToLower() == "file") && (((Project)Model.Project).MissingWorkingFolders.Count > 0)) { %>
                    <br />    
                    <div class="notice-container"><%= TextHelper.GetText("Unable to access the following project working directories: ") + string.Join(", ", ((Project)Model.Project).MissingWorkingFolders) %></div>
                <% } %>
                <div id="FileContainer"></div>
                <div id="FolderContainer">
                    <% if ((ProjectTypeHelper.GetIsRevitServerProject(((Project)Model.Project).RevitServerVersion)) && (((Project)Model.Project).RevitServerVersion.Trim().ToLower() != "remote"))
                        { %>
                        <div class="right-floating-panel">
                            <span class="file-panel-link"><a id="LockUnlockButton" href="javascript:LockOrUnlock('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button"><%= Html.Encode("Lock/Unlock")%></a><a id="DeleteButton" href="javascript:DeleteFolder('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button"><%= Html.Encode("Delete")%></a><a id="CutButton" href="javascript:CutFolder('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button"><%= Html.Encode("Cut")%></a><a id="CopyButton" href="javascript:CopyFolder('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button"><%= Html.Encode("Copy")%></a><a id="PasteButton" href="javascript:PasteFolder('<%= ViewData["projectId"] %>')" style="text-decoration:none" class="unselected-fileaction-button"><%= Html.Encode("Paste")%></a><a id="EditButton" href="javascript:EditFolder('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button"><%= Html.Encode("Edit")%></a><a id="NewButton" href="javascript:NewFolder('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button">New</a><a id="PermissionsButton" href="javascript:FolderPermissions('<%= ViewData["projectId"] %>')" class="unselected-fileaction-button">Permissions</a></span>
                        </div>
                        <div class="clear"></div>
                    <% } %>
                    <br />
                    <div class="filebrowser-panel">
                        <input type="hidden" id="FolderPath_root" name="FolderPath_root" value="<%= ((RevitFolder)ViewData["RootDirectory"]).LinkingPath %>" />
                        <div id="FolderContainer_root">
                            <div id="FolderPanel_root" class="folder-panel">
                                <table>
                                    <tr>
                                        <% if (!ProjectTypeHelper.GetIsRevitServerProject(((Project)Model.Project).RevitServerVersion))
                                            { %><td><img src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Images/Icons/FolderIcon.jpg" alt="Folder" /></td>
                                            <td><span class="file-panel-folder"><span class="file-panel-folder"><%= Ajax.ActionLink(((Project)Model.Project).Name, "LoadAdminFolderContents", new { projectId = ViewData["projectId"], projectFolder = ((RevitFolder)ViewData["RootDirectory"]).LinkingPath }, new AjaxOptions { UpdateTargetId = "ChildFolders_root", InsertionMode = InsertionMode.Replace }, new { id = "folder_root", onclick = "SelectFolder('root', '" + ((RevitFolder)ViewData["RootDirectory"]).LockStatus + "');" })%></span></td>
                                        <% }
                                            else
                                            { %>
                                            <% if (((RevitFolder)ViewData["RootDirectory"]).LockStatus == LockStatusType.Locked)
                                                { %><td><img src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Images/Icons/FolderIconLocked.jpg" alt="Folder" /></td><% }
                                                else if (((RevitFolder)ViewData["RootDirectory"]).LockStatus == LockStatusType.LockedInPath)
                                                { %><td><img src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Images/Icons/FolderLockedPath.jpg" alt="Folder" /></td><%}
                                                else
                                                { %><td><img src="<%= Request.ApplicationPath.TrimEnd(new char[] { '/' }) %>/Images/Icons/FolderIcon.jpg" alt="Folder" /></td><% } %>
                                            <td><span class="file-panel-folder" onclick="SelectFolder('root', '<% = ((RevitFolder)ViewData["RootDirectory"]).LockStatus %>');"><%= Html.Encode(((Project)Model.Project).Name) %></span></td>
                                        <% } %>
                                    </tr>
                                </table>
                            </div>
                            <hr />
                            <div id="ChildFolders_root" class="none-float-panel" style="padding-left:8px"><% Html.RenderPartial("Partials/AdminFileList", FolderFactory.GetDirectoryContents(((Project)Model.Project), ((FileFilter[])ViewData["fileFilters"]), "Root", (IList<ProjectPluginSettingValue>)ViewData["projectTypeSettings"], ViewData["projectArtifacts"].ToString(), "", false));%></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <% }
       else
       { %>
        <div id="content-wrap">
            <% Html.RenderPartial("Navigation/_SideNavigation", Model.MenuNavigationModel); %>
	        <div id="content">
	            <h1>Manage Files</h1>
	            <div>Unable to load the file system at this time</div>
            </div>
        </div>
    <% } %>
</asp:Content>
